com.att.gs.codip.ograph
Interface OntologyManager

All Known Implementing Classes:
OntologyManagerImp

public interface OntologyManager

This is the interface for the ontology manager class.


Method Summary
 void addAlias(java.lang.String anAlias, OGOntology theOntology)
          Adds an alias for the supplied ontology.
 void addOntology(OGOntology theOntology)
          Adds the provided ontology to the managed collection.
 void addParameter(java.lang.String theURI, java.lang.String aParameter, java.lang.Object aValue)
          Adds or replaces an ontology parameter.
 java.util.Iterator aliases()
          Provides an iterator over all aliases known by this manager.
 java.util.Iterator aliases(OGOntology theOntology)
          Provides an iterator over all aliases for the spefcified ontology that are known by this manager.
 boolean containsAlias(java.lang.String anAlias)
          Checks for the existence of an alias in this manager.
 boolean containsOntology(java.lang.Object theID)
          Checks for the existence of an ontology in the mananged colleciton whose ID matches the provided ID.
 OGOntology createOntology()
          Creates a new instance of an ontology with a generated unique URI.
 OGOntology createOntology(java.lang.String theURI)
          Loads or creates an ontology by URI.
 OGOntology createOntology(java.lang.String theURI, boolean forceReload)
          If forceReload is true will (re)load the ontology from the URI even if an existing instance is found.
 OGOntology getDAML()
          Getter method for the default core ontology provided by the ontology manager.
 java.lang.String getID()
          Getter method for the ID of this ontology manager.
 OGOntology getOntology(java.lang.Object theURI)
          Looks for an ontology in the managed colleciton whose URI matches the provided URI.
 OGOntology getOWL()
          Getter method for the default core OWL ontology provided by the ontology manager.
 java.util.Map getParameters(java.lang.String theURI)
          Returns an ontology's parameter map.
 java.lang.String getVersionInfo()
          Getter method for the version information of this ontology manager.
 OGOntology getXSD()
          Getter method for the default core XML Schema Datatype ontology provided by the ontology manager.
 java.lang.String getXSLT()
          Getter method for the XSL Transform file URI.
 java.lang.String lookupAlias(java.lang.String anAlias)
          Looks up the URI of an alias in this manager.
 OGOntology lookupOntology(java.lang.Object theID)
          Looks for an existing instance the specified Ontology by ID.
 OGOntology lookupOntology(java.lang.Object theURI, boolean pCreate)
          Looks for, and possibilly loads, the specified Ontology by URI.
 java.lang.Object lookupParameter(java.lang.String theURI, java.lang.String aParameter)
          Looks up and returns an ontology's parameter value.
 void morphOntology(OGOntology theOntology, java.lang.String theURI)
          Morphs the provided ontology & updates the managed collection.
 java.util.Iterator ontologies()
          Provides a iterator for the ALL of the managed ontologies.
 void removeAlias(java.lang.String anAlias)
          Removes the supplied alias.
 void removeOntology(OGOntology theOntology)
          Removes the provided ontology from the managed collection.
 void removeParameter(java.lang.String theURI, java.lang.String aParameter)
          Removes an ontology's parameter.
 void setApplyToImports(boolean pTransform)
           
 void setXSLT(java.lang.String theXSLT)
          Setter method for the XSL Transform file URI.
 

Method Detail

getVersionInfo

public java.lang.String getVersionInfo()
Getter method for the version information of this ontology manager.

Returns:
The version information String.

getID

public java.lang.String getID()
Getter method for the ID of this ontology manager. The ID is immutable after creation.

Returns:
The ID String.

getDAML

public OGOntology getDAML()
Getter method for the default core ontology provided by the ontology manager. It is a static singleton instance.

Returns:
The instance of the ontology.

getOWL

public OGOntology getOWL()
Getter method for the default core OWL ontology provided by the ontology manager. It is a static singleton instance.

Returns:
The instance of the ontology.

getXSD

public OGOntology getXSD()
Getter method for the default core XML Schema Datatype ontology provided by the ontology manager. It is a static singleton instance.

Returns:
The instance of the XSD ontology.

getXSLT

public java.lang.String getXSLT()
Getter method for the XSL Transform file URI. The transform is applied to ontology files by the ontology manager before the ontology is parsed. A null string indicates no transform. The default is no transform.

Returns:
The XSL file URI, or null for no transform.

setXSLT

public void setXSLT(java.lang.String theXSLT)
Setter method for the XSL Transform file URI. The transform is applied to ontology files by the ontology manager before the ontology is parsed. A null string indicates no transform. The default is no transform.


setApplyToImports

public void setApplyToImports(boolean pTransform)

lookupOntology

public OGOntology lookupOntology(java.lang.Object theID)
Looks for an existing instance the specified Ontology by ID. The ID can be either a URI or an alias. First the manged collection is searched by URI. If a matching ontology is found it is returned. Then the colleciotn is search by alias. Again, if a matchin ontology is found it is return.

Parameters:
theID - The ID of the sought ontology.
Returns:
The matching ontology if found, otherwise returns void.

lookupOntology

public OGOntology lookupOntology(java.lang.Object theURI,
                                 boolean pCreate)
Looks for, and possibilly loads, the specified Ontology by URI. Searches for the onlology whose URI matches the provided URI. Will atempt to load a new instance with the appropriate URI if none exists. Aliases are used however, the URI must be a valid URL for the ontology to be created.

Parameters:
pCreate - true causes a new instance to be created if no existing match is found.
Returns:
The matching Ontology if found or created, otherwise returns void.

createOntology

public OGOntology createOntology()
Creates a new instance of an ontology with a generated unique URI. The created ontology is empty. It is identified by a unique URI.

Returns:
The Ontology if created, otherwise returns null.

createOntology

public OGOntology createOntology(java.lang.String theURI)
Loads or creates an ontology by URI. Searches first for an onlology whose ID matches the provided URI, if no match is found a new instance is created and/or loaded. If a match is found, null is returned. Note that the URI must be a valid URL for the ontology to be loaded.

Parameters:
theURI - The URI of the new ontology.
Returns:
The matching ontology if loaded or created, otherwise returns null.

createOntology

public OGOntology createOntology(java.lang.String theURI,
                                 boolean forceReload)
If forceReload is true will (re)load the ontology from the URI even if an existing instance is found. Otherwise, behaves identically to createOntology(String theURI);

Parameters:
forceReload - If true forces the ontology to be reload from the URI.
Returns:
The matching ontology if found or created, otherwise returns void.

addOntology

public void addOntology(OGOntology theOntology)
Adds the provided ontology to the managed collection. The provided ontology instance is added only if there is not a currently managed instance with the same URI.

Parameters:
theOntology - The ontology instance to add to the collection.

morphOntology

public void morphOntology(OGOntology theOntology,
                          java.lang.String theURI)
Morphs the provided ontology & updates the managed collection. When the ontology is morphed any references to the old URI should be updated to the new URI.

Parameters:
theOntology - The ontology to remove from the collection.

removeOntology

public void removeOntology(OGOntology theOntology)
Removes the provided ontology from the managed collection. When the ontology is removed from the managed colleciton, all aliases refering to it and all other interanl reference to it are also removed. The removed ontology may be garbage collected if no other references exist.

Parameters:
theOntology - The ontology to remove from the collection.

getOntology

public OGOntology getOntology(java.lang.Object theURI)
Looks for an ontology in the managed colleciton whose URI matches the provided URI. The ontology manager assumes that ontologies are uniquely identified by their URI and therefore maintains a static colletion of ontologies with the URI as key.

Parameters:
theURI - The URI of the sought ontology.
Returns:
The matching ontology if found, otherwise returns null.

containsOntology

public boolean containsOntology(java.lang.Object theID)
Checks for the existence of an ontology in the mananged colleciton whose ID matches the provided ID.

Parameters:
theID - The ID of the sought ontology.
Returns:
true if the ontology exists in this collection.

ontologies

public java.util.Iterator ontologies()
Provides a iterator for the ALL of the managed ontologies.

Returns:
An iterator over all the ontologies.

lookupAlias

public java.lang.String lookupAlias(java.lang.String anAlias)
Looks up the URI of an alias in this manager.

Parameters:
anAlias - The alias string.
Returns:
The URI of the aliased ontology, or null.

containsAlias

public boolean containsAlias(java.lang.String anAlias)
Checks for the existence of an alias in this manager.

Parameters:
anAlias - The alias string.
Returns:
true if the alias exists.

addAlias

public void addAlias(java.lang.String anAlias,
                     OGOntology theOntology)
Adds an alias for the supplied ontology.

Parameters:
anAlias - The alias string.
theOntology - The ontology refered to by the alias string.

removeAlias

public void removeAlias(java.lang.String anAlias)
Removes the supplied alias.

Parameters:
anAlias - The alias string.

aliases

public java.util.Iterator aliases()
Provides an iterator over all aliases known by this manager.

Returns:
The iterator.

aliases

public java.util.Iterator aliases(OGOntology theOntology)
Provides an iterator over all aliases for the spefcified ontology that are known by this manager.

Returns:
The iterator.

getParameters

public java.util.Map getParameters(java.lang.String theURI)
Returns an ontology's parameter map.

Parameters:
theURI - The URI of the ontology.
Returns:
a Map object containing the parameters for the ontology.

lookupParameter

public java.lang.Object lookupParameter(java.lang.String theURI,
                                        java.lang.String aParameter)
Looks up and returns an ontology's parameter value.

Parameters:
theURI - The URI of the ontology.
aParameter - The name of the parameter.
Returns:
The value of the parameter for the ontology.

addParameter

public void addParameter(java.lang.String theURI,
                         java.lang.String aParameter,
                         java.lang.Object aValue)
Adds or replaces an ontology parameter.

Parameters:
theURI - The URI of the ontology.
aParameter - The name of the parameter to add or update.
aValue - The new value of the parameter.

removeParameter

public void removeParameter(java.lang.String theURI,
                            java.lang.String aParameter)
Removes an ontology's parameter.

Parameters:
theURI - The URI of the ontology.
aParameter - The name of the parameter to remove.


CODIP AT&T Government Solutions, Inc.