Package | com.adobe.xmp |
Interface | public interface IXMPAccess |
Provides access to and manipulation of XMP metadata within the context of a File Info dialog panel.
All methods access metadata properties using an XPath-like path into
the XMP packet, such as xmp:Rating
. The prefixes used are local to the
panel and must be defined in an XMPNamespace tag. For example:
<fi:XMPNamespace prefix="xmp" value="http://ns.adobe.com/xap/1.0/"/>
For details of XMP architecture and usage, see the XMP Toolkit documentation.
Method | Defined by | ||
---|---|---|---|
appendArrayItem(arrayPath:String, itemValue:String, itemOptions:int = 0, arrayOptions:int = 0):void
Adds an item to an array, creating the array if necessary.
| IXMPAccess | ||
catenateArrayItems(arrayPath:String, allowCommas:Boolean = false):IXMPProperty
Converts an array of simple properties into a semicolon-separated display string.
| IXMPAccess | ||
countArrayItems(arrayPath:String):int
Reports the number of items currently defined in an array.
| IXMPAccess | ||
deleteProperty(propertyPath:String):void
Deletes an XMP subtree rooted at a given property.
| IXMPAccess | ||
getArrayItem(arrayPath:String, itemIndex:int):IXMPProperty
Retrieves an item from an array property.
| IXMPAccess | ||
getLocalizedText(altTextPath:String, locale:String = "x-default"):IXMPProperty
Retrieves a locale-specific value from an alt-text array.
| IXMPAccess | ||
getLocalPrefix(ns:String):String
Retrieves the registered prefix for a namespace.
| IXMPAccess | ||
getNamespaceForLocalPrefix(localPrefix:String):String
Retrieves the namespace for a registered prefix.
| IXMPAccess | ||
getProperty(propertyPath:String):IXMPProperty
Retrieves a property value.
| IXMPAccess | ||
getPropertyList(propName:String):Array
Retrieves child elements of a namespace or property.
| IXMPAccess | ||
getXMPPacket():String
Retrieves the XMPPacket as a whole, in the current modified state.
| IXMPAccess | ||
removeProperties(propName:String = null, options:int = 0):void
Removes properties of a given type in an XMP subtree rooted at a given property.
| IXMPAccess | ||
restoreProperty(propertyPath:String):void
Restores a property value.
| IXMPAccess | ||
separateArrayItems(arrayPath:String, catedStr:String, arrayOptions:int = 0, allowCommas:Boolean = false):void
Converts a concatenated array-item string back into array item.
| IXMPAccess | ||
setLocalizedText(altTextPath:String, locale:String = "x-default", itemValue:String = "", setOptions:int = 0):void
Adds or modifies a locale-specific value in an alt-text array.
| IXMPAccess | ||
setProperty(propertyPath:String, propValue:String, options:int = 0):void
Creates or sets a property value.
| IXMPAccess |
appendArrayItem | () | method |
public function appendArrayItem(arrayPath:String, itemValue:String, itemOptions:int = 0, arrayOptions:int = 0):void
Adds an item to an array, creating the array if necessary.
ParametersarrayPath:String — The XPath to the array. The namespace must be registered.
|
|
itemValue:String — The new item value.
|
|
itemOptions:int (default = 0 ) — Option flags describing the type of item to create.
A logical OR of allowed bit-flag constants:
|
|
arrayOptions:int (default = 0 ) — Option flags describing the array type to create;
A logical OR of allowed bit-flag constants:
|
catenateArrayItems | () | method |
public function catenateArrayItems(arrayPath:String, allowCommas:Boolean = false):IXMPProperty
Converts an array of simple properties into a semicolon-separated display string.
ParametersarrayPath:String — The name of an array-type property containing simple values.
|
|
allowCommas:Boolean (default = false ) — When true, allow comma in values. When false, truncate value at first comma.
|
IXMPProperty —
The constructed string, encapsulated in an IXMPProperty object.
|
countArrayItems | () | method |
public function countArrayItems(arrayPath:String):int
Reports the number of items currently defined in an array.
ParametersarrayPath:String — The XPath to the array. The namespace must be registered.
|
int — The number of items.
|
deleteProperty | () | method |
public function deleteProperty(propertyPath:String):void
Deletes an XMP subtree rooted at a given property.
ParameterspropertyPath:String — The XPath to the property. The namespace must be registered.
|
getArrayItem | () | method |
public function getArrayItem(arrayPath:String, itemIndex:int):IXMPProperty
Retrieves an item from an array property.
ParametersarrayPath:String — The XPath to the property. The namespace must be registered.
|
|
itemIndex:int — The 1-based index of the desired item.
|
IXMPProperty —
The value, encapsulated as an IXMPProperty object.
|
getLocalizedText | () | method |
public function getLocalizedText(altTextPath:String, locale:String = "x-default"):IXMPProperty
Retrieves a locale-specific value from an alt-text array.
ParametersaltTextPath:String — The XPath to the alt-text array. The namespace prefix must be registered.
|
|
locale:String (default = "x-default ") — Optional, the locale code for the desired locale. If not specified, gets the x-default value.
|
IXMPProperty —
The translated value, encapsulated as an IXMPProperty object.
|
getLocalPrefix | () | method |
public function getLocalPrefix(ns:String):String
Retrieves the registered prefix for a namespace.
Parametersns:String — The namespace string.
|
String — The prefix string.
|
getNamespaceForLocalPrefix | () | method |
public function getNamespaceForLocalPrefix(localPrefix:String):String
Retrieves the namespace for a registered prefix.
ParameterslocalPrefix:String — The prefix string.
|
String — The namespace string.
|
getProperty | () | method |
public function getProperty(propertyPath:String):IXMPProperty
Retrieves a property value. This is the simplest property getter. Use it for top-level simple properties, or after composing a complex path.
ParameterspropertyPath:String — The XPath to the property. The namespace must be registered.
|
IXMPProperty —
The value, encapsulated as an IXMPProperty object.
|
getPropertyList | () | method |
public function getPropertyList(propName:String):Array
Retrieves child elements of a namespace or property. If the property is a struct, these are the fields. If it is an array, these are the items.
ParameterspropName:String — A namespace or a property path. Can be:
|
Array — An Array containing the child properties, or null if the root property is a simple property.
|
getXMPPacket | () | method |
public function getXMPPacket():String
Retrieves the XMPPacket as a whole, in the current modified state.
ReturnsString — The XMPPacket string.
|
removeProperties | () | method |
public function removeProperties(propName:String = null, options:int = 0):void
Removes properties of a given type in an XMP subtree rooted at a given property.
ParameterspropName:String (default = null ) — The name of the root property.
|
|
options:int (default = 0 ) — Option flags describing properties to be removed.
A logical OR of allowed bit-flag constants:
|
restoreProperty | () | method |
public function restoreProperty(propertyPath:String):void
Restores a property value. Reverts a single property to its state before modification. This is used for Multiple Files mode.
ParameterspropertyPath:String — The XPath to the property. The namespace must be registered.
|
separateArrayItems | () | method |
public function separateArrayItems(arrayPath:String, catedStr:String, arrayOptions:int = 0, allowCommas:Boolean = false):void
Converts a concatenated array-item string back into array item.
ParametersarrayPath:String — The name of an array-type property containing simple values.
|
|
catedStr:String — The concatenated string of values.
|
|
arrayOptions:int (default = 0 ) — Option flags describing the array type to create;
A logical OR of allowed bit-flag constants:
|
|
allowCommas:Boolean (default = false ) — When true, allow comma in values. When false, truncate value at first comma.
|
setLocalizedText | () | method |
public function setLocalizedText(altTextPath:String, locale:String = "x-default", itemValue:String = "", setOptions:int = 0):void
Adds or modifies a locale-specific value in an alt-text array.
ParametersaltTextPath:String — The path to the alt-text array. The namespace prefix must be registered.
|
|
locale:String (default = "x-default ") — Optional, the locale code for the desired locale. If not specified, sets the x-default value.
|
|
itemValue:String (default = " ") — The localized value.
|
|
setOptions:int (default = 0 ) — Not used.
|
setProperty | () | method |
public function setProperty(propertyPath:String, propValue:String, options:int = 0):void
Creates or sets a property value. This is the simplest property setter. Use it for top-level simple properties, or after composing a complex path.
ParameterspropertyPath:String — The XPath to the property. The namespace must be registered.
|
|
propValue:String — The new value.
|
|
options:int (default = 0 ) — Option flags describing the property type.
Must match the type of a property that already exists.
A logical OR of allowed bit-flag constants:
|