org.eclipse.higgins.idas.api
Interface IContextRelation

All Superinterfaces:
IHasMetadata

public interface IContextRelation
extends IHasMetadata

Represents a relationship to another IContext.

TODO (Doc): add javadoc to methods.


Method Summary
 void addRelatedContext(URI contextID)
          Adds the specified context ID as a related context Note: This operation is only applied to any backing data store after IContext.applyUpdates() is called.
 Iterator getRelatedObjects()
           
 URI getType()
          Returns this relationship's type.
 void remove()
          Removes this entire IContextRelation from its containing IContext Note: This operation is only applied to any backing data store after IContext.applyUpdates() is called.
 void removeRelatedContext(URI contextID)
          Removes the specified context ID as a related context Note: This operation is only applied to any backing data store after IContext.applyUpdates() is called.
 
Methods inherited from interface org.eclipse.higgins.idas.api.IHasMetadata
addMetadata, addMetadata, equals, getMetadata, getMetadataSet
 

Method Detail

addRelatedContext

public void addRelatedContext(URI contextID)
                       throws IdASException
Adds the specified context ID as a related context Note: This operation is only applied to any backing data store after IContext.applyUpdates() is called.

Parameters:
contextID - the context ID of the specified related context to be added
Throws:
IdASException

removeRelatedContext

public void removeRelatedContext(URI contextID)
                          throws IdASException
Removes the specified context ID as a related context Note: This operation is only applied to any backing data store after IContext.applyUpdates() is called.

Parameters:
contextID - the context ID of the specified related context to be removed
Throws:
IdASException

remove

public void remove()
Removes this entire IContextRelation from its containing IContext Note: This operation is only applied to any backing data store after IContext.applyUpdates() is called.

Throws:
{@link - IdASException}

getType

public URI getType()
            throws IdASException
Returns this relationship's type.

TODO (Doc): Add (or point at) doc which explains relationship types. TODO (Doc): Add example types. Possibly some that denote hierarchy (parent, child, sibling).

Returns:
A URI representing this relationship's type.
Throws:
IdASException

getRelatedObjects

public Iterator getRelatedObjects()
                           throws IdASException
Returns:
Iterator of URI. Each representing a related context ID
Throws:
IdASException