com.itextpdf.xmp.impl
Class XMPUtilsImpl

java.lang.Object
  extended by com.itextpdf.xmp.impl.XMPUtilsImpl
All Implemented Interfaces:
XMPConst

public class XMPUtilsImpl
extends Object
implements XMPConst

Since:
11.08.2006

Field Summary
 
Fields inherited from interface com.itextpdf.xmp.XMPConst
ARRAY_ITEM_NAME, ARRAY_LAST_ITEM, FALSESTR, NS_ADOBESTOCKPHOTO, NS_ASF, NS_BWF, NS_CAMERARAW, NS_CREATOR_ATOM, NS_DC, NS_DC_DEPRECATED, NS_DICOM, NS_DM, NS_EXIF, NS_EXIF_AUX, NS_EXIFX, NS_IPTCCORE, NS_IPTCEXT, NS_IX, NS_JP2K, NS_JPEG, NS_PDF, NS_PDFA_EXTENSION, NS_PDFA_FIELD, NS_PDFA_ID, NS_PDFA_PROPERTY, NS_PDFA_SCHEMA, NS_PDFA_TYPE, NS_PDFX, NS_PDFX_ID, NS_PHOTOSHOP, NS_PLUS, NS_PNG, NS_PSALBUM, NS_RDF, NS_RIFFINFO, NS_SCRIPT, NS_SWF, NS_TIFF, NS_TRANSIENT, NS_TXMP, NS_WAV, NS_X, NS_XML, NS_XMP, NS_XMP_BJ, NS_XMP_MM, NS_XMP_NOTE, NS_XMP_RIGHTS, RDF_TYPE, TAG_XAPMETA, TAG_XMPMETA, TRUESTR, TYPE_DIMENSIONS, TYPE_FONT, TYPE_GRAPHICS, TYPE_IDENTIFIERQUAL, TYPE_IMAGE, TYPE_MANIFESTITEM, TYPE_PAGEDFILE, TYPE_RESOURCEEVENT, TYPE_RESOURCEREF, TYPE_ST_JOB, TYPE_ST_VERSION, TYPE_TEXT, X_DEFAULT, XML_LANG, XMP_PI
 
Method Summary
static void appendProperties(XMPMeta source, XMPMeta destination, boolean doAllProperties, boolean replaceOldValues, boolean deleteEmptyValues)
           
static String catenateArrayItems(XMPMeta xmp, String schemaNS, String arrayName, String separator, String quotes, boolean allowCommas)
           
static void removeProperties(XMPMeta xmp, String schemaNS, String propName, boolean doAllProperties, boolean includeAliases)
           
static void separateArrayItems(XMPMeta xmp, String schemaNS, String arrayName, String catedStr, PropertyOptions arrayOptions, boolean preserveCommas)
          see XMPUtils.separateArrayItems(XMPMeta, String, String, String, PropertyOptions, boolean)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

catenateArrayItems

public static String catenateArrayItems(XMPMeta xmp,
                                        String schemaNS,
                                        String arrayName,
                                        String separator,
                                        String quotes,
                                        boolean allowCommas)
                                 throws XMPException
Parameters:
xmp - The XMP object containing the array to be catenated.
schemaNS - The schema namespace URI for the array. Must not be null or the empty string.
arrayName - The name of the array. May be a general path expression, must not be null or the empty string. Each item in the array must be a simple string value.
separator - The string to be used to separate the items in the catenated string. Defaults to "; ", ASCII semicolon and space (U+003B, U+0020).
quotes - The characters to be used as quotes around array items that contain a separator. Defaults to '"'
allowCommas - Option flag to control the catenation.
Returns:
Returns the string containing the catenated array items.
Throws:
XMPException - Forwards the Exceptions from the metadata processing
See Also:
XMPUtils.catenateArrayItems(XMPMeta, String, String, String, String, boolean)

separateArrayItems

public static void separateArrayItems(XMPMeta xmp,
                                      String schemaNS,
                                      String arrayName,
                                      String catedStr,
                                      PropertyOptions arrayOptions,
                                      boolean preserveCommas)
                               throws XMPException
see XMPUtils.separateArrayItems(XMPMeta, String, String, String, PropertyOptions, boolean)

Parameters:
xmp - The XMP object containing the array to be updated.
schemaNS - The schema namespace URI for the array. Must not be null or the empty string.
arrayName - The name of the array. May be a general path expression, must not be null or the empty string. Each item in the array must be a simple string value.
catedStr - The string to be separated into the array items.
arrayOptions - Option flags to control the separation.
preserveCommas - Flag if commas shall be preserved
Throws:
XMPException - Forwards the Exceptions from the metadata processing

removeProperties

public static void removeProperties(XMPMeta xmp,
                                    String schemaNS,
                                    String propName,
                                    boolean doAllProperties,
                                    boolean includeAliases)
                             throws XMPException
Parameters:
xmp - The XMP object containing the properties to be removed.
schemaNS - Optional schema namespace URI for the properties to be removed.
propName - Optional path expression for the property to be removed.
doAllProperties - Option flag to control the deletion: do internal properties in addition to external properties.
includeAliases - Option flag to control the deletion: Include aliases in the "named schema" case above.
Throws:
XMPException - If metadata processing fails
See Also:
XMPUtils.removeProperties(XMPMeta, String, String, boolean, boolean)

appendProperties

public static void appendProperties(XMPMeta source,
                                    XMPMeta destination,
                                    boolean doAllProperties,
                                    boolean replaceOldValues,
                                    boolean deleteEmptyValues)
                             throws XMPException
Parameters:
source - The source XMP object.
destination - The destination XMP object.
doAllProperties - Do internal properties in addition to external properties.
replaceOldValues - Replace the values of existing properties.
deleteEmptyValues - Delete destination values if source property is empty.
Throws:
XMPException - Forwards the Exceptions from the metadata processing
See Also:
XMPUtils.appendProperties(XMPMeta, XMPMeta, boolean, boolean)


Copyright © 2013. All Rights Reserved.