com.clarkparsia.modularity.io
Class ModuleExtractorPersistence

java.lang.Object
  extended by com.clarkparsia.modularity.io.ModuleExtractorPersistence

public class ModuleExtractorPersistence
extends java.lang.Object

Title:

Description:

Copyright: Copyright (c) 2009

Company: Clark & Parsia, LLC.

Provides methods that serialize and deserialize AbstractModuleExtractor

Author:
Blazej Bulka

Field Summary
static java.util.logging.Logger log
           
 
Constructor Summary
ModuleExtractorPersistence()
           
 
Method Summary
static org.semanticweb.owlapi.model.OWLOntology loadAxiomOntology(java.io.InputStream inputStream)
           
static java.util.Collection<org.semanticweb.owlapi.model.OWLAxiom> loadAxioms(java.io.InputStream inputStream)
          Loads the ontology with axioms (for ModuleExtractor) from an input stream.
static MultiValueMap<org.semanticweb.owlapi.model.OWLEntity,org.semanticweb.owlapi.model.OWLEntity> loadModules(java.io.InputStream is)
          Reads information about the modules from the input stream that has the information stored in a form of ontology.
static void saveAxioms(java.util.Collection<org.semanticweb.owlapi.model.OWLAxiom> axioms, java.io.OutputStream outputStream)
          Saves the axioms from the ModuleExtractor in the form of an ontology containing these axioms.
static void saveModules(MultiValueMap<org.semanticweb.owlapi.model.OWLEntity,org.semanticweb.owlapi.model.OWLEntity> modules, java.io.OutputStream outputStream)
          Saves the information about modules from ModuleExtractor to an output stream as an ontology of modules annotated with URIs of the OWL entities that belong to the respective modules.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final java.util.logging.Logger log
Constructor Detail

ModuleExtractorPersistence

public ModuleExtractorPersistence()
Method Detail

saveAxioms

public static void saveAxioms(java.util.Collection<org.semanticweb.owlapi.model.OWLAxiom> axioms,
                              java.io.OutputStream outputStream)
                       throws java.io.IOException
Saves the axioms from the ModuleExtractor in the form of an ontology containing these axioms.

Parameters:
axioms - the axioms to be saved
outputStream - the output stream where the axioms should be saved
Throws:
java.io.IOException - if an error occurs during the save process

saveModules

public static void saveModules(MultiValueMap<org.semanticweb.owlapi.model.OWLEntity,org.semanticweb.owlapi.model.OWLEntity> modules,
                               java.io.OutputStream outputStream)
                        throws java.io.IOException
Saves the information about modules from ModuleExtractor to an output stream as an ontology of modules annotated with URIs of the OWL entities that belong to the respective modules.

Parameters:
modules - the modules to be saved
outputStream - the output stream where the data should be saved
Throws:
java.io.IOException - if an error should occur during the save process

loadAxiomOntology

public static org.semanticweb.owlapi.model.OWLOntology loadAxiomOntology(java.io.InputStream inputStream)
                                                                  throws java.io.IOException
Throws:
java.io.IOException

loadAxioms

public static java.util.Collection<org.semanticweb.owlapi.model.OWLAxiom> loadAxioms(java.io.InputStream inputStream)
                                                                              throws java.io.IOException
Loads the ontology with axioms (for ModuleExtractor) from an input stream.

Parameters:
inputStream - the input stream from which to load the ontology.
Returns:
the collection of axioms read from the ontology
Throws:
java.io.IOException - if an error should occur during the read operation

loadModules

public static MultiValueMap<org.semanticweb.owlapi.model.OWLEntity,org.semanticweb.owlapi.model.OWLEntity> loadModules(java.io.InputStream is)
                                                                                                                throws java.io.IOException
Reads information about the modules from the input stream that has the information stored in a form of ontology.

Parameters:
inputStream - the input stream from which the ontology should be read
Returns:
the read information about the modules
Throws:
java.io.IOException - if an error occurs during the read process.


Copyright © 2004 Evren Sirin. All Rights Reserved.