Class OWLManagerGroup

  • All Implemented Interfaces:
    java.lang.AutoCloseable, OWLGroup, openllet.shared.tools.Logging

    public class OWLManagerGroup
    extends java.lang.Object
    implements OWLGroup
    Group of Owl Manager, volatile and persistent.
    Since:
    2.5.1
    • Field Detail

      • _ontologiesDirectory

        public volatile java.util.Optional<java.io.File> _ontologiesDirectory
      • _volatileManager

        public volatile org.semanticweb.owlapi.model.OWLOntologyManager _volatileManager
      • _persistentManager

        public volatile org.semanticweb.owlapi.model.OWLOntologyManager _persistentManager
    • Constructor Detail

      • OWLManagerGroup

        public OWLManagerGroup()
      • OWLManagerGroup

        public OWLManagerGroup​(java.io.File ontologiesDirectory)
      • OWLManagerGroup

        public OWLManagerGroup​(java.util.Optional<org.semanticweb.owlapi.model.OWLOntologyManager> volatileManager,
                               java.util.Optional<org.semanticweb.owlapi.model.OWLOntologyManager> storageManager)
      • OWLManagerGroup

        public OWLManagerGroup​(org.semanticweb.owlapi.model.OWLOntology ontology)
    • Method Detail

      • getLogger

        public java.util.logging.Logger getLogger()
        Specified by:
        getLogger in interface openllet.shared.tools.Logging
      • setOntologiesDirectory

        public boolean setOntologiesDirectory​(java.io.File directory)
        Specified by:
        setOntologiesDirectory in interface OWLGroup
      • getOntologiesDirectory

        public java.util.Optional<java.io.File> getOntologiesDirectory()
        Specified by:
        getOntologiesDirectory in interface OWLGroup
      • getVolatileManager

        public org.semanticweb.owlapi.model.OWLOntologyManager getVolatileManager()
        Specified by:
        getVolatileManager in interface OWLGroup
      • getPersistentManager

        public org.semanticweb.owlapi.model.OWLOntologyManager getPersistentManager()
        Specified by:
        getPersistentManager in interface OWLGroup
        Returns:
        The storage manager if you have call setOntologiesDirectory() before; else it throw a RuntimeException.
        Since:
        2.5.1
      • loadDirectory

        public void loadDirectory​(java.io.File directory,
                                  org.semanticweb.owlapi.model.OWLOntologyManager manager,
                                  java.util.function.BiFunction<org.semanticweb.owlapi.model.OWLOntologyManager,​java.io.File,​java.util.Optional<org.semanticweb.owlapi.model.OWLOntology>> loader)
        Load a directory of '.owl' file. The files that end with '.part' are considere as resulting of a failed/partial-failed in saving an ontology by OWLIncrementalFlatFileStorageManagerListener. Thoses files are load/renamed dependending of the state a of corresponding '.owl' file. This is the 'recover' strategy from the two phases commit of IncrementalFlatFileStorage.
        Specified by:
        loadDirectory in interface OWLGroup
      • loadDirectory

        public void loadDirectory​(java.io.File directory)
        Specified by:
        loadDirectory in interface OWLGroup
      • ontology2filename

        public java.lang.String ontology2filename​(org.semanticweb.owlapi.model.OWLOntologyID ontId)
        Specified by:
        ontology2filename in interface OWLGroup
      • ontology2filename

        public java.lang.String ontology2filename​(org.semanticweb.owlapi.model.OWLOntology ontology)
        Specified by:
        ontology2filename in interface OWLGroup
      • check

        public void check​(org.semanticweb.owlapi.model.OWLOntologyManager manager)
        Specified by:
        check in interface OWLGroup
      • flushIncrementalStorage

        public void flushIncrementalStorage()
        Make sure that no temporary file remain and all delta are in the storage. This function as debugging/testing purpose only.
        Since:
        2.6.0
      • close

        public void close()
        Free all in memory resource. The 'in memory' space taken by the persistent data is also free, but the persistent is maintain for future usage. The storage system is disable.
        Specified by:
        close in interface java.lang.AutoCloseable
        Since:
        2.5.1