public abstract class MetadataObject extends AbstractMetadata
MetadataRecord
, and managing the Metadata Object's list of Metadata Properties.Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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
|
<T extends MetadataProperty> |
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
|
getDescription, getFeature, getKey, getLastUpdated, getLocale, getObjectId, getRel, getSource, getValue, setDescription, setFeature, setKey, setLastUpdated, setLocale, setObjectId, setRel, setSource, setValue, toString
public MetadataObject()
public MetadataObject(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord record)
record
- the source MetadataRecordprotected 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 retrievepublic 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
Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.