ConceptLatticeIOFactory.java

  1. package org.thegalactic.lattice.io;

  2. /*
  3.  * ArrowRelationIOFactory.java
  4.  *
  5.  * Copyright: 2010-2015 Karell Bertet, France
  6.  * Copyright: 2015-2016 The Galactic Organization, France
  7.  *
  8.  * License: http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html CeCILL-B license
  9.  *
  10.  * This file is part of java-lattices.
  11.  * You can redistribute it and/or modify it under the terms of the CeCILL-B license.
  12.  */
  13. import org.thegalactic.lattice.ConceptLattice;

  14. /**
  15.  * This class register readers and writers for the Context class.
  16.  *
  17.  * ![ConceptLatticeIOFactory](ConceptLatticeIOFactory.png)
  18.  *
  19.  * @uml ConceptLatticeIOFactory.png
  20.  * !include resources/org/thegalactic/lattice/io/ConceptLatticeIOFactory.iuml
  21.  *
  22.  * hide members
  23.  * show ConceptLatticeIOFactory members
  24.  * class ConceptLatticeIOFactory #LightCyan
  25.  * title ConceptLatticeIOFactory UML graph
  26.  */
  27. public final class ConceptLatticeIOFactory extends org.thegalactic.io.IOFactory<ConceptLattice> {

  28.     /**
  29.      * The singleton instance.
  30.      */
  31.     private static final ConceptLatticeIOFactory INSTANCE = new ConceptLatticeIOFactory();

  32.     /**
  33.      * Initialise the unique instance of this class.
  34.      */
  35.     static {
  36.         ConceptLatticeIOFactory.init();
  37.     }

  38.     /**
  39.      * Return the singleton instance of this class.
  40.      *
  41.      * @return the singleton instance
  42.      */
  43.     public static ConceptLatticeIOFactory getInstance() {
  44.         return INSTANCE;
  45.     }

  46.     /**
  47.      * Initialse the factory.
  48.      */
  49.     protected static void init() {
  50.         ConceptLatticeSerializerDot.register();
  51.     }

  52.     /**
  53.      * This class is not designed to be publicly instantiated.
  54.      */
  55.     private ConceptLatticeIOFactory() {
  56.         super();
  57.     }
  58. }