MetadataPreference

Metadata preferences.

Methods:

addEventListener, append, countContainer, createContainerItem, getElements, getProperty, removeEventListener, replace, save, setProperty, toSource, toSpecifier

Objects:

Boolean, CopyrightStatus, Date, EventListeners, Events, Object, String

Hierarchy:

Superclass: Preference

Class: MetadataPreference

Property Listing

Property

Type

Access

Description

author

String

read/write

The author of the document.

copyrightInfoURL

String

read/write

The URL of the file that contains the linked copyright statement.

copyrightNotice

String

read/write

The text to use as a copyright notice.

copyrightStatus

CopyrightStatus

CopyrightStatus.NO

CopyrightStatus.UNKNOWN

CopyrightStatus.YES

read/write

The copyright status of the document.

creationDate

Date

readonly

The creation date of the document.

creator

String

readonly

The name of the application used to create the document.

description

String

read/write

The description of the MetadataPreference.

documentTitle

String

read/write

The title of the document.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

format

String

readonly

The format of the document.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

jobName

String

read/write

The job name.

keywords

Array of String

read/write

The list of keywords associated with the document.

modificationDate

Date

readonly

The most recent modification date of the document.

parent

Document

readonly

The parent of the MetadataPreference (a Document).

properties

Object

read/write

A property that allows setting of several properties at the same time.

serverURL

String

readonly

The location of the document on the asset management server.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined append (from:File, [affectAll:Boolean=Boolean])

Uses metadata from the specified external file to define any undefined metadata properties in the document.

Parameter

Type

Description

from

File

The path to the external file that contains the metadata.

affectAll

Boolean

If true, also replaces existing metadata with data from the external file. If false, does not replace existing metadata. Note: Defaults to false. (Optional)

(default: false)

Number countContainer (namespace:String, path:String)

Counts the number of items in the container.

Parameter

Type

Description

namespace

String

The namespace of the container.

path

String

The path to the container.

undefined createContainerItem (namespace:String, path:String, [index:Number=Number], [container:ContainerType=ContainerType])

Creates an empty container.

Parameter

Type

Description

namespace

String

The namespace of the container.

path

String

The path to the container.

index

Number

The index of the item within the container. Specified values must be 1 or greater. To append the item to the end of the index and allow the next available value to be assigned, use 0. (Optional)

(default: 0)

container

ContainerType

ContainerType.ALT

ContainerType.BAG

ContainerType.SEQ

The container type. Note: Required when the new item is the first item added to the container. (Optional)

(default: ContainerType.BAG)

MetadataPreference getElements ()

Resolves the object specifier, creating an array of object references.

String getProperty (namespace:String, path:String)

Gets the XMP property value associated with the specified path.

Parameter

Type

Description

namespace

String

The namespace of the property.

path

String

The specified path.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined replace (using:File, [affectAll:Boolean=Boolean])

Replaces the current metadata in the document with metadata from the specified file.

Parameter

Type

Description

using

File

The full path to the file that contains the replacement metadata.

affectAll

Boolean

If true, treats all properties as external. Note: Defaults to false. (Optional)

(default: false)

undefined save (to:File)

Saves the metadata in the document to an external file.

Parameter

Type

Description

to

File

The path to the external file.

undefined setProperty (namespace:String, path:String, value:String)

Sets the XMP property associated with the specified path.

Parameter

Type

Description

namespace

String

The namespace of the property.

path

String

The specified path(s).

value

String

The value to assign to the property. Note: To remove the property, pass an empty string.

String toSource ()

Generates a string which, if executed, will return the MetadataPreference.

String toSpecifier ()

Retrieves the object specifier.

Object of

Document.metadataPreferences

Event.parent

EventListener.parent

MutationEvent.parent

Return

MetadataPreference.getElements()