|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jempbox.xmp.XMPSchema
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.
| Field Summary | |
protected Element |
schema
The DOM representation of this object. |
| Constructor Summary | |
XMPSchema(Element element)
Create schema from an existing XML element. |
|
XMPSchema(XMPMetadata parent,
String namespaceName,
String namespaceURI)
Create a new blank schema that can be populated. |
|
| Method Summary | |
void |
addBagValue(String bagName,
String bagValue)
Add an entry to a bag property. |
void |
addSequenceDateValue(String seqName,
Calendar date)
Add a date sequence value to the list. |
void |
addSequenceValue(String seqName,
Elementable seqValue)
Add a new value to a sequence property. |
void |
addSequenceValue(String seqName,
String seqValue)
Add a new value to a sequence property. |
String |
getAbout()
Get the RFD about attribute. |
List |
getBagList(String bagName)
Get all the values of the bag property. |
Boolean |
getBooleanProperty(String propertyName)
Get the value of the property as a boolean. |
Calendar |
getDateProperty(String propertyName)
Get the value of the property as a date. |
Element |
getElement()
Get the XML element that is represented by this schema. |
List |
getEventSequenceList(String seqName)
Get a list of ResourceEvent objects. |
Integer |
getIntegerProperty(String propertyName)
Get the value of the property as an integer. |
String |
getLanguageProperty(String propertyName,
String language)
Get the value of a multi-lingual property. |
List |
getLanguagePropertyLanguages(String propertyName)
Get a list of all languages that are currently defined for a specific property. |
List |
getSequenceDateList(String seqName)
Get all the date values in a sequence property. |
List |
getSequenceList(String seqName)
Get all the values in a sequence property. |
String |
getTextProperty(String propertyName)
Get the value of a simple text property. |
Thumbnail |
getThumbnailProperty(String propertyName,
String language)
Get the value of a multi-lingual property. |
void |
removeBagValue(String bagName,
String bagValue)
Remove an entry from a bag property. |
void |
removeSequenceDateValue(String seqName,
Calendar date)
Remove a date sequence value from the list. |
void |
removeSequenceValue(String seqName,
Elementable seqValue)
Remove a value from a sequence property. |
void |
removeSequenceValue(String seqName,
String seqValue)
Remove a value from a sequence property. |
void |
setAbout(String about)
Set the RFD 'about' attribute. |
void |
setBooleanProperty(String propertyName,
Boolean bool)
Set the value of the property as a boolean. |
void |
setDateProperty(String propertyName,
Calendar date)
Set the value of the property as a date. |
void |
setIntegerProperty(String propertyName,
Integer intValue)
Set the value of the property as an integer. |
void |
setLanguageProperty(String propertyName,
String language,
String value)
Set the value of a multi-lingual property. |
void |
setTextProperty(String propertyName,
String propertyValue)
Set a simple text property on the schema. |
void |
setThumbnailProperty(String propertyName,
String language,
Thumbnail value)
Set the value of a multi-lingual property. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Element schema
| Constructor Detail |
public XMPSchema(XMPMetadata parent,
String namespaceName,
String namespaceURI)
parent - The parent XMP document that this schema will be part of.namespaceName - The name of the namespace, ie pdf,dc,...namespaceURI - The URI of the namespace, ie "http://ns.adobe.com/pdf/1.3/"public XMPSchema(Element element)
element - The existing XML element.| Method Detail |
public Element getElement()
public String getAbout()
public void setAbout(String about)
about - The new RFD about value.
public void setTextProperty(String propertyName,
String propertyValue)
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.public String getTextProperty(String propertyName)
propertyName - The name of the property to get, it must include the namespace prefix. ie "pdf:Keywords".
public Calendar getDateProperty(String propertyName)
throws IOException
propertyName - The fully qualified property name for the date.
IOException - If there is an error converting the value to a date.
public void setDateProperty(String propertyName,
Calendar date)
propertyName - The fully qualified property name for the date.date - The date to set, or null to clear.public Boolean getBooleanProperty(String propertyName)
propertyName - The fully qualified property name for the boolean.
public void setBooleanProperty(String propertyName,
Boolean bool)
propertyName - The fully qualified property name for the boolean.bool - The boolean to set, or null to clear.public Integer getIntegerProperty(String propertyName)
propertyName - The fully qualified property name for the integer.
NumberFormatException - If there is an error converting the value to an integer.
public void setIntegerProperty(String propertyName,
Integer intValue)
propertyName - The fully qualified property name for the integer.intValue - The int to set, or null to clear.
public void removeBagValue(String bagName,
String bagValue)
bagName - The name of the bag, it must include the namespace prefix. ie "pdf:Keywords".bagValue - The value to remove from the bagList.
public void addBagValue(String bagName,
String bagValue)
bagName - The name of the bag, it must include the namespace prefix. ie "pdf:Keywords".bagValue - The value to add to the bagList.public List getBagList(String bagName)
bagName - The name of the bag property to get, it must include the namespace prefix. ie "pdf:Keywords"
public void removeSequenceValue(String seqName,
String seqValue)
seqName - The name of the sequence property. It must include the namespace prefix. ie "pdf:Keywords".seqValue - The value to remove from the list.
public void removeSequenceValue(String seqName,
Elementable seqValue)
seqName - The name of the sequence property. It must include the namespace prefix. ie "pdf:Keywords".seqValue - The value to remove from the list.
public void addSequenceValue(String seqName,
String seqValue)
seqName - The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords"seqValue - The value to add to the sequence.
public void addSequenceValue(String seqName,
Elementable seqValue)
seqName - The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords"seqValue - The value to add to the sequence.public List getSequenceList(String seqName)
seqName - The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords".
public List getEventSequenceList(String seqName)
seqName - The name of the sequence to retrieve.
public void removeSequenceDateValue(String seqName,
Calendar date)
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.
public void addSequenceDateValue(String seqName,
Calendar date)
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.
public List getSequenceDateList(String seqName)
throws IOException
seqName - The name of the sequence property, it must include the namespace prefix. ie "pdf:Keywords".
IOException - If there is an error converting the value to a date.
public void setLanguageProperty(String propertyName,
String language,
String value)
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.
public String getLanguageProperty(String propertyName,
String language)
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.
public void setThumbnailProperty(String propertyName,
String language,
Thumbnail value)
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.
public Thumbnail getThumbnailProperty(String propertyName,
String language)
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.
public List getLanguagePropertyLanguages(String propertyName)
propertyName - The name of the property, it must include the namespace prefix. ie "pdf:Keywords"
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||