|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.portal.metadata.AbstractMetadata com.endeca.portal.metadata.MetadataObject
public abstract class MetadataObject
Abstract class representing a Metadata Object. This class
provides a basic Metadata implementation for getting and
setting an Metadata Object's base fields (except for "Type" which is
meant to be implementation-specific), storing an instance of
the backing Liferay MetadataRecord
, and managing
the Metadata Object's list of Metadata Properties.
Constructor Summary | |
---|---|
MetadataObject()
Constructor that creates a new Metadata object and its underlying MetadataRecord object. |
|
MetadataObject(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord record)
Constructor that creates a new Metadata object and assigns a given MetadataRecord to its underlying object. |
Method Summary | ||
---|---|---|
void |
addProperties(java.util.List<? extends MetadataProperty> properties)
Adds a list of Metadata Properties to this Metadata Object |
|
void |
addProperty(MetadataProperty property)
Adds a Metadata Property to this Metadata Object |
|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
|
java.util.List<MetadataProperty> |
getProperties()
Gets a list of Metadata Properties associated with this Metadata Object |
|
|
getProperties(java.lang.Class<T> klass)
Get a list of all Metadata Properties associated with this Metadata Object of the specified class (determined using .isInstance) |
|
com.endeca.portal.liferay.ext.metadata.model.MetadataRecord |
getSourceRecord()
Gets the Liferay source record |
|
abstract java.lang.String |
getType()
Gets the implementation-specific type. |
|
protected void |
init(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord record)
Initializes this AbstractMetadataObject from a MetadataRecord |
|
void |
removeAllProperties()
Removes all Metadata Properties from this Metadata Object |
|
void |
removeProperties(java.lang.Class<? extends MetadataProperty> klass)
Removes all Metadata Properties from this Metadata Object that are of a particular class |
|
void |
removeProperties(java.util.List<? extends MetadataProperty> properties)
Removes each Metadata Property from this Metadata Object provided in a given list based on .equals() equality |
|
void |
removeProperty(MetadataProperty property)
Removes a Metadata Property from this Metadata Object based on .equals() equality |
|
void |
setSourceRecord(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord rec)
Sets the Liferay source record |
Methods inherited from class com.endeca.portal.metadata.AbstractMetadata |
---|
getDescription, getFeature, getKey, getLastUpdated, getLocale, getObjectId, getRel, getSource, getValue, setDescription, setFeature, setKey, setLastUpdated, setLocale, setObjectId, setRel, setSource, setValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MetadataObject()
public MetadataObject(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord record)
record
- the source MetadataRecordMethod Detail |
---|
protected void init(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord record)
record
- the MetadataRecord from which this Metadata Object
should be initializedpublic abstract java.lang.String getType()
getType
in interface Metadata
getType
in class AbstractMetadata
getType()
public com.endeca.portal.liferay.ext.metadata.model.MetadataRecord getSourceRecord()
public void setSourceRecord(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord rec)
rec
- the source recordpublic void addProperty(MetadataProperty property)
property
- the Metadata Propertypublic void addProperties(java.util.List<? extends MetadataProperty> properties)
properties
- the list of Metadata Properties to addpublic java.util.List<MetadataProperty> getProperties()
public <T extends MetadataProperty> java.util.List<T> getProperties(java.lang.Class<T> klass)
T
- an extension of MetadataPropertyklass
- the Class of Metadata Property to retrieve
public void removeProperty(MetadataProperty property)
property
- the Metadata Propertypublic void removeProperties(java.util.List<? extends MetadataProperty> properties)
properties
- the list of Metadata Properties to removepublic void removeProperties(java.lang.Class<? extends MetadataProperty> klass)
klass
- the Class of Metadata Property to be removed.public void removeAllProperties()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |