org.eclipse.higgins.idas.impl
Class BasicMetadataSet
java.lang.Object
org.eclipse.higgins.idas.impl.BasicMetadataSet
- All Implemented Interfaces:
- IHasMetadata
public class BasicMetadataSet
- extends java.lang.Object
- implements IHasMetadata
Implements IHasMetadata
using a HashSet
. This is used by other basic implementations which implement subinterfaces of IHasMetadata
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicMetadataSet
public BasicMetadataSet()
BasicMetadataSet
public BasicMetadataSet(java.util.HashSet<IMetadata> metadataSet)
createMetadata
public IMetadata createMetadata(java.net.URI type,
IPropertyValue value)
throws IdASException
- Description copied from interface:
IHasMetadata
- Creates a metadata item which can be added to metadata held by this Object.
- Specified by:
createMetadata
in interface IHasMetadata
- 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).
- See Also:
IHasMetadata.createMetadata(URI, IPropertyValue)
addMetadata
public void addMetadata(IMetadata metadata)
throws IdASException
- Specified by:
addMetadata
in interface IHasMetadata
- Throws:
IdASException
- See Also:
IHasMetadata.addMetadata(IMetadata)
removeMetadata
public void removeMetadata(IMetadata metadata)
throws IdASException
- Specified by:
removeMetadata
in interface IHasMetadata
- Throws:
IdASException
- See Also:
IHasMetadata.removeMetadata(IMetadata)
getMetadataSet
public java.lang.Iterable<IMetadata> getMetadataSet()
throws IdASException
- Description copied from interface:
IHasMetadata
- Returns this Object's metadata elements as an Iterable.
TODO: Consider overloading to take a metadata type (gets all metadata of that type)
- Specified by:
getMetadataSet
in interface IHasMetadata
- Throws:
IdASException
- See Also:
IHasMetadata.getMetadataSet()