public class XMPSchemaAdapter extends 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(String propName,
Date value)
Adds a date value to an ordered array.
|
protected void |
addObjectToArray(String propName,
Object value,
XMPArrayType arrayType)
Adds a Object value to an array.
|
protected void |
addStringToBag(String propName,
String value)
Adds a String value to an unordered array.
|
protected void |
addStringToSeq(String propName,
String value)
Adds a String value to an ordered array.
|
protected PropertyAccess |
findQualifiedStructure(String propName,
QName qualifier,
String qualifierValue)
Finds a structure that matches a given qualifier.
|
protected Object |
findQualifiedValue(String propName,
QName qualifier,
String qualifierValue)
Finds a value that matches a given qualifier.
|
static String |
formatISO8601Date(Date dt)
Formats a Date using ISO 8601 format in the default time zone.
|
static String |
formatISO8601Date(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 Date |
getDateValue(String propName)
Returns a date value.
|
protected String |
getLangAlt(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 QName |
getQName(String propName)
Returns the QName for a given property
|
XMPSchema |
getSchema() |
protected String[] |
getStringArray(String propName)
Returns a String array representation of the property's values.
|
protected String |
getValue(String propName)
Returns a simple value.
|
protected String |
removeLangAlt(String lang,
String propName)
Removes a language-dependent value from an alternative array.
|
protected boolean |
removeStringFromArray(String propName,
String value)
Removes a value from an array.
|
void |
setCompact(boolean c) |
protected void |
setDateValue(String propName,
Date value)
Set a date value.
|
protected void |
setLangAlt(String propName,
String lang,
String value)
Sets a language-dependent value.
|
protected void |
setValue(String propName,
String value)
Sets a simple value.
|
protected Metadata meta
public XMPSchema getSchema()
protected QName getQName(String propName)
propName
- the property nameprotected void addObjectToArray(String propName, Object value, XMPArrayType arrayType)
propName
- the property namevalue
- the Object valuearrayType
- the type of array to operate onprotected boolean removeStringFromArray(String propName, String value)
propName
- the name of the propertyvalue
- the value to be removedprotected void addStringToSeq(String propName, String value)
propName
- the property namevalue
- the String valueprotected void addStringToBag(String propName, String value)
propName
- the property namevalue
- the String valuepublic static String formatISO8601Date(Date dt)
dt
- the datepublic static String formatISO8601Date(Date dt, TimeZone tz)
dt
- the datetz
- the time zoneprotected void addDateToSeq(String propName, Date value)
propName
- the property namevalue
- the date valueprotected void setDateValue(String propName, Date value)
propName
- the property namevalue
- the date valueprotected Date getDateValue(String propName)
propName
- the property nameprotected void setLangAlt(String propName, String lang, String value)
propName
- the property namelang
- the language ("x-default" or null for the default language)value
- the valueprotected void setValue(String propName, String value)
propName
- the property namevalue
- the valueprotected String getValue(String propName)
propName
- the property nameprotected String removeLangAlt(String lang, String propName)
lang
- the language ("x-default" for the default language)propName
- the property nameprotected String getLangAlt(String lang, String propName)
lang
- the language ("x-default" for the default language)propName
- the property nameprotected PropertyAccess findQualifiedStructure(String propName, QName qualifier, String qualifierValue)
propName
- the property namequalifier
- the qualifierqualifierValue
- the qualifier valueprotected Object findQualifiedValue(String propName, QName qualifier, String qualifierValue)
propName
- the property namequalifier
- the qualifierqualifierValue
- the qualifier valueprotected Object[] getObjectArray(String propName)
propName
- the property nameprotected String[] getStringArray(String propName)
propName
- the property nameprotected Date[] getDateArray(String propName)
propName
- the property namepublic void setCompact(boolean c)
Copyright © 2019 Apache Software Foundation. All rights reserved.