|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
As defined at http://spwiki.editme.com/Context and http://spwiki.editme.com/ContextProvider, This interface holds a set of IDigitalSubject objects.
| Method Summary | |
|---|---|
IContextRelationship |
addRelationship(URI relationshipType)
Adds a context relationship to this context. |
IDigitalSubject |
addSubject(IDigitalSubject copyFrom)
Creates a new Digital Subject for this Context by copying the data from the passed subject Note: This operation is only applied to any backing data store after applyUpdates() is called. |
IDigitalSubject |
addSubject(URI type,
String subjectID)
Creates a new Digital Subject for this Context. This call is typically followed by one or more calls to IHasAttributes.addAttribute(java.net.URI), IHasMetadata.addMetadata(java.net.URI)
on the returned IDigitalSubject
Note: This operation is only applied to any backing data
store after applyUpdates() |
void |
applyUpdates()
Applies all update operations which have been called on this Context and called on any element held by this Context (including digital subjects, metadata, attributes, attribute metadata and it's value(s), and attribute values) to a backing data store. |
IAttribute |
buildAttribute(URI attrID)
Builds an IAttribute (unassociated with any digital subject). |
IFilterAttributeAssertion |
buildAttributeAssertion()
Builds an assertion for Digital Subject Attributes (see IHasAttributes.getAttributes() and IHasAttributes.getAttribute(URI))
which can be passed to IFilter.setAssertion(IFilterAssertion) |
IAuthNAttributesMaterials |
buildAuthNAttributesMaterials()
Builds an IAuthNAttributesMaterials that may be used when calling open(Object) |
IComplexAttrValue |
buildComplexAttrValue(URI type)
Builds a complex attribute value to be passed to IFilterAttributeAssertion.setAssertionValue(IAttributeValue). |
IFilterCUIDAssertion |
buildCUIDAssertion()
Builds an assertion for Digital Subject CUIDs (see IDigitalSubject.getSubjectID())
which can be passed to IFilter.setAssertion(IFilterAssertion) |
IFilter |
buildFilter()
Builds an IFilter instance that may be used when calling getSubjects(IFilter) |
IFilterMetadataAssertion |
buildMetadataAssertion()
Builds an assertion for Digital Subject Metadata (see IHasMetadata.getMetadataSet())
which can be passed to IFilter.setAssertion(IFilterAssertion) |
IContextRelationship |
buildRelationship(URI type)
Builds a relationship to be passed to addRelationship(URI). |
ISimpleAttrValue |
buildSimpleAttrValue(URI type,
Object value)
Builds a simple attribute value to be passed to IFilterAttributeAssertion.setAssertionValue(IAttributeValue). |
IFilterTypeAssertion |
buildTypeAssertion()
Builds an assertion for Digital Subject Types (see IDigitalSubject.getType())
which can be passed to IFilter.setAssertion(IFilterAssertion) |
void |
cancelUpdates()
Cancels all update operations which have been called on this Context and called on any element held by this Context (including digital subjects, metadata, attributes, attribute metadata and it's value(s), and attribute values). |
void |
close()
Closes this Context and returns it to an un-open state. |
String |
exportData(String filter,
String representationFormat)
Exports this Context. |
IContextModel |
getContextModel()
Returns a model of the context object as it defined in the context's schema. |
URI |
getContextRef()
Returns a reference to this Context. |
IModel |
getModel(URI elementType)
Returns a model of whatever is named by the passed identifier |
Iterator |
getRelationships()
Returns the relationships this Object has to others. |
String |
getSchema()
Returns the schema governing this context. |
IDigitalSubject |
getSubject(String cuid)
This is the same as passing null as the attrSelectionList in getSubject(String, Iterator) |
IDigitalSubject |
getSubject(String cuid,
Iterator attrSelectionList)
Returns the Digital Subject matching the specified cuid. |
Iterator |
getSubjects(IFilter filter)
|
Iterator |
getSubjects(IFilter filter,
Iterator attrSelectionList)
From this context, return IDigitalSubjects that match the specified filter |
void |
importData(String filter,
String representationFormat)
Imports this Context. |
boolean |
isOpen(Object identity)
Tests whether this context is open and authenticated using the specified identity |
String |
open(Object authentication)
Opens this Context using the provided authentication object. |
void |
setSchema(String schema)
Sets the schema governing this context. |
boolean |
verifySubjectAttributes(String cuid,
Iterator attributes)
Simple method for comparing a set of attribute assertions against a Digital Subject. |
| Method Detail |
public String open(Object authentication)
throws IdASException,
ContextOpenException
Upon success (return with no exception), this Context is in an "open" state
and is available to have other methods called (such as
addRelationship(URI),
addSubject(URI, String),
exportData(String, String),
getRelationships(),
getSubject(String),
getSubject(String, Iterator),
getSubjects(IFilter),
getSubjects(IFilter, Iterator),
importData(String, String),
verifySubjectAttributes(String, Iterator)}
).
Methods requiring the context to be open throw ContextNotOpenException
when in an un-open state.
An open state specifies that the specified authentication materials have been used to successfully authenticate to this Context.
If this IContext is already in an open state, this throws ContextOpenException.
The antithesis of this method is close().
authentication - AuthN object used to open the context. This may be an instance of IAuthNAttributesMaterials or some other object used to authenticate.
IdASException
ContextOpenException, - AuthenticationException
ContextOpenExceptionclose()
public void close()
throws IdASException
Methods requiring the context to be open throw ContextNotOpenException when in an un-open state.
IdASException
public boolean isOpen(Object identity)
throws IdASException
identity - May be .
When provided, asserts that this context was opened with the specified identity.
When (@code null), no identity check is performed.
IdASException
public String getSchema()
throws IdASException
TODO (Doc): Add pointers to OWL.
TODO (Doc): Add (or point to) documentation which includes sample schema.
TODO (Arch)(Impl): Add method(s) which return the schema as a stream, DOM document, or other iterable object.
String in OWL-DL format.
IdASException
public void setSchema(String schema)
throws IdASException
TODO (Doc): Add pointers to OWL.
TODO (Doc): Add (or point to) documentation which includes sample schema.
TODO (Arch)(Impl): Add method(s) which take the schema as a stream, DOM document, or other iterable object.
schema - a String in OWL-DL format.
IdASException
public IContextModel getContextModel()
throws IdASException
IdASException
public IModel getModel(URI elementType)
throws IdASException
elementType - A URI that names a type of element (this could
be an attribute ID, attribute value type, etc.)
IdASException
public URI getContextRef()
throws IdASException
IdASException
public String exportData(String filter,
String representationFormat)
throws IdASException
TODO (Arch): filter format TBD
TODO (Arch): Does this export only Digital Subjects, or the entire Context (Metadata, Schema, DS, Relationships)?
filter - May be . Used to select a subset of this Context to be exported.representationFormat - Indicates the format of the string to be returned. TODO (Arch)(Doc): Specify format type. Give example
IdASException
public void importData(String filter,
String representationFormat)
throws IdASException
TODO (Arch): filter format TBD
TODO (Arch): Does this import only Digital Subjects, or the entire Context (Metadata, Schema, DS, Relationships)? TODO (Arch)(Doc): Discuss collisions.
filter - May be . Used to select a subset of the external data set to be imported.representationFormat - Indicates the format of the external data string being specified in external. TODO (Arch)(Doc): Specify format type. Give example
IdASException
public IAuthNAttributesMaterials buildAuthNAttributesMaterials()
throws IdASException
IAuthNAttributesMaterials that may be used when calling open(Object)
IdASException
public IAttribute buildAttribute(URI attrID)
throws IdASException
IAuthNAttributesMaterials
attrID -
IAttribute
IdASException
public IFilter buildFilter()
throws IdASException
getSubjects(IFilter)
IdASException
public IFilterAttributeAssertion buildAttributeAssertion()
throws IdASException
IHasAttributes.getAttributes() and IHasAttributes.getAttribute(URI))
which can be passed to IFilter.setAssertion(IFilterAssertion)
IdASException
public IFilterCUIDAssertion buildCUIDAssertion()
throws IdASException
IDigitalSubject.getSubjectID())
which can be passed to IFilter.setAssertion(IFilterAssertion)
IdASException
public IFilterMetadataAssertion buildMetadataAssertion()
throws IdASException
IHasMetadata.getMetadataSet())
which can be passed to IFilter.setAssertion(IFilterAssertion)
IdASException
public IFilterTypeAssertion buildTypeAssertion()
throws IdASException
IDigitalSubject.getType())
which can be passed to IFilter.setAssertion(IFilterAssertion)
IdASException
public ISimpleAttrValue buildSimpleAttrValue(URI type,
Object value)
throws IdASException,
InvalidTypeException
IFilterAttributeAssertion.setAssertionValue(IAttributeValue).Example:
IAttributeValue value = buildSimpleValue("http://www.w3.org/2001/XMLSchema/normalizedString", new String("Some Value"));
type - The type for the simple valuevalue - The value for the simple type.
IdASException
InvalidTypeException
public IComplexAttrValue buildComplexAttrValue(URI type)
throws IdASException,
InvalidTypeException
IFilterAttributeAssertion.setAssertionValue(IAttributeValue).Example:
TODO: do an example of building this and then adding some attributes
type - The type for the simple value
IdASException
InvalidTypeException
public IContextRelationship buildRelationship(URI type)
throws IdASException
addRelationship(URI).
type - The type of relationship. TODO (Doc): give example.
IdASException
public IDigitalSubject addSubject(URI type,
String subjectID)
throws IdASException,
InvalidTypeException,
InvalidSubjectIDException,
SubjectExistsException
IHasAttributes.addAttribute(java.net.URI), IHasMetadata.addMetadata(java.net.URI)
on the returned IDigitalSubject
Note: This operation is only applied to any backing data
store after applyUpdates()
type - The URI specifying the type of Digital Subject being createdsubjectID - May be null. When specified, uniquely names the subject within
this Context. When null, indicates that the caller plans to later add an
attribute or attributes which will be used to construct the unique subject ID
applyUpdates()
InvalidTypeException - when the type is invalid
InvalidSubjectIDException - when the subjectID is invalid
SubjectExistsException - when the subjectID is known to already exist
IdASException
public IDigitalSubject addSubject(IDigitalSubject copyFrom)
throws IdASException,
SubjectExistsException
applyUpdates() is called.
copyFrom - an IDigitalSubject from which data is copied to construct a new
Digital Subject
applyUpdates() is called.
SubjectExistsException - when Subject is known to already exist
IdASException
public IDigitalSubject getSubject(String cuid)
throws IdASException
getSubject(String, Iterator)
IdASExceptiongetSubject(String, Iterator)
public IDigitalSubject getSubject(String cuid,
Iterator attrSelectionList)
throws IdASException
getSubjects(org.eclipse.higgins.idas.api.IFilter) with
the filter set to TODO (Arch)(Doc): discuss whether modifications to the returned IDigitalSubject affect the stored subject.
cuid - Contextually Unique ID of Digital Subject to return.attrSelectionList - Iterator holding the URIs of IAttribute types
that the caller expects to access.
A indicates that all attributes will be read.
An empty set indicates that no attributes will be read.
IdASException - (typically a subclass of. See below).
NoSuchSubjectException - when subject specified by cuid is not found.
public Iterator getSubjects(IFilter filter)
throws IdASException
IDigitalSubjects that match the filter
IdASExceptionThis is the same as passing null as the attrSelectionList in {@link #getSubjects(IFilter, Iterator)}
public Iterator getSubjects(IFilter filter,
Iterator attrSelectionList)
throws IdASException
IDigitalSubjects that match the specified filter
filter - Filter used to constrain the set of IDigitalSubjects returned.
A or empty filter causes all IDigitalSubjects to be returned.attrSelectionList - Iterator of URIs of IAttribute types that the caller expects to access. A indicates that all attributes will be read. An empty set indicates that no attributes will be read.
IDigitalSubjects that match the filter
IdASException
public boolean verifySubjectAttributes(String cuid,
Iterator attributes)
throws IdASException
TODO (Arch): This doesn't leave a way to verify that a DS representing a group contains a specific member in its member value. We may want to consider allowing a filter to be passed here, or at least a partial attribute.
cuid - Contextually Unique ID of Digital Subject being verified.attributes - Iterator of IAttribute to be compared to the Digital Subject specified by cuid.
IdASException - (typically a subclass of. See below).
NoSuchSubjectException - when subject specified by cuid is not found.
public Iterator getRelationships()
throws IdASException
IdASException
public IContextRelationship addRelationship(URI relationshipType)
throws IdASException
IContextRelationship.addRelatedContext(URI)
Note: This operation is only applied to any backing data
store after applyUpdates() is called.
relationshipType - The type of relationship to add.
IdASException
public void applyUpdates()
throws IdASException
addSubject(URI, String)IDigitalSubject.remove()IHasAttributes.addAttribute(URI)IHasMetadata.addMetadata(URI)IAttribute.remove()IAttribute.addValue(URI)IAttribute.addSimpleValue(URI, Object)IAttribute.addComplexValue(URI)IAttributeValue.remove()ITypedValue.setData(Object)ITypedValue.setData(Object)
IdASException
public void cancelUpdates()
throws IdASException
applyUpdates()) are not canceled.
IdASExceptionapplyUpdates()
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||