com.adobe.livecycle.xmputility.client
Class XMPUtilityServiceClient

java.lang.Object
  extended by com.adobe.livecycle.xmputility.client.XMPUtilityServiceClient

public class XMPUtilityServiceClient
extends java.lang.Object

Enables the creation of a Java object that invokes operations that belong to the XMP Utility service. Using this object, you can perform tasks such as retrieving metadata from a PDF document or replacing a PDF document's metadata. XMP provides a standard format for creating, processing, and interchanging metadata for a wide variety of applications. XMP provides a model by which metadata is represented. XMP metadata is encoded as XML-formatted text that uses the W3C standard Resource Description Framework (RDF).

In XMP, metadata consists of a set of properties that are associated with a document. Metadata includes such properties as the author and title. In a PDF file, metadata can be stored in two places:

For information, see Working With The XMP Utility Service.


Constructor Summary
XMPUtilityServiceClient(ServiceClientFactory serviceClientFactory)
          Used to create an XMPUtilityService client.
 
Method Summary
 XMPUtilityMetadata exportMetadata(Document pdf)
          Returns the metadata located within a PDF document as an XMPUtilityMetadata object.
 Document exportXMP(Document pdf)
          Returns the metadata located within a PDF document as an XMP document.
 java.lang.String getVersion()
          Returns the version of the XMP Utility service.
 Document importMetadata(Document pdf, XMPUtilityMetadata metadata)
          Replaces the metadata located within a PDF document with new metadata.
 Document importXMP(Document pdf, Document xmp)
          Replaces the metadata located in a PDF document with newer metadata.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMPUtilityServiceClient

public XMPUtilityServiceClient(ServiceClientFactory serviceClientFactory)
Used to create an XMPUtilityService client.

Parameters:
serviceClientFactory - The service client factory needed to create an instance of the XMPUtilityService client.
Method Detail

getVersion

public java.lang.String getVersion()
Returns the version of the XMP Utility service.

Returns:
A string value that specifies the version of the XMP Utility service, including the build number.

importXMP

public Document importXMP(Document pdf,
                          Document xmp)
                   throws XMPUtilityException
Replaces the metadata located in a PDF document with newer metadata.

Parameters:
pdf - A Document object that represents the PDF document for which metadata is replaced.
xmp - A Document object that represents XMP metadata.
Returns:
A Document object that represents the PDF document that contains new metadata.
Throws:
XMPUtilityException - if an error occurs during this operation.

exportXMP

public Document exportXMP(Document pdf)
                   throws XMPUtilityException
Returns the metadata located within a PDF document as an XMP document.

Parameters:
pdf - A Document object that represents the PDF document for which metadata is returned.
Returns:
A Document object that represents XMP metadata. Data located within this object can be written to an XML file.
Throws:
XMPUtilityException - if an error occurs during this operation.

importMetadata

public Document importMetadata(Document pdf,
                               XMPUtilityMetadata metadata)
                        throws XMPUtilityException
Replaces the metadata located within a PDF document with new metadata. Any null values in the supplied XMPUtilityMetadata object removes entries from the metadata.

Parameters:
pdf - A Document object that represents the PDF document for which metadata is replaced.
metadata - A XMPUtilityMetadata object that contains metadata values that are used to replace existing metadata.
Returns:
A Document object that represents the PDF document that contains new metadata.
Throws:
XMPUtilityException - if an error occurs during this operation.

exportMetadata

public XMPUtilityMetadata exportMetadata(Document pdf)
                                  throws XMPUtilityException
Returns the metadata located within a PDF document as an XMPUtilityMetadata object.

Parameters:
pdf - A Document object that represents the PDF document for which metadata is returned.
Returns:
An XMPUtilityMetadata object that represents XMP metadata.
Throws:
XMPUtilityException - if an error occurs during this operation.