com.clarkparsia.modularity.io
Class TaxonomyPersistence

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

public class TaxonomyPersistence
extends java.lang.Object

Title: Stores and restores a taxonomy to a stream.

Description: Enables storing and reading back a taxonomy from a stream. The taxonomy is first converted into an ontology, and then saved using the standard OWLRenderers.

Copyright: Copyright (c) 2009

Company: Clark & Parsia, LLC.

Author:
Blazej Bulka

Field Summary
static java.util.logging.Logger log
           
 
Constructor Summary
TaxonomyPersistence()
           
 
Method Summary
static Taxonomy<org.semanticweb.owlapi.model.OWLClass> load(java.io.InputStream is)
          Loads the taxonomy from a stream
static void save(Taxonomy<org.semanticweb.owlapi.model.OWLClass> taxonomy, java.io.OutputStream outputStream)
          Saves a taxonomy into a stream.
 
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

TaxonomyPersistence

public TaxonomyPersistence()
Method Detail

save

public static void save(Taxonomy<org.semanticweb.owlapi.model.OWLClass> taxonomy,
                        java.io.OutputStream outputStream)
                 throws java.io.IOException
Saves a taxonomy into a stream.

Parameters:
ontologyManager - the ontology manager
taxonomy - the taxonomy to be saved
outputStream - the output stream where the ontology should be saved
Throws:
java.io.IOException - if an I/O error should occur

load

public static Taxonomy<org.semanticweb.owlapi.model.OWLClass> load(java.io.InputStream is)
                                                            throws java.io.IOException
Loads the taxonomy from a stream

Parameters:
ontologyManager - the ontology manager
is - the stream containing the taxonomy in the form of an ontology
Returns:
the read taxonomy
Throws:
java.io.IOException - if an I/O error should occur while reading the taxonomy


Copyright © 2004 Evren Sirin. All Rights Reserved.