Class XMPSchemaAdapter
java.lang.Object
org.apache.xmlgraphics.xmp.XMPSchemaAdapter
- Direct Known Subclasses:
AdobePDFAdapter, DublinCoreAdapter, PDFAAdapter, PDFAExtensionAdapter, PDFUAAdapter, PDFVTAdapter, PDFXAdapter, XAPMMAdapter, XMPBasicAdapter
Base class for schema-specific adapters that provide user-friendly access to XMP values.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDateToSeq(String propName, Date value) Adds a date value to an ordered array.protected voidaddObjectToArray(String propName, Object value, XMPArrayType arrayType) Adds a Object value to an array.protected voidaddStringToBag(String propName, String value) Adds a String value to an unordered array.protected voidaddStringToSeq(String propName, String value) Adds a String value to an ordered array.protected PropertyAccessfindQualifiedStructure(String propName, QName qualifier, String qualifierValue) Finds a structure that matches a given qualifier.protected ObjectfindQualifiedValue(String propName, QName qualifier, String qualifierValue) Finds a value that matches a given qualifier.static StringFormats a Date using ISO 8601 format in the default time zone.static StringformatISO8601Date(Date dt, TimeZone tz) Formats a Date using ISO 8601 format in the given time zone.protected Date[]getDateArray(String propName) Returns a Date array representation of the property's values.protected DategetDateValue(String propName) Returns a date value.protected StringgetLangAlt(String lang, String propName) Returns a language-dependent value.protected Object[]getObjectArray(String propName) Returns an object array representation of the property's values.protected QNameReturns the QName for a given propertyprotected String[]getStringArray(String propName) Returns a String array representation of the property's values.protected StringReturns a simple value.protected StringremoveLangAlt(String lang, String propName) Removes a language-dependent value from an alternative array.protected booleanremoveStringFromArray(String propName, String value) Removes a value from an array.voidsetCompact(boolean c) protected voidsetDateValue(String propName, Date value) Set a date value.protected voidsetLangAlt(String propName, String lang, String value) Sets a language-dependent value.protected voidsetProperty(String propName, XMPProperty subProp) protected voidSets a simple value.
-
Field Details
-
meta
the Metadata object this schema instance operates on
-
-
Constructor Details
-
XMPSchemaAdapter
-
-
Method Details
-
getSchema
- Returns:
- the XMP schema associated with this adapter
-
getQName
-
addObjectToArray
Adds a Object value to an array.- Parameters:
propName- the property namevalue- the Object valuearrayType- the type of array to operate on
-
removeStringFromArray
-
addStringToSeq
-
addStringToBag
-
formatISO8601Date
-
formatISO8601Date
-
addDateToSeq
-
setDateValue
-
getDateValue
-
setLangAlt
-
setValue
-
getValue
-
setProperty
-
removeLangAlt
-
getLangAlt
Returns a language-dependent value. If the value in the requested language is not available the value for the default language is returned.- Parameters:
lang- the language ("x-default" for the default language)propName- the property name- Returns:
- the requested value
-
findQualifiedStructure
protected PropertyAccess findQualifiedStructure(String propName, QName qualifier, String qualifierValue) Finds a structure that matches a given qualifier.- Parameters:
propName- the property namequalifier- the qualifierqualifierValue- the qualifier value- Returns:
- the structure if a match was found (or null if no match was found)
-
findQualifiedValue
Finds a value that matches a given qualifier.- Parameters:
propName- the property namequalifier- the qualifierqualifierValue- the qualifier value- Returns:
- the value if a match was found (or null if no match was found)
-
getObjectArray
-
getStringArray
-
getDateArray
-
setCompact
public void setCompact(boolean c)
-