com.hp.hpl.jena.ontology
Interface Individual

All Superinterfaces:
OntResource, RDFNode, Resource

public interface Individual
extends OntResource

Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion, or a member of the a-box. In order to be recognised as an individual, rather than a generic resource, at least one rdf:type statement, referring to a known class, must be present in the model.

Version:
CVS $Id: Individual.java,v 1.8 2003/06/26 19:27:41 ian_dickinson Exp $
Author:
Ian Dickinson, HP Labs (email)

Method Summary
 void addSameIndividualAs(Resource res)
          Add an individual that is declared to be equivalent to this individual.
 OntResource getSameIndividualAs()
          Answer a resource that is declared to be the same as this individual.
 boolean isSameIndividualAs(Resource res)
          Answer true if this individual is the same as the given resource.
 ExtendedIterator listSameIndividualAs()
          Answer an iterator over all of the resources that are declared to be equivalent to this individual.
 void removeSameIndividualAs(Resource res)
          Remove the statement that this individual is the same as the given individual.
 void setSameIndividualAs(Resource res)
          Assert equivalence between the given individual and this individual.
 
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

setSameIndividualAs

public void setSameIndividualAs(Resource res)

Assert equivalence between the given individual and this individual. Any existing statements for sameIndividualAs will be removed.

Note that sameAs and sameIndividualAs are aliases.

Parameters:
res - The resource that declared to be the same as this individual
Throws:
OntProfileException - If the sameIndividualAs property is not supported in the current language profile.

addSameIndividualAs

public void addSameIndividualAs(Resource res)

Add an individual that is declared to be equivalent to this individual.

Note that sameAs and sameIndividualAs are aliases.

Parameters:
res - A resource that declared to be the same as this individual
Throws:
OntProfileException - If the sameIndividualAs property is not supported in the current language profile.

getSameIndividualAs

public OntResource getSameIndividualAs()

Answer a resource that is declared to be the same as this individual. If there are more than one such resource, an arbitrary selection is made.

Note that sameAs and sameIndividualAs are aliases.

Returns:
res An ont resource that declared to be the same as this individual
Throws:
OntProfileException - If the sameIndividualAs property is not supported in the current language profile.

listSameIndividualAs

public ExtendedIterator listSameIndividualAs()

Answer an iterator over all of the resources that are declared to be equivalent to this individual. Each elemeent of the iterator will be an OntResource.

Note that sameAs and sameIndividualAs are aliases.

Returns:
An iterator over the resources equivalent to this individual.
Throws:
OntProfileException - If the sameIndividualAs property is not supported in the current language profile.

isSameIndividualAs

public boolean isSameIndividualAs(Resource res)

Answer true if this individual is the same as the given resource.

Parameters:
res - A resource to test against
Returns:
True if the resources are declared the same via a sameIndividualAs statement.

removeSameIndividualAs

public void removeSameIndividualAs(Resource res)

Remove the statement that this individual is the same as the given individual. If this statement is not true of the current model, nothing happens.

Parameters:
res - A resource that may be declared to be the sameIndividualAs this resource


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