org.eclipse.higgins.idas.spi
Class BasicMetadata

java.lang.Object
  extended byorg.eclipse.higgins.idas.spi.BasicMetadata
All Implemented Interfaces:
org.eclipse.higgins.idas.api.IMetadata

public class BasicMetadata
extends Object
implements org.eclipse.higgins.idas.api.IMetadata

Implements IMetadata


Constructor Summary
BasicMetadata(org.eclipse.higgins.idas.api.IMetadata copyFrom, IMetadataContainer container, org.eclipse.higgins.idas.api.IContext context)
          Note that the container's updateNotification is not called while the values in copyFrom are being copied.
BasicMetadata(URI metaID, IMetadataContainer container)
           
BasicMetadata(URI metaID, org.eclipse.higgins.idas.api.IMetadataValue value, IMetadataContainer container, org.eclipse.higgins.idas.api.IContext context)
           
BasicMetadata(URI metaID, Iterator values, IMetadataContainer container, org.eclipse.higgins.idas.api.IContext context)
          Note that the container's updateNotification is not called while the IValues in values are being added.
 
Method Summary
 org.eclipse.higgins.idas.api.IComplexMetaValue addComplexValue(URI type)
           
 org.eclipse.higgins.idas.api.ISimpleMetaValue addSimpleValue(URI type, Object data)
           
 org.eclipse.higgins.idas.api.IMetadataValue addValue(org.eclipse.higgins.idas.api.IMetadataValue copyFrom)
           
 org.eclipse.higgins.idas.api.IMetadataValue addValue(URI type)
           
 boolean equals(org.eclipse.higgins.idas.api.IMetadata meta)
           
 IMetadataContainer getContainer()
           
 URI getMetaID()
           
 org.eclipse.higgins.idas.api.model.IMetadataModel getModel()
           
 Iterator getValues()
           
 boolean isSingleValued()
           
 void remove()
           
 void setContainer(IMetadataContainer container)
           
 void updateNotification(MetadataValueNotification metaValueNotif)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicMetadata

public BasicMetadata(org.eclipse.higgins.idas.api.IMetadata copyFrom,
                     IMetadataContainer container,
                     org.eclipse.higgins.idas.api.IContext context)
              throws org.eclipse.higgins.idas.api.IdASException
Note that the container's updateNotification is not called while the values in copyFrom are being copied.

Parameters:
copyFrom - IMetadata from which to copy data from
container - May be null. IMetadataContainer to send update notifications to.
context - May be null. IContext instance from which a model may be obtained if needed.
Throws:
org.eclipse.higgins.idas.api.IdASException

BasicMetadata

public BasicMetadata(URI metaID,
                     IMetadataContainer container)
              throws org.eclipse.higgins.idas.api.IdASException
Parameters:
metaID - the URI of the metadata's type
container - May be null. IMetadataContainer to send update notifications to.
Throws:
org.eclipse.higgins.idas.api.IdASException

BasicMetadata

public BasicMetadata(URI metaID,
                     org.eclipse.higgins.idas.api.IMetadataValue value,
                     IMetadataContainer container,
                     org.eclipse.higgins.idas.api.IContext context)
              throws org.eclipse.higgins.idas.api.IdASException
Parameters:
metaID - the URI of the metadata's type
value - an IMetadataValue (either simple or complex) to store with the metadata
container - May be null. IMetadataContainer to send update notifications to.
context - May be null. IContext instance from which a model may be obtained if needed.
Throws:
org.eclipse.higgins.idas.api.IdASException

BasicMetadata

public BasicMetadata(URI metaID,
                     Iterator values,
                     IMetadataContainer container,
                     org.eclipse.higgins.idas.api.IContext context)
              throws org.eclipse.higgins.idas.api.IdASException
Note that the container's updateNotification is not called while the IValues in values are being added.

Parameters:
metaID -
values - Contains IMetadataValues
container - May be null. IMetadataContainer to send update notifications to.
context - May be null. IContext instance from which a model may be obtained if needed.
Throws:
org.eclipse.higgins.idas.api.IdASException
Method Detail

getMetaID

public URI getMetaID()
              throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getMetaID in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException

getValues

public Iterator getValues()
                   throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getValues in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException

getModel

public org.eclipse.higgins.idas.api.model.IMetadataModel getModel()
                                                           throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getModel in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException

addComplexValue

public org.eclipse.higgins.idas.api.IComplexMetaValue addComplexValue(URI type)
                                                               throws org.eclipse.higgins.idas.api.IdASException,
                                                                      org.eclipse.higgins.idas.api.InvalidTypeException
Specified by:
addComplexValue in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

addSimpleValue

public org.eclipse.higgins.idas.api.ISimpleMetaValue addSimpleValue(URI type,
                                                                    Object data)
                                                             throws org.eclipse.higgins.idas.api.IdASException,
                                                                    org.eclipse.higgins.idas.api.InvalidTypeException
Specified by:
addSimpleValue in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

addValue

public org.eclipse.higgins.idas.api.IMetadataValue addValue(URI type)
                                                     throws org.eclipse.higgins.idas.api.IdASException,
                                                            org.eclipse.higgins.idas.api.InvalidTypeException
Specified by:
addValue in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

addValue

public org.eclipse.higgins.idas.api.IMetadataValue addValue(org.eclipse.higgins.idas.api.IMetadataValue copyFrom)
                                                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
addValue in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException

remove

public void remove()
            throws org.eclipse.higgins.idas.api.IdASException
Specified by:
remove in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException

isSingleValued

public boolean isSingleValued()
Specified by:
isSingleValued in interface org.eclipse.higgins.idas.api.IMetadata

updateNotification

public void updateNotification(MetadataValueNotification metaValueNotif)
                        throws org.eclipse.higgins.idas.api.IdASException
Throws:
org.eclipse.higgins.idas.api.IdASException

setContainer

public void setContainer(IMetadataContainer container)

getContainer

public IMetadataContainer getContainer()

equals

public boolean equals(org.eclipse.higgins.idas.api.IMetadata meta)
               throws org.eclipse.higgins.idas.api.IdASException
Specified by:
equals in interface org.eclipse.higgins.idas.api.IMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException