This class represents a metadata schema that can be stored in an XMP document. It handles all generic
properties that are available. See subclasses for access to specific properties.
addBagValue
public void addBagValue(String bagName,
String bagValue)
Add an entry to a bag property.
bagName
- The name of the bag, it must include the namespace prefix. ie "pdf:Keywords".bagValue
- The value to add to the bagList.
addSequenceDateValue
public void addSequenceDateValue(String seqName,
Calendar date)
Add a date sequence value to the list.
seqName
- The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords"date
- The date to add to the sequence property.
addSequenceValue
public void addSequenceValue(String seqName,
String seqValue)
Add a new value to a sequence property.
seqName
- The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords"seqValue
- The value to add to the sequence.
addSequenceValue
public void addSequenceValue(String seqName,
Elementable seqValue)
Add a new value to a sequence property.
seqName
- The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords"seqValue
- The value to add to the sequence.
getAbout
public String getAbout()
Get the RFD about attribute.
- The RDF 'about' attribute.
getBagList
public List getBagList(String bagName)
Get all the values of the bag property. This will return a list of java.lang.String objects, this is a read-only
list.
bagName
- The name of the bag property to get, it must include the namespace prefix. ie "pdf:Keywords"
- All of the values of the bag property in a list.
getBooleanProperty
public Boolean getBooleanProperty(String propertyName)
Get the value of the property as a boolean.
propertyName
- The fully qualified property name for the boolean.
- The value of the property as a boolean.
getDateProperty
public Calendar getDateProperty(String propertyName)
throws IOException
Get the value of the property as a date.
propertyName
- The fully qualified property name for the date.
- The value of the property as a date.
getElement
public Element getElement()
Get the XML element that is represented by this schema.
- The root XML element of this schema.
getEventSequenceList
public List getEventSequenceList(String seqName)
Get a list of ResourceEvent objects.
seqName
- The name of the sequence to retrieve.
- A list of ResourceEvent objects or null if they do not exist.
getIntegerProperty
public Integer getIntegerProperty(String propertyName)
Get the value of the property as an integer.
propertyName
- The fully qualified property name for the integer.
- The value of the property as an integer.
getLanguageProperty
public String getLanguageProperty(String propertyName,
String language)
Get the value of a multi-lingual property.
propertyName
- The name of the property, it must include the namespace prefix. ie "pdf:Keywords"language
- The language code of the value. If null then "x-default" is assumed.
- The value of the language property.
getLanguagePropertyLanguages
public List getLanguagePropertyLanguages(String propertyName)
Get a list of all languages that are currently defined for a specific property.
propertyName
- The name of the property, it must include the namespace prefix. ie "pdf:Keywords"
- A list of all languages, this will return an non-null empty list if none have been defined.
getSequenceDateList
public List getSequenceDateList(String seqName)
throws IOException
Get all the date values in a sequence property.
seqName
- The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords".
- A read-only list of java.util.Calendar objects or null if the property does not exist.
getSequenceList
public List getSequenceList(String seqName)
Get all the values in a sequence property.
seqName
- The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords".
- A read-only list of java.lang.String objects or null if the property does not exist.
getTextProperty
public String getTextProperty(String propertyName)
Get the value of a simple text property.
propertyName
- The name of the property to get, it must include the namespace prefix. ie "pdf:Keywords".
- The value of the text property or null if there is no value.
getThumbnailProperty
public Thumbnail getThumbnailProperty(String propertyName,
String language)
Get the value of a multi-lingual property.
propertyName
- The name of the property, it must include the namespace prefix. ie "pdf:Keywords"language
- The language code of the value. If null then "x-default" is assumed.
- The value of the language property.
removeBagValue
public void removeBagValue(String bagName,
String bagValue)
Remove an entry from a bag property.
bagName
- The name of the bag, it must include the namespace prefix. ie "pdf:Keywords".bagValue
- The value to remove from the bagList.
removeSequenceDateValue
public void removeSequenceDateValue(String seqName,
Calendar date)
Remove a date sequence value from the list.
seqName
- The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords"date
- The date to remove from the sequence property.
removeSequenceValue
public void removeSequenceValue(String seqName,
String seqValue)
Remove a value from a sequence property. This will remove all entries from the list.
seqName
- The name of the sequence property. It must include the namespace prefix. ie "pdf:Keywords".seqValue
- The value to remove from the list.
removeSequenceValue
public void removeSequenceValue(String seqName,
Elementable seqValue)
Remove a value from a sequence property. This will remove all entries from the list.
seqName
- The name of the sequence property. It must include the namespace prefix. ie "pdf:Keywords".seqValue
- The value to remove from the list.
setAbout
public void setAbout(String about)
Set the RFD 'about' attribute. Passing in null will clear this attribute.
about
- The new RFD about value.
setBooleanProperty
public void setBooleanProperty(String propertyName,
Boolean bool)
Set the value of the property as a boolean.
propertyName
- The fully qualified property name for the boolean.bool
- The boolean to set, or null to clear.
setDateProperty
public void setDateProperty(String propertyName,
Calendar date)
Set the value of the property as a date.
propertyName
- The fully qualified property name for the date.date
- The date to set, or null to clear.
setIntegerProperty
public void setIntegerProperty(String propertyName,
Integer intValue)
Set the value of the property as an integer.
propertyName
- The fully qualified property name for the integer.intValue
- The int to set, or null to clear.
setLanguageProperty
public void setLanguageProperty(String propertyName,
String language,
String value)
Set the value of a multi-lingual property.
propertyName
- The name of the property, it must include the namespace prefix. ie "pdf:Keywords"language
- The language code of the value. If null then "x-default" is assumed.value
- The value of the property in the specified language.
setTextProperty
public void setTextProperty(String propertyName,
String propertyValue)
Set a simple text property on the schema.
propertyName
- The name of the property, it must contain the namespace prefix, ie "pdf:Keywords"propertyValue
- The value for the property, can be any string. Passing null will remove the property.
setThumbnailProperty
public void setThumbnailProperty(String propertyName,
String language,
Thumbnail value)
Set the value of a multi-lingual property.
propertyName
- The name of the property, it must include the namespace prefix. ie "pdf:Keywords"language
- The language code of the value. If null then "x-default" is assumed.value
- The value of the property in the specified language.