com.ontotext.wsmo4j.ontology
Class RelationInstanceImpl
java.lang.Object
com.ontotext.wsmo4j.common.EntityImpl
com.ontotext.wsmo4j.ontology.OntologyElementImpl
com.ontotext.wsmo4j.ontology.RelationInstanceImpl
- All Implemented Interfaces:
- org.omwg.ontology.OntologyElement, org.omwg.ontology.RelationInstance, org.wsmo.common.Entity
public class RelationInstanceImpl
- extends OntologyElementImpl
- implements org.omwg.ontology.RelationInstance
Constructor Summary |
RelationInstanceImpl(org.wsmo.common.Identifier thisID,
org.omwg.ontology.Relation rel)
|
Method Summary |
boolean |
equals(Object object)
|
org.omwg.ontology.Value |
getParameterValue(byte pos)
Returns the value of the specified paramter. |
org.omwg.ontology.Relation |
getRelation()
Returns the relation this relation instance
is an instance of. |
List<org.omwg.ontology.Value> |
listParameterValues()
Returns a set of ParameterValues. |
void |
setParameterValue(byte pos,
org.omwg.ontology.Value value)
Sets the value of the specified Parameter to be the specified
ParameterValue object. |
void |
setRelation(org.omwg.ontology.Relation relation)
Sets the relation this relation instance 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 |
RelationInstanceImpl
public RelationInstanceImpl(org.wsmo.common.Identifier thisID,
org.omwg.ontology.Relation rel)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
setRelation
public void setRelation(org.omwg.ontology.Relation relation)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Sets the relation this relation instance is
an instance of.
- Specified by:
setRelation
in interface org.omwg.ontology.RelationInstance
- Parameters:
concept
- The Relation this relation instance
is an instance of.
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
- See Also:
getRelation()
getRelation
public org.omwg.ontology.Relation getRelation()
throws org.wsmo.common.exception.SynchronisationException
- Returns the relation this relation instance
is an instance of.
- Specified by:
getRelation
in interface org.omwg.ontology.RelationInstance
- Returns:
- The relation this relation instance
is an instance of.
- Throws:
org.wsmo.common.exception.SynchronisationException
- See Also:
setRelation(org.omwg.ontology.Relation)
listParameterValues
public List<org.omwg.ontology.Value> listParameterValues()
- Returns a set of ParameterValues.
- Specified by:
listParameterValues
in interface org.omwg.ontology.RelationInstance
- Returns:
- A set of ParameterValues
for all parameters set via
setParameterValue
.
getParameterValue
public org.omwg.ontology.Value getParameterValue(byte pos)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Returns the value of the specified paramter.
- Specified by:
getParameterValue
in interface org.omwg.ontology.RelationInstance
- Parameters:
parameter
- The parameter of interest.
- Returns:
- The value of the specified parameter.
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
- See Also:
#setParameterValue(org.omwg.ontology.Parameter, org.omwg.ontology.Value)
setParameterValue
public void setParameterValue(byte pos,
org.omwg.ontology.Value value)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Sets the value of the specified Parameter to be the specified
ParameterValue object. If this method is called more than once for a
certain parameter position, only the parameter value added on the last
call is preserved - all the rest are discarded.
Null values are allowed for removal purposes.
- Specified by:
setParameterValue
in interface org.omwg.ontology.RelationInstance
- Parameters:
pos
- The index of the parameter of interest.value
- The ParameterValue object to set the specified Parameter's
value to.
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
equals
public boolean equals(Object object)
- Overrides:
equals
in class EntityImpl
Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.