public interface XMPMeta
extends java.lang.Cloneable
OutputStream
.Modifier and Type | Method and Description |
---|---|
void |
appendArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
PropertyOptions arrayOptions,
java.lang.String itemValue,
PropertyOptions itemOptions)
Simplifies the construction of an array by not requiring that you pre-create an empty array.
|
void |
appendArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
java.lang.String itemValue) |
java.lang.Object |
clone()
Clones the complete metadata tree.
|
int |
countArrayItems(java.lang.String schemaNS,
java.lang.String arrayName)
Returns the number of items in the array.
|
void |
deleteArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
int itemIndex)
Deletes the given XMP subtree rooted at the given array item.
|
void |
deleteProperty(java.lang.String schemaNS,
java.lang.String propName)
Deletes the given XMP subtree rooted at the given property.
|
void |
deleteQualifier(java.lang.String schemaNS,
java.lang.String propName,
java.lang.String qualNS,
java.lang.String qualName)
Deletes the given XMP subtree rooted at the given qualifier.
|
void |
deleteStructField(java.lang.String schemaNS,
java.lang.String structName,
java.lang.String fieldNS,
java.lang.String fieldName)
Deletes the given XMP subtree rooted at the given struct field.
|
boolean |
doesArrayItemExist(java.lang.String schemaNS,
java.lang.String arrayName,
int itemIndex)
Tells if the array item exists.
|
boolean |
doesPropertyExist(java.lang.String schemaNS,
java.lang.String propName)
Returns whether the property exists.
|
boolean |
doesQualifierExist(java.lang.String schemaNS,
java.lang.String propName,
java.lang.String qualNS,
java.lang.String qualName)
DoesQualifierExist tells if the qualifier exists.
|
boolean |
doesStructFieldExist(java.lang.String schemaNS,
java.lang.String structName,
java.lang.String fieldNS,
java.lang.String fieldName)
DoesStructFieldExist tells if the struct field exists.
|
java.lang.String |
dumpObject()
Renders this node and the tree unter this node in a human readable form.
|
XMPProperty |
getArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
int itemIndex)
Provides access to items within an array.
|
XMPProperty |
getLocalizedText(java.lang.String schemaNS,
java.lang.String altTextName,
java.lang.String genericLang,
java.lang.String specificLang)
These functions provide convenient support for localized text properties, including a number
of special and obscure aspects.
|
java.lang.String |
getObjectName()
This correlates to the about-attribute,
returns the empty String if no name is set.
|
java.lang.String |
getPacketHeader() |
XMPProperty |
getProperty(java.lang.String schemaNS,
java.lang.String propName)
The property value getter-methods all take a property specification: the first two parameters
are always the top level namespace URI (the "schema" namespace) and the basic name
of the property being referenced.
|
byte[] |
getPropertyBase64(java.lang.String schemaNS,
java.lang.String propName)
Convenience method to retrieve the literal value of a property.
|
java.lang.Boolean |
getPropertyBoolean(java.lang.String schemaNS,
java.lang.String propName)
These are very similar to
getProperty() and SetProperty() above,
but the value is returned or provided in a literal form instead of as a UTF-8 string. |
java.util.Calendar |
getPropertyCalendar(java.lang.String schemaNS,
java.lang.String propName)
Convenience method to retrieve the literal value of a property.
|
XMPDateTime |
getPropertyDate(java.lang.String schemaNS,
java.lang.String propName)
Convenience method to retrieve the literal value of a property.
|
java.lang.Double |
getPropertyDouble(java.lang.String schemaNS,
java.lang.String propName)
Convenience method to retrieve the literal value of a property.
|
java.lang.Integer |
getPropertyInteger(java.lang.String schemaNS,
java.lang.String propName)
Convenience method to retrieve the literal value of a property.
|
java.lang.Long |
getPropertyLong(java.lang.String schemaNS,
java.lang.String propName)
Convenience method to retrieve the literal value of a property.
|
java.lang.String |
getPropertyString(java.lang.String schemaNS,
java.lang.String propName)
Convenience method to retrieve the literal value of a property.
|
XMPProperty |
getQualifier(java.lang.String schemaNS,
java.lang.String propName,
java.lang.String qualNS,
java.lang.String qualName)
Provides access to a qualifier attached to a property.
|
XMPProperty |
getStructField(java.lang.String schemaNS,
java.lang.String structName,
java.lang.String fieldNS,
java.lang.String fieldName)
Provides access to fields within a nested structure.
|
void |
insertArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
int itemIndex,
java.lang.String itemValue) |
void |
insertArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
int itemIndex,
java.lang.String itemValue,
PropertyOptions options)
Inserts an item into an array previous to the given index.
|
XMPIterator |
iterator()
Constructs an iterator for the properties within this XMP object.
|
XMPIterator |
iterator(IteratorOptions options)
Constructs an iterator for the properties within this XMP object using some options.
|
XMPIterator |
iterator(java.lang.String schemaNS,
java.lang.String propName,
IteratorOptions options)
Construct an iterator for the properties within an XMP object.
|
void |
setArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
int itemIndex,
java.lang.String itemValue) |
void |
setArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
int itemIndex,
java.lang.String itemValue,
PropertyOptions options)
Replaces an item within an array.
|
void |
setLocalizedText(java.lang.String schemaNS,
java.lang.String altTextName,
java.lang.String genericLang,
java.lang.String specificLang,
java.lang.String itemValue) |
void |
setLocalizedText(java.lang.String schemaNS,
java.lang.String altTextName,
java.lang.String genericLang,
java.lang.String specificLang,
java.lang.String itemValue,
PropertyOptions options)
Modifies the value of a selected item in an alt-text array.
|
void |
setObjectName(java.lang.String name) |
void |
setProperty(java.lang.String schemaNS,
java.lang.String propName,
java.lang.Object propValue) |
void |
setProperty(java.lang.String schemaNS,
java.lang.String propName,
java.lang.Object propValue,
PropertyOptions options)
The property value
setters all take a property specification, their
differences are in the form of this. |
void |
setPropertyBase64(java.lang.String schemaNS,
java.lang.String propName,
byte[] propValue) |
void |
setPropertyBase64(java.lang.String schemaNS,
java.lang.String propName,
byte[] propValue,
PropertyOptions options)
Convenience method to set a property from a binary
byte[] -array,
which is serialized as base64-string. |
void |
setPropertyBoolean(java.lang.String schemaNS,
java.lang.String propName,
boolean propValue) |
void |
setPropertyBoolean(java.lang.String schemaNS,
java.lang.String propName,
boolean propValue,
PropertyOptions options)
Convenience method to set a property to a literal
boolean value. |
void |
setPropertyCalendar(java.lang.String schemaNS,
java.lang.String propName,
java.util.Calendar propValue) |
void |
setPropertyCalendar(java.lang.String schemaNS,
java.lang.String propName,
java.util.Calendar propValue,
PropertyOptions options)
Convenience method to set a property with a Java Calendar-object,
which is serialized to an ISO8601 date.
|
void |
setPropertyDate(java.lang.String schemaNS,
java.lang.String propName,
XMPDateTime propValue) |
void |
setPropertyDate(java.lang.String schemaNS,
java.lang.String propName,
XMPDateTime propValue,
PropertyOptions options)
Convenience method to set a property with an XMPDateTime-object,
which is serialized to an ISO8601 date.
|
void |
setPropertyDouble(java.lang.String schemaNS,
java.lang.String propName,
double propValue) |
void |
setPropertyDouble(java.lang.String schemaNS,
java.lang.String propName,
double propValue,
PropertyOptions options)
Convenience method to set a property to a literal
double value. |
void |
setPropertyInteger(java.lang.String schemaNS,
java.lang.String propName,
int propValue) |
void |
setPropertyInteger(java.lang.String schemaNS,
java.lang.String propName,
int propValue,
PropertyOptions options)
Convenience method to set a property to a literal
int value. |
void |
setPropertyLong(java.lang.String schemaNS,
java.lang.String propName,
long propValue) |
void |
setPropertyLong(java.lang.String schemaNS,
java.lang.String propName,
long propValue,
PropertyOptions options)
Convenience method to set a property to a literal
long value. |
void |
setQualifier(java.lang.String schemaNS,
java.lang.String propName,
java.lang.String qualNS,
java.lang.String qualName,
java.lang.String qualValue) |
void |
setQualifier(java.lang.String schemaNS,
java.lang.String propName,
java.lang.String qualNS,
java.lang.String qualName,
java.lang.String qualValue,
PropertyOptions options)
Provides access to a qualifier attached to a property.
|
void |
setStructField(java.lang.String schemaNS,
java.lang.String structName,
java.lang.String fieldNS,
java.lang.String fieldName,
java.lang.String fieldValue) |
void |
setStructField(java.lang.String schemaNS,
java.lang.String structName,
java.lang.String fieldNS,
java.lang.String fieldName,
java.lang.String fieldValue,
PropertyOptions options)
Provides access to fields within a nested structure.
|
void |
sort()
Sorts the complete datamodel according to the following rules:
Schema nodes are sorted by prefix.
|
XMPProperty getProperty(java.lang.String schemaNS, java.lang.String propName) throws XMPException
All of the functions return an object inherited from PropertyBase
or
null
if the property does not exists. The result object contains the value of
the property and option flags describing the property. Arrays and the non-leaf levels of
nodes do not have values.
See PropertyOptions
for detailed information about the options.
This is the simplest property getter, mainly for top level simple properties or after using the path composition functions in XMPPathFactory.
schemaNS
- The namespace URI for the property. May be null
or the empty
string if the first component of the propName path contains a namespace prefix. The
URI must be for a registered namespace.propName
- The name of the property. May be a general path expression, must not be
null
or the empty string. Using a namespace prefix on the first
component is optional. If present without a schemaNS value then the prefix specifies
the namespace. The prefix must be for a registered namespace. If both a schemaNS URI
and propName prefix are present, they must be corresponding parts of a registered
namespace.XMPProperty
containing the value and the options or
null
if the property does not exist.XMPException
- Wraps all errors and exceptions that may occur.XMPProperty getArrayItem(java.lang.String schemaNS, java.lang.String arrayName, int itemIndex) throws XMPException
schemaNS
- The namespace URI for the array. Has the same usage as in getProperty.arrayName
- The name of the array. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty()
.itemIndex
- The index of the desired item. Arrays in XMP are indexed from 1. The
constant XMPConst.ARRAY_LAST_ITEM
always refers to the last existing array
item.XMPProperty
containing the value and the options or
null
if the property does not exist.XMPException
- Wraps all errors and exceptions that may occur.int countArrayItems(java.lang.String schemaNS, java.lang.String arrayName) throws XMPException
schemaNS
- The namespace URI for the array. Has the same usage as in getProperty.arrayName
- The name of the array. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty()
.XMPException
- Wraps all errors and exceptions that may occur.XMPProperty getStructField(java.lang.String schemaNS, java.lang.String structName, java.lang.String fieldNS, java.lang.String fieldName) throws XMPException
The names of fields should be XML qualified names, that is within an XML namespace. The path syntax for a qualified name uses the namespace prefix. This is unreliable since the prefix is never guaranteed. The URI is the formal name, the prefix is just a local shorthand in a given sequence of XML text.
schemaNS
- The namespace URI for the struct. Has the same usage as in getProperty.structName
- The name of the struct. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty()
.fieldNS
- The namespace URI for the field. Has the same URI and prefix usage as the
schemaNS parameter.fieldName
- The name of the field. Must be a single XML name, must not be
null
or the empty string. Has the same namespace prefix usage as the
structName parameter.XMPProperty
containing the value and the options or
null
if the property does not exist. Arrays and non-leaf levels of
structs do not have values.XMPException
- Wraps all errors and exceptions that may occur.XMPProperty getQualifier(java.lang.String schemaNS, java.lang.String propName, java.lang.String qualNS, java.lang.String qualName) throws XMPException
The names of qualifiers should be XML qualified names, that is within an XML namespace. The path syntax for a qualified name uses the namespace prefix. This is unreliable since the prefix is never guaranteed. The URI is the formal name, the prefix is just a local shorthand in a given sequence of XML text.
Note: Qualifiers are only supported for simple leaf properties at this time.
schemaNS
- The namespace URI for the struct. Has the same usage as in getProperty.propName
- The name of the property to which the qualifier is attached. May be a general
path expression, must not be null
or the empty string. Has the same
namespace prefix usage as in getProperty()
.qualNS
- The namespace URI for the qualifier. Has the same URI and prefix usage as the
schemaNS parameter.qualName
- The name of the qualifier. Must be a single XML name, must not be
null
or the empty string. Has the same namespace prefix usage as the
propName parameter.XMPProperty
containing the value and the options of the
qualifier or null
if the property does not exist. The name of the
qualifier must be a single XML name, must not be null
or the empty
string. Has the same namespace prefix usage as the propName parameter.
The value of the qualifier is only set if it has one (Arrays and non-leaf levels of structs do not have values).
XMPException
- Wraps all errors and exceptions that may occur.void setProperty(java.lang.String schemaNS, java.lang.String propName, java.lang.Object propValue, PropertyOptions options) throws XMPException
setters
all take a property specification, their
differences are in the form of this. The first two parameters are always the top level
namespace URI (the schema
namespace) and the basic name of the property being
referenced. See the introductory discussion of path expression usage for more information.
All of the functions take a string value for the property and option flags describing the property. The value must be Unicode in UTF-8 encoding. Arrays and non-leaf levels of structs do not have values. Empty arrays and structs may be created using appropriate option flags. All levels of structs that is assigned implicitly are created if necessary. appendArayItem implicitly creates the named array if necessary.
See PropertyOptions
for detailed information about the options.
This is the simplest property setter, mainly for top level simple properties or after using
the path composition functions in XMPPathFactory
.
schemaNS
- The namespace URI for the property. Has the same usage as in getProperty.propName
- The name of the property.
Has the same usage as in getProperty()
.propValue
- the value for the property (only leaf properties have a value).
Arrays and non-leaf levels of structs do not have values.
Must be null
if the value is not relevant.
The value is automatically detected: Boolean, Integer, Long, Double, XMPDateTime and
byte[] are handled, on all other toString()
is called.options
- Option flags describing the property. See the earlier description.XMPException
- Wraps all errors and exceptions that may occur.void setProperty(java.lang.String schemaNS, java.lang.String propName, java.lang.Object propValue) throws XMPException
schemaNS
- The namespace URIpropName
- The name of the propertypropValue
- the value for the propertyXMPException
- Wraps all errors and exceptionssetProperty(String, String, Object, PropertyOptions)
void setArrayItem(java.lang.String schemaNS, java.lang.String arrayName, int itemIndex, java.lang.String itemValue, PropertyOptions options) throws XMPException
schemaNS
- The namespace URI for the array. Has the same usage as in getProperty.arrayName
- The name of the array. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty.itemIndex
- The index of the desired item. Arrays in XMP are indexed from 1. To address
the last existing item, use countArrayItems(String, String)
to find
out the length of the array.itemValue
- the new value of the array item. Has the same usage as propValue in
setProperty()
.options
- the set options for the item.XMPException
- Wraps all errors and exceptions that may occur.void setArrayItem(java.lang.String schemaNS, java.lang.String arrayName, int itemIndex, java.lang.String itemValue) throws XMPException
schemaNS
- The namespace URIarrayName
- The name of the arrayitemIndex
- The index to insert the new itemitemValue
- the new value of the array itemXMPException
- Wraps all errors and exceptionssetArrayItem(String, String, int, String, PropertyOptions)
void insertArrayItem(java.lang.String schemaNS, java.lang.String arrayName, int itemIndex, java.lang.String itemValue, PropertyOptions options) throws XMPException
schemaNS
- The namespace URI for the array. Has the same usage as in getProperty.arrayName
- The name of the array. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty.itemIndex
- The index to insert the new item. Arrays in XMP are indexed from 1. Use
XMPConst.ARRAY_LAST_ITEM
to append items.itemValue
- the new value of the array item. Has the same usage as
propValue in setProperty()
.options
- the set options that decide about the kind of the node.XMPException
- Wraps all errors and exceptions that may occur.void insertArrayItem(java.lang.String schemaNS, java.lang.String arrayName, int itemIndex, java.lang.String itemValue) throws XMPException
schemaNS
- The namespace URI for the arrayarrayName
- The name of the arrayitemIndex
- The index to insert the new itemitemValue
- the value of the array itemXMPException
- Wraps all errors and exceptionsinsertArrayItem(String, String, int, String, PropertyOptions)
void appendArrayItem(java.lang.String schemaNS, java.lang.String arrayName, PropertyOptions arrayOptions, java.lang.String itemValue, PropertyOptions itemOptions) throws XMPException
schemaNS
- The namespace URI for the array. Has the same usage as in getProperty.arrayName
- The name of the array. May be a general path expression, must not be null or
the empty string. Has the same namespace prefix usage as propPath in getProperty.arrayOptions
- Option flags describing the array form. The only valid options are
PropertyOptions.ARRAY
,
PropertyOptions.ARRAY_ORDERED
,
PropertyOptions.ARRAY_ALTERNATE
or
PropertyOptions.ARRAY_ALT_TEXT
.
null
or use
appendArrayItem(String, String, String)
.itemValue
- the value of the array item. Has the same usage as propValue in getProperty.itemOptions
- Option flags describing the item to append (PropertyOptions
)XMPException
- Wraps all errors and exceptions that may occur.void appendArrayItem(java.lang.String schemaNS, java.lang.String arrayName, java.lang.String itemValue) throws XMPException
schemaNS
- The namespace URI for the arrayarrayName
- The name of the arrayitemValue
- the value of the array itemXMPException
- Wraps all errors and exceptionsappendArrayItem(String, String, PropertyOptions, String, PropertyOptions)
void setStructField(java.lang.String schemaNS, java.lang.String structName, java.lang.String fieldNS, java.lang.String fieldName, java.lang.String fieldValue, PropertyOptions options) throws XMPException
schemaNS
- The namespace URI for the struct. Has the same usage as in getProperty.structName
- The name of the struct. May be a general path expression, must not be null
or the empty string. Has the same namespace prefix usage as propName in getProperty.fieldNS
- The namespace URI for the field. Has the same URI and prefix usage as the
schemaNS parameter.fieldName
- The name of the field. Must be a single XML name, must not be null or the
empty string. Has the same namespace prefix usage as the structName parameter.fieldValue
- the value of thefield, if the field has a value.
Has the same usage as propValue in getProperty.options
- Option flags describing the field. See the earlier description.XMPException
- Wraps all errors and exceptions that may occur.void setStructField(java.lang.String schemaNS, java.lang.String structName, java.lang.String fieldNS, java.lang.String fieldName, java.lang.String fieldValue) throws XMPException
schemaNS
- The namespace URI for the structstructName
- The name of the structfieldNS
- The namespace URI for the fieldfieldName
- The name of the fieldfieldValue
- the value of the fieldXMPException
- Wraps all errors and exceptionssetStructField(String, String, String, String, String, PropertyOptions)
void setQualifier(java.lang.String schemaNS, java.lang.String propName, java.lang.String qualNS, java.lang.String qualName, java.lang.String qualValue, PropertyOptions options) throws XMPException
schemaNS
- The namespace URI for the struct. Has the same usage as in getProperty.propName
- The name of the property to which the qualifier is attached. Has the same
usage as in getProperty.qualNS
- The namespace URI for the qualifier. Has the same URI and prefix usage as the
schemaNS parameter.qualName
- The name of the qualifier. Must be a single XML name, must not be
null
or the empty string. Has the same namespace prefix usage as the
propName parameter.qualValue
- A pointer to the null
terminated UTF-8 string that is the
value of the qualifier, if the qualifier has a value. Has the same usage as propValue
in getProperty.options
- Option flags describing the qualifier. See the earlier description.XMPException
- Wraps all errors and exceptions that may occur.void setQualifier(java.lang.String schemaNS, java.lang.String propName, java.lang.String qualNS, java.lang.String qualName, java.lang.String qualValue) throws XMPException
schemaNS
- The namespace URI for the structpropName
- The name of the property to which the qualifier is attachedqualNS
- The namespace URI for the qualifierqualName
- The name of the qualifierqualValue
- the value of the qualifierXMPException
- Wraps all errors and exceptionssetQualifier(String, String, String, String, String, PropertyOptions)
void deleteProperty(java.lang.String schemaNS, java.lang.String propName)
schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property. Has the same usage as in getProperty.void deleteArrayItem(java.lang.String schemaNS, java.lang.String arrayName, int itemIndex)
schemaNS
- The namespace URI for the array. Has the same usage as in getProperty.arrayName
- The name of the array. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty()
.itemIndex
- The index of the desired item. Arrays in XMP are indexed from 1. The
constant XMPConst.ARRAY_LAST_ITEM
always refers to the last
existing array item.void deleteStructField(java.lang.String schemaNS, java.lang.String structName, java.lang.String fieldNS, java.lang.String fieldName)
schemaNS
- The namespace URI for the struct. Has the same usage as in
getProperty()
.structName
- The name of the struct. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty.fieldNS
- The namespace URI for the field. Has the same URI and prefix usage as the
schemaNS parameter.fieldName
- The name of the field. Must be a single XML name, must not be
null
or the empty string. Has the same namespace prefix usage as the
structName parameter.void deleteQualifier(java.lang.String schemaNS, java.lang.String propName, java.lang.String qualNS, java.lang.String qualName)
schemaNS
- The namespace URI for the struct. Has the same usage as in
getProperty()
.propName
- The name of the property to which the qualifier is attached. Has the same
usage as in getProperty.qualNS
- The namespace URI for the qualifier. Has the same URI and prefix usage as the
schemaNS parameter.qualName
- The name of the qualifier. Must be a single XML name, must not be
null
or the empty string. Has the same namespace prefix usage as the
propName parameter.boolean doesPropertyExist(java.lang.String schemaNS, java.lang.String propName)
schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.boolean doesArrayItemExist(java.lang.String schemaNS, java.lang.String arrayName, int itemIndex)
schemaNS
- The namespace URI for the array. Has the same usage as in
getProperty()
.arrayName
- The name of the array. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty()
.itemIndex
- The index of the desired item. Arrays in XMP are indexed from 1. The
constant XMPConst.ARRAY_LAST_ITEM
always refers to the last
existing array item.true
if the array exists, false
otherwise.boolean doesStructFieldExist(java.lang.String schemaNS, java.lang.String structName, java.lang.String fieldNS, java.lang.String fieldName)
schemaNS
- The namespace URI for the struct. Has the same usage as in
getProperty()
.structName
- The name of the struct. May be a general path expression, must not be
null
or the empty string. Has the same namespace prefix usage as
propName in getProperty()
.fieldNS
- The namespace URI for the field. Has the same URI and prefix usage as the
schemaNS parameter.fieldName
- The name of the field. Must be a single XML name, must not be
null
or the empty string. Has the same namespace prefix usage as the
structName parameter.boolean doesQualifierExist(java.lang.String schemaNS, java.lang.String propName, java.lang.String qualNS, java.lang.String qualName)
schemaNS
- The namespace URI for the struct. Has the same usage as in
getProperty()
.propName
- The name of the property to which the qualifier is attached. Has the same
usage as in getProperty()
.qualNS
- The namespace URI for the qualifier. Has the same URI and prefix usage as the
schemaNS parameter.qualName
- The name of the qualifier. Must be a single XML name, must not be
null
or the empty string. Has the same namespace prefix usage as the
propName parameter.XMPProperty getLocalizedText(java.lang.String schemaNS, java.lang.String altTextName, java.lang.String genericLang, java.lang.String specificLang) throws XMPException
Note: RFC 3066 language tags must be treated in a case insensitive manner. The XMP Toolkit does this by normalizing their capitalization:
getLocalizedText
returns information about a selected item in
an alt-text array. The array item is selected according to the rules given above.
Note: In a future version of this API a method
using Java java.lang.Locale
will be added.schemaNS
- The namespace URI for the alt-text array. Has the same usage as in
getProperty()
.altTextName
- The name of the alt-text array. May be a general path expression, must not
be null
or the empty string. Has the same namespace prefix usage as
propName in getProperty()
.genericLang
- The name of the generic language as an RFC 3066 primary subtag. May be
null
or the empty string if no generic language is wanted.specificLang
- The name of the specific language as an RFC 3066 tag. Must not be
null
or the empty string.XMPProperty
containing the value, the actual language and
the options if an appropriate alternate collection item exists, null
if the property.
does not exist.XMPException
- Wraps all errors and exceptions that may occur.void setLocalizedText(java.lang.String schemaNS, java.lang.String altTextName, java.lang.String genericLang, java.lang.String specificLang, java.lang.String itemValue, PropertyOptions options) throws XMPException
java.lang.Locale
will be added.schemaNS
- The namespace URI for the alt-text array. Has the same usage as in
getProperty()
.altTextName
- The name of the alt-text array. May be a general path expression, must not
be null
or the empty string. Has the same namespace prefix usage as
propName in getProperty()
.genericLang
- The name of the generic language as an RFC 3066 primary subtag. May be
null
or the empty string if no generic language is wanted.specificLang
- The name of the specific language as an RFC 3066 tag. Must not be
null
or the empty string.itemValue
- A pointer to the null
terminated UTF-8 string that is the new
value for the appropriate array item.options
- Option flags, none are defined at present.XMPException
- Wraps all errors and exceptions that may occur.void setLocalizedText(java.lang.String schemaNS, java.lang.String altTextName, java.lang.String genericLang, java.lang.String specificLang, java.lang.String itemValue) throws XMPException
schemaNS
- The namespace URI for the alt-text arrayaltTextName
- The name of the alt-text arraygenericLang
- The name of the generic languagespecificLang
- The name of the specific languageitemValue
- the new value for the appropriate array itemXMPException
- Wraps all errors and exceptionssetLocalizedText(String, String, String, String, String, PropertyOptions)
java.lang.Boolean getPropertyBoolean(java.lang.String schemaNS, java.lang.String propName) throws XMPException
getProperty()
and SetProperty()
above,
but the value is returned or provided in a literal form instead of as a UTF-8 string.
The path composition functions in XMPPathFactory
may be used to compose an path
expression for fields in nested structures, items in arrays, or qualifiers.schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.Boolean
value or null
if the property does not exist.XMPException
- Wraps all exceptions that may occur,
especially conversion errors.java.lang.Integer getPropertyInteger(java.lang.String schemaNS, java.lang.String propName) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.Integer
value or null
if the property does not exist.XMPException
- Wraps all exceptions that may occur,
especially conversion errors.java.lang.Long getPropertyLong(java.lang.String schemaNS, java.lang.String propName) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.Long
value or null
if the property does not exist.XMPException
- Wraps all exceptions that may occur,
especially conversion errors.java.lang.Double getPropertyDouble(java.lang.String schemaNS, java.lang.String propName) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.Double
value or null
if the property does not exist.XMPException
- Wraps all exceptions that may occur,
especially conversion errors.XMPDateTime getPropertyDate(java.lang.String schemaNS, java.lang.String propName) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.XMPDateTime
-object or null
if the property does not exist.XMPException
- Wraps all exceptions that may occur,
especially conversion errors.java.util.Calendar getPropertyCalendar(java.lang.String schemaNS, java.lang.String propName) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.Calendar
-object or null
if the property does not exist.XMPException
- Wraps all exceptions that may occur,
especially conversion errors.byte[] getPropertyBase64(java.lang.String schemaNS, java.lang.String propName) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.byte[]
-array contained the decoded base64 value
or null
if the property does not exist.XMPException
- Wraps all exceptions that may occur,
especially conversion errors.java.lang.String getPropertyString(java.lang.String schemaNS, java.lang.String propName) throws XMPException
setPropertyString()
,
because setProperty()
sets a string value.schemaNS
- The namespace URI for the property. Has the same usage as in
getProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.String
value or null
if the property does not exist.XMPException
- Wraps all exceptions that may occur,
especially conversion errors.void setPropertyBoolean(java.lang.String schemaNS, java.lang.String propName, boolean propValue, PropertyOptions options) throws XMPException
boolean
value.schemaNS
- The namespace URI for the property. Has the same usage as in
setProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.propValue
- the literal property value as boolean
.options
- options of the property to set (optional).XMPException
- Wraps all exceptions that may occur.void setPropertyBoolean(java.lang.String schemaNS, java.lang.String propName, boolean propValue) throws XMPException
schemaNS
- The namespace URI for the propertypropName
- The name of the propertypropValue
- the literal property value as boolean
XMPException
- Wraps all exceptionssetPropertyBoolean(String, String, boolean, PropertyOptions)
void setPropertyInteger(java.lang.String schemaNS, java.lang.String propName, int propValue, PropertyOptions options) throws XMPException
int
value.schemaNS
- The namespace URI for the property. Has the same usage as in
setProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.propValue
- the literal property value as int
.options
- options of the property to set (optional).XMPException
- Wraps all exceptions that may occur.void setPropertyInteger(java.lang.String schemaNS, java.lang.String propName, int propValue) throws XMPException
schemaNS
- The namespace URI for the propertypropName
- The name of the propertypropValue
- the literal property value as int
XMPException
- Wraps all exceptionssetPropertyInteger(String, String, int, PropertyOptions)
void setPropertyLong(java.lang.String schemaNS, java.lang.String propName, long propValue, PropertyOptions options) throws XMPException
long
value.schemaNS
- The namespace URI for the property. Has the same usage as in
setProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.propValue
- the literal property value as long
.options
- options of the property to set (optional).XMPException
- Wraps all exceptions that may occur.void setPropertyLong(java.lang.String schemaNS, java.lang.String propName, long propValue) throws XMPException
schemaNS
- The namespace URI for the propertypropName
- The name of the propertypropValue
- the literal property value as long
XMPException
- Wraps all exceptionssetPropertyLong(String, String, long, PropertyOptions)
void setPropertyDouble(java.lang.String schemaNS, java.lang.String propName, double propValue, PropertyOptions options) throws XMPException
double
value.schemaNS
- The namespace URI for the property. Has the same usage as in
setProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.propValue
- the literal property value as double
.options
- options of the property to set (optional).XMPException
- Wraps all exceptions that may occur.void setPropertyDouble(java.lang.String schemaNS, java.lang.String propName, double propValue) throws XMPException
schemaNS
- The namespace URI for the propertypropName
- The name of the propertypropValue
- the literal property value as double
XMPException
- Wraps all exceptionssetPropertyDouble(String, String, double, PropertyOptions)
void setPropertyDate(java.lang.String schemaNS, java.lang.String propName, XMPDateTime propValue, PropertyOptions options) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in
setProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.propValue
- the property value as XMPDateTime
.options
- options of the property to set (optional).XMPException
- Wraps all exceptions that may occur.void setPropertyDate(java.lang.String schemaNS, java.lang.String propName, XMPDateTime propValue) throws XMPException
schemaNS
- The namespace URI for the propertypropName
- The name of the propertypropValue
- the property value as XMPDateTime
XMPException
- Wraps all exceptionssetPropertyDate(String, String, XMPDateTime, PropertyOptions)
void setPropertyCalendar(java.lang.String schemaNS, java.lang.String propName, java.util.Calendar propValue, PropertyOptions options) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in
setProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.propValue
- the property value as Java Calendar
.options
- options of the property to set (optional).XMPException
- Wraps all exceptions that may occur.void setPropertyCalendar(java.lang.String schemaNS, java.lang.String propName, java.util.Calendar propValue) throws XMPException
schemaNS
- The namespace URI for the propertypropName
- The name of the propertypropValue
- the property value as Calendar
XMPException
- Wraps all exceptionssetPropertyCalendar(String, String, Calendar, PropertyOptions)
void setPropertyBase64(java.lang.String schemaNS, java.lang.String propName, byte[] propValue, PropertyOptions options) throws XMPException
byte[]
-array,
which is serialized as base64-string.schemaNS
- The namespace URI for the property. Has the same usage as in
setProperty()
.propName
- The name of the property.
Has the same usage as in getProperty()
.propValue
- the literal property value as byte array.options
- options of the property to set (optional).XMPException
- Wraps all exceptions that may occur.void setPropertyBase64(java.lang.String schemaNS, java.lang.String propName, byte[] propValue) throws XMPException
schemaNS
- The namespace URI for the propertypropName
- The name of the propertypropValue
- the literal property value as byte arrayXMPException
- Wraps all exceptionssetPropertyBase64(String, String, byte[], PropertyOptions)
XMPIterator iterator() throws XMPException
XMPIterator
.XMPException
- Wraps all errors and exceptions that may occur.iterator(String, String, IteratorOptions)
XMPIterator iterator(IteratorOptions options) throws XMPException
options
- Option flags to control the iteration.XMPIterator
.XMPException
- Wraps all errors and exceptions that may occur.iterator(String, String, IteratorOptions)
XMPIterator iterator(java.lang.String schemaNS, java.lang.String propName, IteratorOptions options) throws XMPException
schemaNS
- Optional schema namespace URI to restrict the iteration. Omitted (visit all
schema) by passing null
or empty String.propName
- Optional property name to restrict the iteration. May be an arbitrary path
expression. Omitted (visit all properties) by passing null
or empty
String. If no schema URI is given, it is ignored.options
- Option flags to control the iteration. See IteratorOptions
for
details.XMPIterator
for this XMPMeta
-object
considering the given options.XMPException
- Wraps all errors and exceptions that may occur.java.lang.String getObjectName()
void setObjectName(java.lang.String name)
name
- Sets the name of the XMP object.java.lang.String getPacketHeader()
null
is returned.java.lang.Object clone()
void sort()
java.lang.String dumpObject()
Copyright © 2010 - 2020 Adobe. All Rights Reserved