PreferencesMetadataPreference

Metadata preferences.

Extends

Instance Properties

Name Description Access
author string The author of the document. read-write
copyrightInfoURL string The URL of the file that contains the linked copyright statement. read-write
copyrightNotice string The text to use as a copyright notice. read-write
copyrightStatus CopyrightStatus The copyright status of the document. read-write
creationDate Date The creation date of the document. read-only
creator string The name of the application used to create the document. read-only
description string The description of the MetadataPreference. read-write
documentTitle string The title of the document. read-write
eventListeners EventListeners A collection of event listeners. read-only
events Events A collection of events. read-only
format string The format of the document. read-only
isValid bool Returns true if the object specifier resolves to valid objects. read-only
jobName string The job name. read-write
keywords string The list of keywords associated with the document. read-write
modificationDate Date The most recent modification date of the document. read-only
parent Document The parent of the MetadataPreference (a Document). read-only
properties Object A property that allows setting of several properties at the same time. read-write
serverURL string The location of the document on the asset management server. read-only

Methods

addEventListener(
eventType, handler ​[, captures])
 → EventListener
append(
from ​[, affectAll])
countContainer(
namespace, path)
 → number
createContainerItem(
namespace, path ​[, index] ​[, container])
getProperty(
namespace, path)
 → string
removeEventListener(
eventType, handler ​[, captures])
 → bool
replace(
using ​[, affectAll])
save(
to)
setProperty(
namespace, path, value)
toSource(
)
 → string
toSpecifier(
)
 → string
addEventListener(
eventType, handler ​[, captures=false])
 → EventListener
Adds an event listener.
eventType string The event type.
handler The event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
append(
from ​[, affectAll=false])
Uses metadata from the specified external file to define any undefined metadata properties in the document.
from File The path to the external file that contains the metadata.
affectAll bool If true, also replaces existing metadata with data from the external file. If false, does not replace existing metadata. Note: Defaults to false. (Optional)
countContainer(
namespace, path)
 → number
Counts the number of items in the container.
namespace string The namespace of the container.
path string The path to the container.
createContainerItem(
namespace, path ​[, index=0] ​[, container=ContainerType.BAG])
Creates an empty container.
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)
container ContainerType The container type. Note: Required when the new item is the first item added to the container. (Optional)
getElements(
)
 → MetadataPreference
Resolves the object specifier, creating an array of object references.
getProperty(
namespace, path)
 → string
Gets the XMP property value associated with the specified path.
namespace string The namespace of the property.
path string The specified path.
removeEventListener(
eventType, handler ​[, captures=false])
 → bool
Removes the event listener.
eventType string The registered event type.
handler The registered event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
replace(
using ​[, affectAll=false])
Replaces the current metadata in the document with metadata from the specified file.
using File The full path to the file that contains the replacement metadata.
affectAll bool If true, treats all properties as external. Note: Defaults to false. (Optional)
save(
to)
Saves the metadata in the document to an external file.
to File The path to the external file.
setProperty(
namespace, path, value)
Sets the XMP property associated with the specified path.
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.
toSource(
)
 → string
Generates a string which, if executed, will return the MetadataPreference.
toSpecifier(
)
 → string
Retrieves the object specifier.