org.eclipse.higgins.idas.impl
Class BasicMetadataSet
java.lang.Object
org.eclipse.higgins.idas.impl.BasicMetadataSet
- All Implemented Interfaces:
- IHasMetadata
public class BasicMetadataSet
- extends Object
- implements IHasMetadata
Implements IHasMetadata
using a HashSet
. This is used by other basic implementations which implement subinterfaces of IHasMetadata
.
BasicMetadataSet
public BasicMetadataSet()
BasicMetadataSet
public BasicMetadataSet(HashSet<IMetadata> metadataSet)
createMetadata
public IMetadata createMetadata(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 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()
Copyright © 2006 Novell Inc. All Rights Reserved.
This program and the accompanying materials are made available
under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Jim Sermersheim (Novell, Inc.) - initial API and implementation