com.ontotext.wsmo4j.ontology
Class RelationImpl
java.lang.Object
com.ontotext.wsmo4j.common.EntityImpl
com.ontotext.wsmo4j.ontology.OntologyElementImpl
com.ontotext.wsmo4j.ontology.RelationImpl
- All Implemented Interfaces:
- org.omwg.ontology.OntologyElement, org.omwg.ontology.Relation, org.wsmo.common.Entity
public class RelationImpl
- extends OntologyElementImpl
- implements org.omwg.ontology.Relation
Constructor Summary |
RelationImpl(org.wsmo.common.Identifier thisID)
|
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 |
RelationImpl
public RelationImpl(org.wsmo.common.Identifier thisID)
listSuperRelations
public Set<org.omwg.ontology.Relation> listSuperRelations()
throws org.wsmo.common.exception.SynchronisationException
- Specified by:
listSuperRelations
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
addSuperRelation
public void addSuperRelation(org.omwg.ontology.Relation relation)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Specified by:
addSuperRelation
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
removeSuperRelation
public void removeSuperRelation(org.omwg.ontology.Relation relation)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Specified by:
removeSuperRelation
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
listRelationInstances
public Set<org.omwg.ontology.RelationInstance> listRelationInstances()
throws org.wsmo.common.exception.SynchronisationException
- Specified by:
listRelationInstances
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
addRelationInstance
public void addRelationInstance(org.omwg.ontology.RelationInstance instance)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Specified by:
addRelationInstance
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
removeRelationInstance
public void removeRelationInstance(org.omwg.ontology.RelationInstance instance)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Specified by:
removeRelationInstance
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
listSubRelations
public Set<org.omwg.ontology.Relation> listSubRelations()
throws org.wsmo.common.exception.SynchronisationException
- Specified by:
listSubRelations
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
addSubRelation
public void addSubRelation(org.omwg.ontology.Relation relation)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Specified by:
addSubRelation
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
removeSubRelation
public void removeSubRelation(org.omwg.ontology.Relation relation)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- Specified by:
removeSubRelation
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
listParameters
public List<org.omwg.ontology.Parameter> listParameters()
throws org.wsmo.common.exception.SynchronisationException
- Specified by:
listParameters
in interface org.omwg.ontology.Relation
- Throws:
org.wsmo.common.exception.SynchronisationException
createParameter
public org.omwg.ontology.Parameter createParameter(byte pos)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- The positioning of the parameters is zero-based, i.e. the first parameter
is at position 0. The initial order of parameters creation must be
succesive, starting from the 0th position. Any other order raises an
InvalidModelException. If this method is called more than once for a
certain position, only the parameter created on the last call is
preserved - all the rest are discarded.
- Specified by:
createParameter
in interface org.omwg.ontology.Relation
- Parameters:
pos
- The position of the new Parameter for this Relation
- Returns:
- The newly created Parameter
- Throws:
org.wsmo.common.exception.InvalidModelException
org.wsmo.common.exception.SynchronisationException
getParameter
public org.omwg.ontology.Parameter getParameter(byte pos)
throws org.wsmo.common.exception.SynchronisationException
- retrieve the parameter at a given position
Note: the parameter must already exist (e.g. a call to createParameter() must precede this call)
- Specified by:
getParameter
in interface org.omwg.ontology.Relation
- Parameters:
pos
- The position of the parameter in interest
- Returns:
- a reference to the Parameter
- Throws:
org.wsmo.common.exception.SynchronisationException
- See Also:
createParameter(byte pos)
removeParameter
public void removeParameter(org.omwg.ontology.Parameter param)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- The positioning of the parameters is zero-based, i.e. the first parameter
is at position 0. The removal of parameters can only be performed from the
end of the list. Trying to remove a parameter followed by another parameter
will raise an exception.
- Specified by:
removeParameter
in interface org.omwg.ontology.Relation
- Parameters:
param
- The parameter to be removed
- Throws:
IllegalArgumentException
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException
removeParameter
public void removeParameter(byte pos)
throws org.wsmo.common.exception.SynchronisationException,
org.wsmo.common.exception.InvalidModelException
- The positioning of the parameters is zero-based, i.e. the first parameter
is at position 0. The removal of parameters can only be performed from the
end of the list. Trying to remove a parameter followed by another parameter
will raise an exception.
- Specified by:
removeParameter
in interface org.omwg.ontology.Relation
- Parameters:
pos
- The position of the parameter to be removed
- Throws:
IllegalArgumentException
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.