kaos.ontology.util
Class OntModelUtils

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

public class OntModelUtils
extends java.lang.Object

$Revision: 1.21 $

Author:
James Lott

Constructor Summary
OntModelUtils()
           
 
Method Summary
static SerializableOntModelImpl aggregateOntModels(java.util.Set<OntModel> ontModelSet)
          Return a single SerializableOntModelImpl that is the aggregate of all models in the given set of OntModels
static SerializableOntModelImpl constructOntModelForConcept(java.lang.String conceptModel, java.lang.String conceptID)
          Converts OWL representation of the concept identify by id into SerializableOntModelImpl.
static SerializableOntModelImpl constructOntModelForRootInstance(java.lang.String instanceModel)
          Converts OWL representation of the instance found to be a single root in the model (instance not begin value of any property) into SerializableOntModelImpl.
static java.lang.String deconstructOntModel(OntModel model)
          Converts a OntModel to a String.
static SerializableOntModelImpl minimizeOntModel(SerializableOntModelImpl bigModel)
          Minimize ontology model to the definitions only related to the concept represented by this model
static java.lang.String trimOntModel(java.lang.String input, java.util.Set<java.lang.String> allLoadedOntologies)
          Removes the ontology concept already loaded into ontology repository, 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

deconstructOntModel

public static java.lang.String deconstructOntModel(OntModel model)
Converts a OntModel to a String.

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

constructOntModelForConcept

public static SerializableOntModelImpl constructOntModelForConcept(java.lang.String conceptModel,
                                                                   java.lang.String conceptID)
Converts OWL representation of the concept identify by id into SerializableOntModelImpl.

Parameters:
conceptModel - - the OWL String to be converted.
conceptID - - the id of the concept
Returns:
the generated SerializableOntModel.

constructOntModelForRootInstance

public static SerializableOntModelImpl constructOntModelForRootInstance(java.lang.String instanceModel)
Converts OWL representation of the instance found to be a single root in the model (instance not begin value of any property) into SerializableOntModelImpl.

Parameters:
instanceModel - - the String to be converted.
Returns:
the generated - SerializableOntModel.

minimizeOntModel

public static SerializableOntModelImpl minimizeOntModel(SerializableOntModelImpl bigModel)
Minimize ontology model to the definitions only related to the concept represented by this model

Parameters:
bigModel - the model to be minimize
Returns:
minimized model

trimOntModel

public static java.lang.String trimOntModel(java.lang.String input,
                                            java.util.Set<java.lang.String> allLoadedOntologies)
Removes the ontology concept already loaded into ontology repository, 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<OntModel> 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