kaos.ontology.util
Class OntModelUtils

java.lang.Object
  extended by kaos.ontology.util.OntModelUtils

public class OntModelUtils
extends java.lang.Object

$Revision: 1.3 $


Constructor Summary
OntModelUtils()
           
 
Method Summary
static SerializableOntModelImpl aggregateOntModels(java.util.Set ontModelSet)
          Return a single SerializableOntModelImpl that is the aggregate of all models in the given set of OntModels
static SerializableOntModelImpl constructDAMLModel(java.lang.String deconstructedModel)
          converts a String to a SerializableOntModelImpl.
static java.lang.String deconstructDAMLModel(OntModel model)
          converts a DAMLModel to a String.
static java.lang.String trimDAMLModel(java.lang.String input, java.util.Set allLoadedOntologies)
          Removes the ontologies already loaded into jtp, from the given String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OntModelUtils

public OntModelUtils()
Method Detail

deconstructDAMLModel

public static java.lang.String deconstructDAMLModel(OntModel model)
                                             throws RDFException
converts a DAMLModel to a String.

Parameters:
model - the model to be converted.
Returns:
the converted String.
Throws:
RDFException

constructDAMLModel

public static SerializableOntModelImpl constructDAMLModel(java.lang.String deconstructedModel)
                                                   throws RDFException
converts a String to a SerializableOntModelImpl.

Parameters:
deconstructedModel - the String to be converted.
Returns:
the generated SerializableDAMLModel.
Throws:
RDFException

trimDAMLModel

public static java.lang.String trimDAMLModel(java.lang.String input,
                                             java.util.Set allLoadedOntologies)
Removes the ontologies already loaded into jtp, from the given String.

Parameters:
input - the String from which to remove ontologies.
_allLoadedOntologies - the Set of Strings representing names of loaded ontologies
Returns:
the modified String, without redundant ontologies

aggregateOntModels

public static SerializableOntModelImpl aggregateOntModels(java.util.Set ontModelSet)
Return a single SerializableOntModelImpl that is the aggregate of all models in the given set of OntModels

Parameters:
ontModelSet - - Set of OntModel's to be aggregated
Returns:
SerializableOntModelImpl that is the aggregate of the set of models