Class XMPUtilsImpl

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

public final class XMPUtilsImpl extends Object implements XMPConst
Since:
11.08.2006
  • 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: