SMILA (incubation) API documentation

org.eclipse.smila.datamodel.record
Interface Record

All Known Implementing Classes:
RecordImpl

public interface Record

SMILA record interface. This is the main object that describes entities that are created and processed in the system.

Author:
jschumacher

Method Summary
 int attachmentSize()
          get number of attachments.
 byte[] getAttachment(java.lang.String name)
          get attachment value for the specified name.
 java.util.Iterator<java.lang.String> getAttachmentNames()
          Get iterator on names of attachments of this record.
 RecordFactory getFactory()
          get record factory to use for adding objects to this record.
 Id getId()
          Get the ID of this record.
 MObject getMetadata()
          Get the metadata object of this record.
 boolean hasAttachment(java.lang.String name)
          check if this record has an attachment of the specified name.
 boolean hasAttachments()
          check if this record has attachments.
 void removeAttachment(java.lang.String name)
          remove attachment for specified name.
 void removeAttachments()
          remove attachments.
 void setAttachment(java.lang.String name, byte[] attachment)
          set attachment value for the specified name.
 void setId(Id id)
          Set the ID of this record.
 void setMetadata(MObject metadata)
          Set the metadata object of this record.
 

Method Detail

getFactory

RecordFactory getFactory()
get record factory to use for adding objects to this record.

Returns:
record factory for this record.

getId

Id getId()
Get the ID of this record.

Returns:
record ID

setId

void setId(Id id)
Set the ID of this record.

Parameters:
id - new record ID

getMetadata

MObject getMetadata()
Get the metadata object of this record. Contains attributes and annotations about this record.

Returns:
the metadata object describing this record.

setMetadata

void setMetadata(MObject metadata)
Set the metadata object of this record.

Parameters:
metadata - new metadata object describing this record.

hasAttachments

boolean hasAttachments()
check if this record has attachments.

Returns:
true if this record has attachments, else false.

hasAttachment

boolean hasAttachment(java.lang.String name)
check if this record has an attachment of the specified name.

Parameters:
name - attachment name.
Returns:
true if this record has an attachment for this name, else false.

attachmentSize

int attachmentSize()
get number of attachments.

Returns:
number of attachments.

getAttachmentNames

java.util.Iterator<java.lang.String> getAttachmentNames()
Get iterator on names of attachments of this record. Returns empty iterator if record has no attachments.

Returns:
iterator on attachment names.

getAttachment

byte[] getAttachment(java.lang.String name)
get attachment value for the specified name.

Parameters:
name - attachment name.
Returns:
attachment value.

setAttachment

void setAttachment(java.lang.String name,
                   byte[] attachment)
set attachment value for the specified name.

Parameters:
name - attachment name.
attachment - attachment value.

removeAttachment

void removeAttachment(java.lang.String name)
remove attachment for specified name.

Parameters:
name - attachment name.

removeAttachments

void removeAttachments()
remove attachments.


SMILA (incubation) API documentation