org.eclipse.higgins.idas
Interface IHasRelationships<T>

Type Parameters:
T - The type of object used to represent the relationship. This is typically an identifier.

This type is used to type the uses of IRelationship in this interface.

All Known Subinterfaces:
IContext, IDigitalSubject

public interface IHasRelationships<T>

Extended by interfaces which have relationships to other objects.


Method Summary
 void addRelationship(IRelationship<T> relationship)
          Adds the specified Relationship to this Object.
 IRelationship<T> createRelationship(java.net.URI type)
          Creates a relationship to another Object.
 java.lang.Iterable<IRelationship<T>> getRelationships()
          Returns the relationships this Object has to others.
 void removeRelationship(IRelationship<T> relationship)
          Removes the specified Relationship from this Object.
 

Method Detail

createRelationship

IRelationship<T> createRelationship(java.net.URI type)
                                    throws IdASException
Creates a relationship to another Object.

TODO: Specify whether this also adds the relationship to this Object, or if add must subsequently be called.

TODO: If this method also adds, note that updates to the returned IRelationship affect the added relationship.

Parameters:
type - The type of relationship. TODO: give example.
Returns:
The resulting Relationship.
Throws:
IdASException

addRelationship

void addRelationship(IRelationship<T> relationship)
                     throws IdASException
Adds the specified Relationship to this Object.

Parameters:
relationship - The Relationship to add.
Throws:
IdASException

removeRelationship

void removeRelationship(IRelationship<T> relationship)
                        throws IdASException
Removes the specified Relationship from this Object.

TODO: How does the Service Provider match relationships in order to do the remove?

Parameters:
relationship - The Relationship to remove.
Throws:
IdASException

getRelationships

java.lang.Iterable<IRelationship<T>> getRelationships()
                                                      throws IdASException
Returns the relationships this Object has to others.

Returns:
The set of Relationships this Object has.
Throws:
IdASException