com.hp.hpl.jena.ontology
Interface Ontology

All Superinterfaces:
OntResource, RDFNode, Resource

public interface Ontology
extends OntResource

Interface encapsulating the distinguished instance in a given ontology document that presents meta-data and other processing data about the document (including which other documents are imported by a document).

Version:
CVS $Id: Ontology.java,v 1.6 2003/06/21 12:35:39 ian_dickinson Exp $
Author:
Ian Dickinson, HP Labs (email)

Method Summary
 void addBackwardCompatibleWith(Resource res)
          Add a resource representing an ontology that this ontology (strictly, the ontology reprsented by this node) is backwards compatible with.
 void addImport(Resource res)
          Add a resource representing an ontology that this ontology (strictly, the ontology reprsented by this node) imports.
 void addIncompatibleWith(Resource res)
          Add a resource representing an ontology that this ontology (strictly, the ontology reprsented by this node) is incompatible with.
 void addPriorVersion(Resource res)
          Add a resource representing an ontology that this ontology (strictly, the ontology reprsented by this node) supercedes.
 OntResource getBackwardCompatibleWith()
          Answer a resource that represents an ontology that is backwards compatible with this ontology.
 OntResource getImport()
          Answer a resource that represents an ontology imported by this ontology.
 OntResource getIncompatibleWith()
          Answer a resource that represents an ontology that is is incompatible with this ontology.
 OntResource getPriorVersion()
          Answer a resource that represents an ontology that is superceded by this ontology.
 boolean hasPriorVersion(Resource res)
          Answer true if this ontology (the ontology represented by this resource) supercedes the given resource.
 boolean imports(Resource res)
          Answer true if this ontology (the ontology represented by this resource) imports the given resource.
 boolean isBackwardCompatibleWith(Resource res)
          Answer true if this ontology (the ontology represented by this resource) is backward compatible with the given resource.
 boolean isIncompatibleWith(Resource res)
          Answer true if this ontology (the ontology represented by this resource) is incompatible with the given resource.
 ExtendedIterator listBackwardCompatibleWith()
          Answer an iterator over all of the resources representing ontologies that this ontology is backwards compatible with.
 ExtendedIterator listImports()
          Answer an iterator over all of the resources representing ontologies imported by this ontology.
 ExtendedIterator listIncompatibleWith()
          Answer an iterator over all of the resources representing ontologies that this ontology is incompatible with.
 ExtendedIterator listPriorVersion()
          Answer an iterator over all of the resources representing ontologies that this ontology supercedes.
 void removeBackwardCompatibleWith(Resource res)
          Remove the statement that this ontology is backwards compatible with the ontology represented by the given resource.
 void removeImport(Resource res)
          Remove the statement that this ontology imports the ontology represented by the given resource.
 void removeIncompatibleWith(Resource res)
          Remove the statement that the given ontology is incompatible with this ontology.
 void removePriorVersion(Resource res)
          Remove the statement that the given ontology is a prior version of this ontology.
 void setBackwardCompatibleWith(Resource res)
          Assert that this ontology is backward compatible with the given ontology.
 void setImport(Resource res)
          Assert that this ontology imports only the given ontology.
 void setIncompatibleWith(Resource res)
          Assert that this ontology is incompatible with the given ontology.
 void setPriorVersion(Resource res)
          Assert that this ontology is a new version of the given ontology.
 
Methods inherited from interface com.hp.hpl.jena.ontology.OntResource
accessor, accessor, addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asIndividual, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isDefinedBy, isDifferentFrom, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfo
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.Resource
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getNode, getProperty, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties, removeAll, removeProperties, toString
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFNode
as, asNode, canAs, inModel, visitWith
 

Method Detail

setImport

public void setImport(Resource res)

Assert that this ontology imports only the given ontology. Any existing statements for sameAs will be removed.

Parameters:
res - Represents a resource that this ontology imports.
Throws:
OntProfileException - If the Profile.IMPORTS()() property is not supported in the current language profile.

addImport

public void addImport(Resource res)

Add a resource representing an ontology that this ontology (strictly, the ontology reprsented by this node) imports.

Parameters:
res - Represents a resource that this ontology imports.
Throws:
OntProfileException - If the Profile.IMPORTS()() property is not supported in the current language profile.

getImport

public OntResource getImport()

Answer a resource that represents an ontology imported by this ontology. If there is more than one such resource, an arbitrary selection is made.

Returns:
An ont resource representing a resource that this ontology imports
Throws:
OntProfileException - If the Profile.IMPORTS()() property is not supported in the current language profile.

listImports

public ExtendedIterator listImports()

Answer an iterator over all of the resources representing ontologies imported by this ontology. Each elemeent of the iterator will be an OntResource.

Returns:
An iterator over the ontology import resources
Throws:
OntProfileException - If the Profile.IMPORTS()() property is not supported in the current language profile.

imports

public boolean imports(Resource res)

Answer true if this ontology (the ontology represented by this resource) imports the given resource.

Parameters:
res - A resource to test against
Returns:
True if this ontology imports the ontology represented by res

removeImport

public void removeImport(Resource res)

Remove the statement that this ontology imports the ontology represented by the given resource. If this statement is not true of the current model, nothing happens.

Parameters:
res - A resource that represents an ontology that is no longer to be imported

setBackwardCompatibleWith

public void setBackwardCompatibleWith(Resource res)

Assert that this ontology is backward compatible with the given ontology. Any existing statements for sameAs will be removed.

Parameters:
res - Represents a resource that this ontology is compatible with.
Throws:
OntProfileException - If the Profile.BACKWARD_COMPATIBLE_WITH() property is not supported in the current language profile.

addBackwardCompatibleWith

public void addBackwardCompatibleWith(Resource res)

Add a resource representing an ontology that this ontology (strictly, the ontology reprsented by this node) is backwards compatible with.

Parameters:
res - Represents a resource that this ontology is compatible with.
Throws:
OntProfileException - If the Profile.BACKWARD_COMPATIBLE_WITH() property is not supported in the current language profile.

getBackwardCompatibleWith

public OntResource getBackwardCompatibleWith()

Answer a resource that represents an ontology that is backwards compatible with this ontology. If there is more than one such resource, an arbitrary selection is made.

Returns:
An ont resource representing an ontology that this ontology is compatible with
Throws:
OntProfileException - If the Profile.BACKWARD_COMPATIBLE_WITH() property is not supported in the current language profile.

listBackwardCompatibleWith

public ExtendedIterator listBackwardCompatibleWith()

Answer an iterator over all of the resources representing ontologies that this ontology is backwards compatible with. Each element of the iterator will be an OntResource.

Returns:
An iterator over the ontology resources compatible with this ontology
Throws:
OntProfileException - If the Profile.BACKWARD_COMPATIBLE_WITH() property is not supported in the current language profile.

isBackwardCompatibleWith

public boolean isBackwardCompatibleWith(Resource res)

Answer true if this ontology (the ontology represented by this resource) is backward compatible with the given resource.

Parameters:
res - A resource to test against
Returns:
True if this ontology is compatible with the ontology represented by res

removeBackwardCompatibleWith

public void removeBackwardCompatibleWith(Resource res)

Remove the statement that this ontology is backwards compatible with the ontology represented by the given resource. If this statement is not true of the current model, nothing happens.

Parameters:
res - A resource that represents an ontology that is no longer to be imported

setPriorVersion

public void setPriorVersion(Resource res)

Assert that this ontology is a new version of the given ontology. Any existing statements for priorVersion will be removed.

Parameters:
res - Represents a resource that this ontology supercedes.
Throws:
OntProfileException - If the Profile.PRIOR_VERSION() property is not supported in the current language profile.

addPriorVersion

public void addPriorVersion(Resource res)

Add a resource representing an ontology that this ontology (strictly, the ontology reprsented by this node) supercedes.

Parameters:
res - Represents a resource that this ontology supercedes.
Throws:
OntProfileException - If the Profile.PRIOR_VERSION() property is not supported in the current language profile.

getPriorVersion

public OntResource getPriorVersion()

Answer a resource that represents an ontology that is superceded by this ontology. If there is more than one such resource, an arbitrary selection is made.

Returns:
An ont resource representing an ontology that this ontology supercedes
Throws:
OntProfileException - If the Profile.PRIOR_VERSION() property is not supported in the current language profile.

listPriorVersion

public ExtendedIterator listPriorVersion()

Answer an iterator over all of the resources representing ontologies that this ontology supercedes. Each element of the iterator will be an OntResource.

Returns:
An iterator over the ontology resources superceded by this ontology
Throws:
OntProfileException - If the Profile.PRIOR_VERSION() property is not supported in the current language profile.

hasPriorVersion

public boolean hasPriorVersion(Resource res)

Answer true if this ontology (the ontology represented by this resource) supercedes the given resource.

Parameters:
res - A resource to test against
Returns:
True if this ontology supercedes the ontology represented by res

removePriorVersion

public void removePriorVersion(Resource res)

Remove the statement that the given ontology is a prior version of this ontology. If this statement is not true of the current model, nothing happens.

Parameters:
res - A resource that represents an ontology that is no longer a prior version of this ontology

setIncompatibleWith

public void setIncompatibleWith(Resource res)

Assert that this ontology is incompatible with the given ontology. Any existing statements for incompatibleWith will be removed.

Parameters:
res - Represents a resource that this ontology is incompatible with.
Throws:
OntProfileException - If the Profile.INCOMPATIBLE_WITH() property is not supported in the current language profile.

addIncompatibleWith

public void addIncompatibleWith(Resource res)

Add a resource representing an ontology that this ontology (strictly, the ontology reprsented by this node) is incompatible with.

Parameters:
res - Represents a resource that this ontology is incompatible with.
Throws:
OntProfileException - If the Profile.INCOMPATIBLE_WITH() property is not supported in the current language profile.

getIncompatibleWith

public OntResource getIncompatibleWith()

Answer a resource that represents an ontology that is is incompatible with this ontology. If there is more than one such resource, an arbitrary selection is made.

Returns:
An ont resource representing an ontology that this ontology is incompatible with
Throws:
OntProfileException - If the Profile.INCOMPATIBLE_WITH() property is not supported in the current language profile.

listIncompatibleWith

public ExtendedIterator listIncompatibleWith()

Answer an iterator over all of the resources representing ontologies that this ontology is incompatible with. Each element of the iterator will be an OntResource.

Returns:
An iterator over the ontology resources that this ontology is incompatible with
Throws:
OntProfileException - If the Profile.INCOMPATIBLE_WITH() property is not supported in the current language profile.

isIncompatibleWith

public boolean isIncompatibleWith(Resource res)

Answer true if this ontology (the ontology represented by this resource) is incompatible with the given resource.

Parameters:
res - A resource to test against
Returns:
True if this ontology is incompatible with the ontology represented by res

removeIncompatibleWith

public void removeIncompatibleWith(Resource res)

Remove the statement that the given ontology is incompatible with this ontology. If this statement is not true of the current model, nothing happens.

Parameters:
res - A resource that represents an ontology that is no longer incompatible with this ontology


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.