ARRAY_ITEM_NAME, ARRAY_LAST_ITEM, FALSESTR, NS_ADOBESTOCKPHOTO, NS_ASF, NS_BWF, NS_CAMERARAW, NS_CCV, 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| Modifier and Type | Method and Description |
|---|---|
static void |
appendProperties(XMPMeta source,
XMPMeta destination,
boolean doAllProperties,
boolean replaceOldValues,
boolean deleteEmptyValues) |
static void |
applyTemplate(XMPMeta OrigXMP,
XMPMeta tempXMP,
TemplateOptions actions)
modifies a working XMP object according to a template object.
|
static String |
catenateArrayItems(XMPMeta xmp,
String schemaNS,
String arrayName,
String separator,
String quotes,
boolean allowCommas) |
static void |
duplicateSubtree(XMPMeta source,
XMPMeta dest,
String sourceNS,
String sourceRoot,
String destNS,
String destRoot,
PropertyOptions options) |
static void |
mergeFromJPEG(XMPMeta fullXMP,
XMPMeta extendedXMP)
merges standard and extended XMP retrieved from a JPEG file.
|
static void |
packageForJPEG(XMPMeta origXMPImpl,
StringBuilder stdStr,
StringBuilder extStr,
StringBuilder digestStr)
creates XMP serializations appropriate for a JPEG file.
|
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)
|
public static String catenateArrayItems(XMPMeta xmp, String schemaNS, String arrayName, String separator, String quotes, boolean allowCommas) throws XMPException
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.XMPException - Forwards the Exceptions from the metadata processingXMPUtils.catenateArrayItems(XMPMeta, String, String, String, String,
boolean)public static void separateArrayItems(XMPMeta xmp, String schemaNS, String arrayName, String catedStr, PropertyOptions arrayOptions, boolean preserveCommas) throws XMPException
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 preservedXMPException - Forwards the Exceptions from the metadata processingpublic static void removeProperties(XMPMeta xmp, String schemaNS, String propName, boolean doAllProperties, boolean includeAliases) throws XMPException
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.XMPException - If metadata processing failsXMPUtils.removeProperties(XMPMeta, String, String, boolean, boolean)public static void appendProperties(XMPMeta source, XMPMeta destination, boolean doAllProperties, boolean replaceOldValues, boolean deleteEmptyValues) throws XMPException
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.XMPException - Forwards the Exceptions from the metadata processingXMPUtils.appendProperties(XMPMeta, XMPMeta, boolean, boolean)public static void duplicateSubtree(XMPMeta source, XMPMeta dest, String sourceNS, String sourceRoot, String destNS, String destRoot, PropertyOptions options) throws XMPException
XMPExceptionpublic static void packageForJPEG(XMPMeta origXMPImpl, StringBuilder stdStr, StringBuilder extStr, StringBuilder digestStr) throws XMPException, NoSuchAlgorithmException
origXMPImpl - The XMP object containing the metadata.stdStr - A string object in which to return the full standard XMP
packet.extStr - A string object in which to return the serialized extended
XMP, empty if not needed.digestStr - A string object in which to return an MD5 digest of the
serialized extended XMP, empty if not needed.NoSuchAlgorithmException - if fail to find algorithm for MD5XMPException - in case of internal error occurs.public static void mergeFromJPEG(XMPMeta fullXMP, XMPMeta extendedXMP) throws XMPException
fullXMP - An XMP object which the caller has initialized from the
standard XMP packet in a JPEG file. The extended XMP is added
to this object.extendedXMP - An XMP object which the caller has initialized from the
extended XMP packet in a JPEG file.XMPException - in case of internal error occurs.public static void applyTemplate(XMPMeta OrigXMP, XMPMeta tempXMP, TemplateOptions actions) throws XMPException
OrigXMP - The destination XMP object.tempXMP - The template to apply to the destination XMP object.actions - Option flags to control the copying. If none are specified,
the properties and values in the working XMP do not change. A
logical OR of these bit-flag constants:
CLEAR_UNNAMED_PROPERTIES Delete anything
that is not in the template.
ADD_NEW_PROPERTIES Add properties; see
detailed description.
REPLACE_EXISTING_PROPERTIES Replace the
values of existing properties.
REPLACE_WITH_DELETE_EMPTY Replace the
values of existing properties and delete properties if the new
value is empty.
INCLUDE_INTERNAL_PROPERTIES Operate on
internal properties as well as external properties.
XMPException - in case of internal error occurs.Copyright © 2025. All rights reserved.