External metadata

Switch offers substantial support for importing, exporting, transforming and using metadata through a combination of:


For example, using simple script expressions you can route a job and set its processing parameters based on metadata provided with the job.

Also see metadata overview.

Picking up metadata

Switch allows permanently associating metadata with a job moving through the flow (by storing a reference to it in the job's internal job ticket). Each distinct set of metadata fields (for example, a JDF job ticket or an XMP packet) are stored in a separate metadata dataset. Switch supports several types of datasets, each with a specific data model that determines the semantics for querying values from the dataset. See below for information on supported data models.

Metadata can originate from a number of different sources including a job ticket provided with a job, an XMP packet embedded in a file, statistics derived from a file's contents and manual data entry through SwitchClient. Certain flow elements, including several built-in metadata pickup tools, can associate a new metadata dataset with a job being processed through the tool. Each dataset is given a unique name. Therefore, multiple datasets of the same type can be associated with a job (for example: two JDF job tickets, each in its own dataset with a distinct name).

To pickup metadata from a particular source, a flow designer must explicitly place the appropriate pickup tool or configurator in the flow, at a location before the metadata is actually queried. See below for a list of typical metadata sources and the corresponding Switch tools.

Using metadata

The Switch scripting API provides access to the contents of all metadata datasets already associated with a job and offers the appropriate functions for querying metadata values in each dataset, depending on its data model. Furthermore, the scripting API allows adding a new dataset or replacing an existing one.

Using script expressions, a flow can route a job and set its processing parameters based on the contents of metadata fields associated with the job. Script elements offer complete freedom for importing, exporting, transforming and using metadata at will.

Variables in the Metadata group provide access to any external metadata field associated with a job. Switch allows the use of variables in the values of many text properties and for defining file filters.

Updating metadata

The datasets picked up in the manner described above are called external datasets, as opposed to the embedded dataset which references information stored inside the file - see embedded metadata.

Switch does not support updating the value of individual metadata fields within an external dataset. This limitation does not apply to an embedded dataset (see Read-write access through scripting) or to hierarchy info and email info (which is stored directly in the internal job ticket and not in a metadata dataset).

Note that, despite this limitation, it is possible to replace an external dataset as a whole by a new version.

Exporting and transforming metadata

Any metadata dataset associated with a job can be exported as a separate file (in the same format) using the export metadata tool. The result can be further transformed to an appropriate XML, HTML or text file using the XSLT transform tool.

Metadata data models

Switch supports the following metadata data models and corresponding querying mechanisms:

Data model

Description

Query mechanism

Scripting API

XML

Any well-formed XML file (with or without XML namespaces); refer to the XML 1.0 specification

XPath 1.0 expression and/or location path

Dataset class, XML data model

JDF

A JDF file conforming to the JDF 1.3 specification

XPath 1.0 location path

Dataset class, JDF data model

XMP

An Adobe XMP packet or file conforming to the Adobe XMP specification dated September 2005

Adobe XMP location path (subset of XPath)

Dataset class, XMP data model

Opaque

An arbitrary data file (allows associating information such as a human readable report with a job)

None

Dataset class, Opaque data model

Metadata resources

The following table lists various metadata sources and the corresponding metadata data models. The default dataset name can be overridden in most cases to allow associating more than one dataset of the same type with a job.

Source

Pickup tool

Data model

Default dataset name

Email message components

Mail receive

XML

Email

Manual entry in SwitchClient

Fields defined in Submit point or Checkpoint

XML

Submit or Check

Separate XML file

XML pickup

XML

Xml

Separate JDF file

JDF pickup

JDF

Jdf

Separate XMP file

XMP pickup

XMP

Xmp

Embedded XMP packet

XMP pickup

XMP

Xmp

Any data file

Opaque pickup

Opaque

Opaque

Adobe Acrobat JDF

Uncompress MIME file; then JDF pickup

JDF

Jdf

QuarkXPress Job Jacket

JDF pickup

JDF

Jdf

PDF contents statistics

Apago PDFspy configurator

XML

Pdf

Preflight results

callas pdfInspektor or Enfocus PitStop Server or Markzware FlightCheck Professional configurator (with XML report); then XML pickup

XML

Xml

Text log or PDF preflight report

Any configurator with outgoing traffic light connections (set the "carry this type of files" property to "data with log")

Opaque

Log