org.omwg.ontology
Interface Instance

All Superinterfaces:
Entity, OntologyElement, Value

public interface Instance
extends OntologyElement, Value

This class represents an instance of a WSMO concept.

Version:
$Revision: 1.18 $ $Date: 2005/09/21 08:15:39 $
Author:
not attributable
See Also:
Concept

Method Summary
 void addAttributeValue(Attribute key, Value value)
          Adds a new attribute value to the list of values associated with the specified attribute of this instance.
 void addConcept(Concept memberOf)
          Sets the concept this instance is an instance of.
 java.util.Map listAttributeValues()
          Returns all attribute values for this instance.
 java.util.Set listAttributeValues(Attribute key)
          Returns a list of values of a specified attribute.
 java.util.Set listConcepts()
          Returns a list of the concepts this instance belongs to
 void removeAttributeValue(Attribute key, Value value)
          removes a particular value associated with an attribute within this instance
 void removeAttributeValues(Attribute key)
          clears all the values associated with a particular attribute of this instance.
 void removeConcept(Concept memberOf)
          Removes a concept from the set of concepts that this entity is an instance of
 
Methods inherited from interface org.omwg.ontology.OntologyElement
getOntology, setOntology
 
Methods inherited from interface org.wsmo.common.Entity
addNFPValue, addNFPValue, getIdentifier, listNFPValues, listNFPValues, removeNFP, removeNFPValue, removeNFPValue
 

Method Detail

addConcept

void addConcept(Concept memberOf)
                throws SynchronisationException,
                       InvalidModelException
Sets the concept this instance is an instance of. The concept will also add this instance to the list of its instances

Parameters:
memberOf - The concept that this instance is an instance of.
Throws:
SynchronisationException
InvalidModelException
See Also:
removeConcept(Concept memberOf), Concept.addInstance(Instance inst)

removeConcept

void removeConcept(Concept memberOf)
                   throws SynchronisationException,
                          InvalidModelException
Removes a concept from the set of concepts that this entity is an instance of

Parameters:
memberOf - the concept (the entity is no longer an instance of it)
Throws:
SynchronisationException
InvalidModelException

listConcepts

java.util.Set listConcepts()
                           throws SynchronisationException
Returns a list of the concepts this instance belongs to

Returns:
The list of the concepts of this instances
Throws:
SynchronisationException
See Also:
Concept

addAttributeValue

void addAttributeValue(Attribute key,
                       Value value)
                       throws SynchronisationException,
                              InvalidModelException
Adds a new attribute value to the list of values associated with the specified attribute of this instance.

Parameters:
key - The attribute of interest.
value - The value to be added.
Throws:
SynchronisationException
InvalidModelException
See Also:
Concept.createAttribute(IRI), removeAttributeValue(Attribute, Value), removeAttributeValues(Attribute)

removeAttributeValue

void removeAttributeValue(Attribute key,
                          Value value)
                          throws SynchronisationException,
                                 InvalidModelException
removes a particular value associated with an attribute within this instance

Parameters:
key - The attribute of interest.
value - the attribute value to be removed
Throws:
SynchronisationException
InvalidModelException
See Also:
removeAttributeValues(Attribute key)

removeAttributeValues

void removeAttributeValues(Attribute key)
                           throws SynchronisationException,
                                  InvalidModelException
clears all the values associated with a particular attribute of this instance.

Parameters:
key - The attribute of interest.
Throws:
SynchronisationException
InvalidModelException
See Also:
#removeAttributeValue(Attribute key, Object value)

listAttributeValues

java.util.Set listAttributeValues(Attribute key)
                                  throws SynchronisationException
Returns a list of values of a specified attribute. Note that an attribute may be associated with more than one value

Parameters:
key - The attribute of interest.
Returns:
A set of values assigned to this attribute.
Throws:
SynchronisationException
See Also:
listAttributeValues()

listAttributeValues

java.util.Map listAttributeValues()
                                  throws SynchronisationException
Returns all attribute values for this instance.

Returns:
A Map of [Attribute, Set of values] pairs.
Throws:
SynchronisationException
See Also:
listAttributeValues(Attribute key)