Specifications
Returns true if there is a structure property at the
XMP location path.
hasStruct( xmp-path : String, prefix-map :
Map ) : Boolean
Returns true if there is an array property at the
XMP location path.
hasArray( xmp-path : String, prefix-map :
Map ) : Boolean
Returns true if there is an Alt-Text array property
at the XMP location path (that is, an array
hasAltTextArray( xmp-path : String,
prefix-map : Map ) : Boolean
property of type “Alt” with leaf properties as
children).
Returns the number of items in the array at the
XMP location path or 0 if there is no such property
or if it is not an array.
getArrayItemCount( xmp-path : String,
prefix-map : Map ) : Number
Querying values
The query functions described below return the null object (as opposed to an empty string or a
zero number) if:
• The location path does not point to a leaf property (i.e. the property is not present or it is
present but it is an array or a struct rather than a leaf).
• The string value does not conform to the format for the requested data type.
Returns the value of the leaf property at the specified XMP
location path.
getString( xmp-path : String,
prefix-map : Map ) : String
Same as getString but interprets the string as a decimal
number (with or without a decimal point) or as a rational
getNumber( xmp-path : String,
prefix-map: Map ) : Number
number (two decimal integer numbers separated by a
forward slash). For example, “1.25” and “5/4” represent
the same number.
Same as getString but interprets the string as a Boolean
value. The preferred strings are “True” and “False”. If
getBoolean( xmp-path : String,
prefix-map: Map ) : Boolean
these do not match, a case insensitive comparison is tried,
then simply “t” or “f”, and finally non-zero and zero
integer representations.
Same as getString but interprets the string as a date-time
in the ISO 8601 format. The class of the returned Date
object is specific to the scripting environment in use.
getDate( xmp-path : String,
prefix-map : Map ) : Date
Querying localized text
Localized text properties are stored in alt-text arrays. They allow multiple concurrent localizations
of a property value, for example a document title or copyright in several languages.
The most important aspect of these functions is that they select an appropriate array item based
on one or two RFC 3066 language tags. One of these languages, the "specific" language, is
preferred and selected if there is an exact match. For many languages it is also possible to define
482
Enfocus Switch 10










