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: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
Author:
not attributable
See Also:
Concept

Method Summary
 void addAttributeValue(Identifier id, 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.
 Set<Attribute> findAttributeDefinitions(Identifier id)
          Search this concept and all super concepts for a specified attribute.
 Map<Identifier,Set<Value>> listAttributeValues()
          Returns all attribute values for this instance.
 Set<Value> listAttributeValues(Identifier key)
          Returns a list of values of a specified attribute.
 Set<Concept> listConcepts()
          Returns a list of the concepts this instance belongs to
 void removeAttributeValue(Identifier key, Value value)
          Removes a particular value associated with an attribute within this instance.
 void removeAttributeValues(Identifier id)
          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

Set<Concept> 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(Identifier id,
                       Value value)
                       throws SynchronisationException,
                              InvalidModelException
Adds a new attribute value to the list of values associated with the specified attribute of this instance.

Parameters:
id - the attribute's indentifier of interest
value - The value to be added
Throws:
SynchronisationException
InvalidModelException
See Also:
Concept#createAttribute(IRI), removeAttributeValue(Identifier, Value), removeAttributeValues(Identifier)

removeAttributeValue

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

Parameters:
id - The attribute's indentifier of interest
value - the attribute value to be removed
Throws:
SynchronisationException
InvalidModelException
See Also:
removeAttributeValues(Identifier id)

removeAttributeValues

void removeAttributeValues(Identifier id)
                           throws SynchronisationException,
                                  InvalidModelException
Clears all the values associated with a particular attribute of this instance.

Parameters:
id - The attribute's indentifier of interest
Throws:
SynchronisationException
InvalidModelException
See Also:
#removeAttributeValue(Identifier id, Object value)

listAttributeValues

Set<Value> listAttributeValues(Identifier 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

Map<Identifier,Set<Value>> listAttributeValues()
                                               throws SynchronisationException
Returns all attribute values for this instance.

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

findAttributeDefinitions

Set<Attribute> findAttributeDefinitions(Identifier id)
                                        throws SynchronisationException
Search this concept and all super concepts for a specified attribute.

Parameters:
id - of the attribute
Returns:
Set with all attributes
Throws:
SynchronisationException


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.