org.omwg.ontology
Interface Relation

All Superinterfaces:
Entity, OntologyElement

public interface Relation
extends OntologyElement

Defines the requirements for an object that represents a WSMO relation.

Version:
$Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
Author:
not attributable
See Also:
RelationInstance

Method Summary
 void addRelationInstance(RelationInstance relInst)
          Adds a new RelationInstance to the set of instances of this relation The relation instance will also set this relation as the relation it is an instance of
 void addSubRelation(Relation subRel)
          Adds a new relation to the set of sub-relations of this relation The sub-relation will also add this relation to the list of its super-relations
 void addSuperRelation(Relation superRel)
          Adds a new relation to the set of super-relation of this relation The super-relation will also add this relation to the list of its sub-relations
 Parameter createParameter(byte pos)
          The positioning of the parameters is zero-based, i.e.
 Parameter getParameter(byte pos)
          retrieve the parameter at a given position Note: the parameter must already exist (e.g.
 List<Parameter> listParameters()
          Returns a list of this relation's parameters
 Set<RelationInstance> listRelationInstances()
          Returns a list of this relation's instances
 Set<Relation> listSubRelations()
          Lists the sub-relations of this relation
 Set<Relation> listSuperRelations()
          Lists the super-relations of this relation
 void removeParameter(byte pos)
          Removes a parameter from this relation's list of attributes.
 void removeParameter(Parameter param)
          The positioning of the parameters is zero-based, i.e.
 void removeRelationInstance(RelationInstance relInst)
          Removes a relation instance from the set of instances of this relation The relation instance will also set null for as the relation it is an instance of
 void removeSubRelation(Relation subRel)
          Removes a relation from the set of sub-relations of this relation The sub-relation will also remove this relation from the list of its super-relations
 void removeSuperRelation(Relation superRel)
          Removes a relation from the set of super-relations of this relation The super-relation will also remove this relation from the list of its sub-relations
 
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

addSuperRelation

void addSuperRelation(Relation superRel)
                      throws SynchronisationException,
                             InvalidModelException
Adds a new relation to the set of super-relation of this relation The super-relation will also add this relation to the list of its sub-relations

Parameters:
superRel - The new super-relation to be added.
Throws:
SynchronisationException
InvalidModelException
See Also:
removeSuperRelation(Relation superRel)

removeSuperRelation

void removeSuperRelation(Relation superRel)
                         throws SynchronisationException,
                                InvalidModelException
Removes a relation from the set of super-relations of this relation The super-relation will also remove this relation from the list of its sub-relations

Parameters:
superRel - The super-relation to be removed
Throws:
SynchronisationException
InvalidModelException

listSuperRelations

Set<Relation> listSuperRelations()
                                 throws SynchronisationException
Lists the super-relations of this relation

Returns:
The set of super-relation for this relation
Throws:
SynchronisationException

addSubRelation

void addSubRelation(Relation subRel)
                    throws SynchronisationException,
                           InvalidModelException
Adds a new relation to the set of sub-relations of this relation The sub-relation will also add this relation to the list of its super-relations

Parameters:
subRel - The new sub-relation to be added.
Throws:
SynchronisationException
InvalidModelException
See Also:
removeSubRelation(Relation subRel)

removeSubRelation

void removeSubRelation(Relation subRel)
                       throws SynchronisationException,
                              InvalidModelException
Removes a relation from the set of sub-relations of this relation The sub-relation will also remove this relation from the list of its super-relations

Parameters:
subRel - The sub-concept to be removed
Throws:
SynchronisationException
InvalidModelException

listSubRelations

Set<Relation> listSubRelations()
                               throws SynchronisationException
Lists the sub-relations of this relation

Returns:
The set of sub-relations defined by this ontology.
Throws:
SynchronisationException

createParameter

Parameter createParameter(byte pos)
                          throws SynchronisationException,
                                 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.

Parameters:
pos - The position of the new Parameter for this Relation
Throws:
SynchronisationException
InvalidModelException
See Also:
removeParameter(Parameter param), removeParameter(byte pos), getParameter(byte pos)

getParameter

Parameter getParameter(byte pos)
                       throws SynchronisationException
retrieve the parameter at a given position Note: the parameter must already exist (e.g. a call to createParameter() must precede this call)

Parameters:
pos - The position of the parameter in interest
Returns:
a reference to the Parameter
Throws:
SynchronisationException
See Also:
createParameter(byte pos)

removeParameter

void removeParameter(Parameter param)
                     throws SynchronisationException,
                            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.

Parameters:
param - The parameter to be removed
Throws:
SynchronisationException
InvalidModelException
See Also:
removeParameter(byte pos)

removeParameter

void removeParameter(byte pos)
                     throws SynchronisationException,
                            InvalidModelException
Removes a parameter from this relation's list of attributes.

Parameters:
pos - The position of the parameter to be removed
Throws:
SynchronisationException
InvalidModelException
See Also:
removeParameter(Parameter param)

listParameters

List<Parameter> listParameters()
                               throws SynchronisationException
Returns a list of this relation's parameters

Returns:
The list of this relation's parameters
Throws:
SynchronisationException
See Also:
Parameter

addRelationInstance

void addRelationInstance(RelationInstance relInst)
                         throws SynchronisationException,
                                InvalidModelException
Adds a new RelationInstance to the set of instances of this relation The relation instance will also set this relation as the relation it is an instance of

Parameters:
relInst - The new instance to be added.
Throws:
SynchronisationException
InvalidModelException
See Also:
removeRelationInstance(RelationInstance relInst), RelationInstance.setRelation(Relation memberOf)

removeRelationInstance

void removeRelationInstance(RelationInstance relInst)
                            throws SynchronisationException,
                                   InvalidModelException
Removes a relation instance from the set of instances of this relation The relation instance will also set null for as the relation it is an instance of

Parameters:
relInst - The instance to be removed
Throws:
SynchronisationException
InvalidModelException
See Also:
RelationInstance.setRelation(Relation memberOf)

listRelationInstances

Set<RelationInstance> listRelationInstances()
                                            throws SynchronisationException
Returns a list of this relation's instances

Returns:
The list of this relation's instances
Throws:
SynchronisationException
See Also:
RelationInstance


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