Package com.itextpdf.kernel.xmp.impl
Class XMPUtilsImpl
java.lang.Object
com.itextpdf.kernel.xmp.impl.XMPUtilsImpl
- All Implemented Interfaces:
-
XMPConst
- Since:
- 11.08.2006
-
Field Summary
Fields inherited from interface com.itextpdf.kernel.xmp.XMPConst
ARRAY_ITEM_NAME, ARRAY_LAST_ITEM, CONFORMANCE, FALSESTR, HISTORY, 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_PDFUA_ID, 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, PART, RDF_TYPE, REV, TAG_XAPMETA, TAG_XMPMETA, TITLE, 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
Modifier and TypeMethodDescriptionstatic 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)
-
Method Details
-
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:
-
separateArrayItems
public static void separateArrayItems(XMPMeta xmp, String schemaNS, String arrayName, String catedStr, PropertyOptions arrayOptions, boolean preserveCommas) throws XMPException - 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:
-
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:
-