Novell exteNd
Director 5.2 API

com.sssw.cm.api
Interface EbiDocExtnMeta

All Superinterfaces:
Cloneable, EbiCmElement, EbiElement, EbiFrameworkElement, Serializable

public interface EbiDocExtnMeta
extends EbiCmElement

A Document Extension Meta is a holder of a set of individual Extension Meta Info's (EbiDocExtnMetaInfo's).

Each info represents a mapping of a document extension metadata field to the set of its values, e.g. for a movie review document, there may be a meta info for the field "Genre" whose values may be the set of "Drama", "Tragedy", and "Tearjerker".

An Extension Meta object is created for a specific Document and must contain meta info's for all of the fields defined on the Document Type to which the Document belongs.

Extension Meta's are used by Content Manager when Document's are created and also when the extension metadata of these Document's is updated.

An example 'snapshot' of an Extension Meta for a movie review would look as follows:
Document ID: 10

Genre

Drama, Romance

Tagline

In a perfect world...they never would have met.

User Rating

4.9/10 (1083 votes)

MPAA

Rated R

Runtime

USA:133 / UK:132 / Finland:133 / Japan:132

Country

USA

Language

English

Color

Color (DeLuxe)


In this example, the Genre and Runtime fields have multiple values.


Field Summary
static String EL_EXTN_META
          The element type of "Document Extension Metadata".
 
Fields inherited from interface com.sssw.cm.api.EbiCmElement
OP_COPY, OP_MOVE, OP_REMOVE, OP_UPDATE
 
Method Summary
 String getDocumentID()
          Gets the ID of the Document whose Extension Metadata the implementation of this interface is holding.
 EbiDocExtnMetaInfo getExtnMetaInfoByID(String fieldID)
          Given the ID of a specific Field, returns an EbiDocExtnMetaInfo for it.
 EbiDocExtnMetaInfo getExtnMetaInfoByIndex(int index)
          Gets an Extension Meta info by index.
 EbiDocExtnMetaInfo getExtnMetaInfoByName(String fieldName)
          Given the name of a specific field, returns an EbiDocExtnMetaInfo for it.
 Collection getExtnMetaInfos()
          Gets the Extension Meta info's for the Document.
 Collection getFieldIDs()
          Gets the list of IDs of the fields that this Extension Meta object knows about.
 Collection getFieldNames()
          Get the list of Field names that this Extension Meta object knows about.
 boolean isEmpty()
          Checks whether the Extension Meta object holds any info's.
 void setDocumentID(String docID)
          Set the Document ID.
 boolean setExtnMetaInfo(EbiDocExtnMetaInfo info)
          Sets an Extension Metadata info for a specific Field.
Notes:
The supplied info must be associated with the Document that this EbiDocExtnMeta is associated with, or the change is ignored; Use EbiContentManager.updateDocumentExtnMeta to save the changes; If there is a meta info in the meta holder that refers to the same Field as the supplied 'info', then the previously set meta info is overwritten with this supplied one.
 void setExtnMetaInfos(Collection infos)
          Sets the extension meta infos.
 int size()
          Gets the number of extension metadata infos currently held by this EbiDocExtnMeta.
 
Methods implemented from interface com.sssw.cm.api.EbiCmElement
fromXML, toXML, validateOperation
 
Methods implemented from interface com.sssw.fw.api.EbiFrameworkElement
getElementUUID, getLastModified, getLastModifiedBy, isEqualTo, isReadOnly, resetReadOnly, setLastModified, setLastModifiedBy, setReadOnly
 
Methods implemented from interface com.sssw.fw.api.EbiElement
getType
 

Field Detail

EL_EXTN_META

public static final String EL_EXTN_META
The element type of "Document Extension Metadata".
See Also:
EbiElement.getType()
Method Detail

getDocumentID

public String getDocumentID()
Gets the ID of the Document whose Extension Metadata the implementation of this interface is holding.
Returns:
the Document ID; the value is null if the Extension Meta is being constructed from scratch

getExtnMetaInfos

public Collection getExtnMetaInfos()
Gets the Extension Meta info's for the Document. Each meta info maps a specific Extension Field name to a set of one or more values for that field.
Returns:
Collection of EbiDocExtnMetaInfo's

getFieldIDs

public Collection getFieldIDs()
Gets the list of IDs of the fields that this Extension Meta object knows about.
Returns:
a Collection of String IDs.

getFieldNames

public Collection getFieldNames()
Get the list of Field names that this Extension Meta object knows about.
Returns:
a Collection of String field names.

getExtnMetaInfoByID

public EbiDocExtnMetaInfo getExtnMetaInfoByID(String fieldID)
Given the ID of a specific Field, returns an EbiDocExtnMetaInfo for it.
Parameters:
fieldID - the ID of the Extension Field
Returns:
EbiDocExtnMetaInfo for the Field, or null if not found

getExtnMetaInfoByName

public EbiDocExtnMetaInfo getExtnMetaInfoByName(String fieldName)
Given the name of a specific field, returns an EbiDocExtnMetaInfo for it.
Parameters:
fieldName - the name of the Extension Field
Returns:
EbiDocExtnMetaInfo for the field, or null if not found

size

public int size()
Gets the number of extension metadata infos currently held by this EbiDocExtnMeta.
Returns:
the number of Extension Metadata Info's

isEmpty

public boolean isEmpty()
Checks whether the Extension Meta object holds any info's.
Returns:
true if the object holds some EbiDocExtnMetaInfo's and false otherwise

getExtnMetaInfoByIndex

public EbiDocExtnMetaInfo getExtnMetaInfoByIndex(int index)
Gets an Extension Meta info by index.
Parameters:
index - the index, must be > 0 and < the value returned by getExtnMetaInfoCount
Returns:
the appropriate EbiDocExtnMetaInfo, or null if not found

setExtnMetaInfo

public boolean setExtnMetaInfo(EbiDocExtnMetaInfo info)
Sets an Extension Metadata info for a specific Field.
Notes:
  1. The supplied info must be associated with the Document that this EbiDocExtnMeta is associated with, or the change is ignored;
  2. Use EbiContentManager.updateDocumentExtnMeta to save the changes;
  3. If there is a meta info in the meta holder that refers to the same Field as the supplied 'info', then the previously set meta info is overwritten with this supplied one.
Parameters:
info - the info
Returns:
true if the info was already set and the method overwrote it, false if the method newly added the info

setExtnMetaInfos

public void setExtnMetaInfos(Collection infos)
Sets the extension meta infos.
Parameters:
infos - a Collection of EbiDocExtnMetaInfos

setDocumentID

public void setDocumentID(String docID)
Set the Document ID.
Parameters:
docID - the Document ID

Novell exteNd
Director 5.2 API