org.eclipse.higgins.idas
Interface IHasMetadata

All Known Subinterfaces:
IAttribute, IContext, IContextFactory, IDigitalSubject, IRelationship<T>
All Known Implementing Classes:
BasicAttribute, BasicMetadataSet

public interface IHasMetadata

Extended by interfaces which have metadata associated with them.

TODO: Add (or point to) doc which explains metadata.


Method Summary
 void addMetadata(IMetadata metadata)
           
 IMetadata createMetadata(java.net.URI type, IPropertyValue value)
          Creates a metadata item which can be added to metadata held by this Object.
 java.lang.Iterable<IMetadata> getMetadataSet()
          Returns this Object's metadata elements as an Iterable.
 void removeMetadata(IMetadata metadata)
           
 

Method Detail

createMetadata

IMetadata createMetadata(java.net.URI type,
                         IPropertyValue value)
                         throws IdASException
Creates a metadata item which can be added to metadata held by this Object.

Parameters:
type - The type of metadata. This defines the datatype of the value.
value - The value of this metadata. The type of this is determined by the type arg.
Returns:
The created metadata item.
Throws:
IdASException - TODO: Specify whether this also adds the produced IMetadata to this Object, or if addItem must subsequently be called.

TODO: If this method also adds, note that updates to the returned IMetadata affect the added item (i.e. a reference, not a copy is stored).


addMetadata

void addMetadata(IMetadata metadata)
                 throws IdASException
Throws:
IdASException

removeMetadata

void removeMetadata(IMetadata metadata)
                    throws IdASException
Throws:
IdASException

getMetadataSet

java.lang.Iterable<IMetadata> getMetadataSet()
                                             throws IdASException
Returns this Object's metadata elements as an Iterable. TODO: Consider overloading to take a metadata type (gets all metadata of that type)

Throws:
IdASException