org.eclipse.higgins.framework.idas
Interface IContext


public interface IContext

As defined at http://spwiki.editme.com/Context and http://spwiki.editme.com/ContextProvider, This interface holds a set of IDigitalSubject objects.

TODO: Support update and deletion of attributes of contained Digital Subjects as allowed by the context's policy (R3 at http://spwiki.editme.com/ContextProvider). I (Jimse) think this should be the responsibility of an IDigitalSubject.
TODO: Provide the ability to export and import the contents of a context to an RDF data stream (R4 at http://spwiki.editme.com/ContextProvider)
TODO: Act as a container of references to sub-Contexts (R5 at http://spwiki.editme.com/ContextProvider)
TODO: Maintain (and return on request) the policies related to various kinds of access to Digital Subjects (R6 at http://spwiki.editme.com/ContextProvider)
TODO: Provide access to the schema which governs the form of Digital Subjects in this context (R7 at http://spwiki.editme.com/ContextProvider)
TODO: Should there be a removeDigitalSubject method which takes a filter? TODO: Add modify method(s)? Or perhaps modifications should happen on the IDigitalSubjects


Method Summary
 IDigitalSubject addDigitalSubject(IDigitalSubject ds)
          Adds an IDigitalSubject to this IContext.
 IDigitalSubject getDigitalSubject(String cuid)
          Search for IDigitalSubject of given name.
 Iterable<IDigitalSubject> getDigitalSubjects(String filter, Set<URI> attributeSelection)
          From this context, return IDigitalSubjects that match the specified filter
 void removeDigitalSubject(String cuid)
          Removes an IDigitalSubject from this IContext.
 

Method Detail

getDigitalSubject

IDigitalSubject getDigitalSubject(String cuid)
Search for IDigitalSubject of given name. This is effectively the same as calling getDigitalSubjects(filter, attributeSelection) with the filter set to

TODO: we need a way to present a properties constraint. This is to help providers which are gathering their data from expensive sources (i.e. ldap server). We don't want to cause multiple network hits, or extra data to be gathered.
TODO: discuss whether modifications to the returned IDigitalSubject affect the stored subject.

Parameters:
cuid - Contextually Unique ID of IDigitalSubject to find
Returns:
IDigitalSubject or null if not found

getDigitalSubjects

Iterable<IDigitalSubject> getDigitalSubjects(String filter,
                                             Set<URI> attributeSelection)
From this context, return IDigitalSubjects that match the specified filter

TODO: define filter format.

Parameters:
filter - Filter used to constrain the set of IDigitalSubjects returned. A null or empty value causes all IDigitalSubjects to be returned.
attributeSelection - The attributes on IDigitalSubject objects which will be read by the caller. An empty set or null indicates that all attributes will be read.
Returns:
An Iterable object for IDigitalSubjects

addDigitalSubject

IDigitalSubject addDigitalSubject(IDigitalSubject ds)
Adds an IDigitalSubject to this IContext.

TODO: specify an exception for name already exists.

Parameters:
ds - IDigitalSubject to add to this IContext
Returns:
The IDigitalSubject added or null on failure

removeDigitalSubject

void removeDigitalSubject(String cuid)
Removes an IDigitalSubject from this IContext.

Parameters:
cuid - Contextually Unique ID of IDigitalSubject to removed from this IContext