|
xmlgraphics-commons 2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xmlgraphics.xmp.XMPSchemaAdapter
public class XMPSchemaAdapter
Base class for schema-specific adapters that provide user-friendly access to XMP values.
| Field Summary | |
|---|---|
protected Metadata |
meta
the Metadata object this schema instance operates on |
| Constructor Summary | |
|---|---|
XMPSchemaAdapter(Metadata meta,
XMPSchema schema)
Main constructor. |
|
| Method Summary | |
|---|---|
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. |
void |
setCompact(boolean c)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Metadata meta
| Constructor Detail |
|---|
public XMPSchemaAdapter(Metadata meta,
XMPSchema schema)
meta - the Metadata object to wraoschema - the XMP schema for which this adapter was written| Method Detail |
|---|
public XMPSchema getSchema()
protected QName getQName(java.lang.String propName)
propName - the property name
protected 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 on
protected boolean removeStringFromArray(java.lang.String propName,
java.lang.String value)
propName - the name of the propertyvalue - the value to be removed
protected void addStringToSeq(java.lang.String propName,
java.lang.String value)
propName - the property namevalue - the String value
protected 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 date
public static java.lang.String formatISO8601Date(java.util.Date dt,
java.util.TimeZone tz)
dt - the datetz - the time zone
protected void addDateToSeq(java.lang.String propName,
java.util.Date value)
propName - the property namevalue - the date value
protected 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 name
protected 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 value
protected 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 name
protected java.lang.String removeLangAlt(java.lang.String lang,
java.lang.String propName)
lang - the language ("x-default" for the default language)propName - the property name
protected java.lang.String getLangAlt(java.lang.String lang,
java.lang.String propName)
lang - the language ("x-default" for the default language)propName - the property name
protected PropertyAccess findQualifiedStructure(java.lang.String propName,
QName qualifier,
java.lang.String qualifierValue)
propName - the property namequalifier - the qualifierqualifierValue - the qualifier value
protected java.lang.Object findQualifiedValue(java.lang.String propName,
QName qualifier,
java.lang.String qualifierValue)
propName - the property namequalifier - the qualifierqualifierValue - the qualifier value
protected java.lang.Object[] getObjectArray(java.lang.String propName)
propName - the property name
protected java.lang.String[] getStringArray(java.lang.String propName)
propName - the property name
protected java.util.Date[] getDateArray(java.lang.String propName)
propName - the property name
public void setCompact(boolean c)
|
xmlgraphics-commons 2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||