public class XMPSchemaAdapter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Metadata |
meta
the Metadata object this schema instance operates on
|
Constructor and Description |
---|
XMPSchemaAdapter(Metadata meta,
XMPSchema schema)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addDateToSeq(java.lang.String propName,
java.util.Date value)
Adds a date value to an ordered array.
|
protected void |
addObjectToArray(java.lang.String propName,
java.lang.Object value,
XMPArrayType arrayType)
Adds a Object value to an array.
|
protected void |
addStringToBag(java.lang.String propName,
java.lang.String value)
Adds a String value to an unordered array.
|
protected void |
addStringToSeq(java.lang.String propName,
java.lang.String value)
Adds a String value to an ordered array.
|
protected PropertyAccess |
findQualifiedStructure(java.lang.String propName,
QName qualifier,
java.lang.String qualifierValue)
Finds a structure that matches a given qualifier.
|
protected java.lang.Object |
findQualifiedValue(java.lang.String propName,
QName qualifier,
java.lang.String qualifierValue)
Finds a value that matches a given qualifier.
|
static java.lang.String |
formatISO8601Date(java.util.Date dt)
Formats a Date using ISO 8601 format in the default time zone.
|
static java.lang.String |
formatISO8601Date(java.util.Date dt,
java.util.TimeZone tz)
Formats a Date using ISO 8601 format in the given time zone.
|
protected java.util.Date[] |
getDateArray(java.lang.String propName)
Returns a Date array representation of the property's values.
|
protected java.util.Date |
getDateValue(java.lang.String propName)
Returns a date value.
|
protected java.lang.String |
getLangAlt(java.lang.String lang,
java.lang.String propName)
Returns a language-dependent value.
|
protected java.lang.Object[] |
getObjectArray(java.lang.String propName)
Returns an object array representation of the property's values.
|
protected QName |
getQName(java.lang.String propName)
Returns the QName for a given property
|
XMPSchema |
getSchema() |
protected java.lang.String[] |
getStringArray(java.lang.String propName)
Returns a String array representation of the property's values.
|
protected java.lang.String |
getValue(java.lang.String propName)
Returns a simple value.
|
protected java.lang.String |
removeLangAlt(java.lang.String lang,
java.lang.String propName)
Removes a language-dependent value from an alternative array.
|
protected boolean |
removeStringFromArray(java.lang.String propName,
java.lang.String value)
Removes a value from an array.
|
protected void |
setDateValue(java.lang.String propName,
java.util.Date value)
Set a date value.
|
protected void |
setLangAlt(java.lang.String propName,
java.lang.String lang,
java.lang.String value)
Sets a language-dependent value.
|
protected void |
setValue(java.lang.String propName,
java.lang.String value)
Sets a simple value.
|
protected Metadata meta
public XMPSchema getSchema()
protected QName getQName(java.lang.String propName)
propName
- the property nameprotected void addObjectToArray(java.lang.String propName, java.lang.Object value, XMPArrayType arrayType)
propName
- the property namevalue
- the Object valuearrayType
- the type of array to operate onprotected boolean removeStringFromArray(java.lang.String propName, java.lang.String value)
propName
- the name of the propertyvalue
- the value to be removedprotected void addStringToSeq(java.lang.String propName, java.lang.String value)
propName
- the property namevalue
- the String valueprotected void addStringToBag(java.lang.String propName, java.lang.String value)
propName
- the property namevalue
- the String valuepublic static java.lang.String formatISO8601Date(java.util.Date dt)
dt
- the datepublic static java.lang.String formatISO8601Date(java.util.Date dt, java.util.TimeZone tz)
dt
- the datetz
- the time zoneprotected void addDateToSeq(java.lang.String propName, java.util.Date value)
propName
- the property namevalue
- the date valueprotected void setDateValue(java.lang.String propName, java.util.Date value)
propName
- the property namevalue
- the date valueprotected java.util.Date getDateValue(java.lang.String propName)
propName
- the property nameprotected void setLangAlt(java.lang.String propName, java.lang.String lang, java.lang.String value)
propName
- the property namelang
- the language ("x-default" or null for the default language)value
- the valueprotected void setValue(java.lang.String propName, java.lang.String value)
propName
- the property namevalue
- the valueprotected java.lang.String getValue(java.lang.String propName)
propName
- the property nameprotected java.lang.String removeLangAlt(java.lang.String lang, java.lang.String propName)
lang
- the language ("x-default" for the default language)propName
- the property nameprotected java.lang.String getLangAlt(java.lang.String lang, java.lang.String propName)
lang
- the language ("x-default" for the default language)propName
- the property nameprotected PropertyAccess findQualifiedStructure(java.lang.String propName, QName qualifier, java.lang.String qualifierValue)
propName
- the property namequalifier
- the qualifierqualifierValue
- the qualifier valueprotected java.lang.Object findQualifiedValue(java.lang.String propName, QName qualifier, java.lang.String qualifierValue)
propName
- the property namequalifier
- the qualifierqualifierValue
- the qualifier valueprotected java.lang.Object[] getObjectArray(java.lang.String propName)
propName
- the property nameprotected java.lang.String[] getStringArray(java.lang.String propName)
propName
- the property nameprotected java.util.Date[] getDateArray(java.lang.String propName)
propName
- the property nameCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.