Overview | Package | Class | Tree | Deprecated | Index | Help
| SMILA API documentation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.smila.datamodel.impl
Class RecordImpl

    java.lang.Object
      org.eclipse.smila.datamodel.impl.RecordImpl

All Implemented Interfaces:
  java.io.Serializable, Record

    public class RecordImpl

extends java.lang.Object
implements Record, java.io.Serializable

Default implementation of SMILA Records.

Author:
  jschumacher
See Also:
  Serialized Form

Field Summary

Fields inherited from interface org.eclipse.smila.datamodel.Record
`RECORD_ID, SOURCE`

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.
`DataFactory` | `getFactory()` get record factory to use for adding objects to this record.
`java.lang.String` | `getId()` Get the ID of this record.
`AnyMap` | `getMetadata()` Get the metadata of this record.
`java.lang.String` | `getSource()` Get the data source 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(java.lang.String id)` Set the ID of this record.
`void` | `setSource(java.lang.String source)` Set the data source of this record.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getId

    public java.lang.String getId()

  Get the ID of this record.

  Specified by:
    `getId` in interface `Record`
  Returns:
    record ID

### getSource

    public java.lang.String getSource()

  Get the data source of this record.

  Specified by:
    `getSource` in interface `Record`
  Returns:
    data source

### getMetadata

    public AnyMap getMetadata()

  Get the metadata of this record. Contains attributes and other properties of this record.

  Specified by:
    `getMetadata` in interface `Record`
  Returns:
    the metadata describing this record.

### attachmentSize

    public int attachmentSize()

  get number of attachments.

  Specified by:
    `attachmentSize` in interface `Record`
  Returns:
    number of attachments.

### getAttachment

    public byte[] getAttachment(java.lang.String name)

  get attachment value for the specified name.

  Specified by:
    `getAttachment` in interface `Record`
  Parameters:
    `name` - attachment name.
  Returns:
    attachment value.

### getAttachmentNames

    public java.util.Iterator<java.lang.String> getAttachmentNames()

  Get iterator on names of attachments of this record. Returns empty iterator if record has no attachments.

  Specified by:
    `getAttachmentNames` in interface `Record`
  Returns:
    iterator on attachment names.

### hasAttachments

    public boolean hasAttachments()

  check if this record has attachments.

  Specified by:
    `hasAttachments` in interface `Record`
  Returns:
    true if this record has attachments, else false.

### hasAttachment

    public boolean hasAttachment(java.lang.String name)

  check if this record has an attachment of the specified name.

  Specified by:
    `hasAttachment` in interface `Record`
  Parameters:
    `name` - attachment name.
  Returns:
    true if this record has an attachment for this name, else false.

### removeAttachment

    public void removeAttachment(java.lang.String name)

  remove attachment for specified name.

  Specified by:
    `removeAttachment` in interface `Record`
  Parameters:
    `name` - attachment name.

### removeAttachments

    public void removeAttachments()

  remove attachments.

  Specified by:
    `removeAttachments` in interface `Record`

### setAttachment

    public void setAttachment(java.lang.String name,
                              byte[] attachment)

  set attachment value for the specified name.

  Specified by:
    `setAttachment` in interface `Record`
  Parameters:
    `name` - attachment name.
    `attachment` - attachment value.

### setId

    public void setId(java.lang.String id)

  Set the ID of this record.

  Specified by:
    `setId` in interface `Record`
  Parameters:
    `id` - new record ID

### setSource

    public void setSource(java.lang.String source)

  Set the data source of this record.

  Specified by:
    `setSource` in interface `Record`
  Parameters:
    `source` - data source

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getFactory

    public DataFactory getFactory()

  get record factory to use for adding objects to this record.

  Specified by:
    `getFactory` in interface `Record`
  Returns:
    record factory for this record.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SMILA API documentation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD