Package com.itextpdf.xmp.options

Examples of com.itextpdf.xmp.options.PropertyOptions


    XMPNode arrayNode = XMPNodeUtils.findNode(xmp.getRoot(), arrayPath, false, null);
    if (arrayNode != null)
    {
      // The array exists, make sure the form is compatible. Zero
      // arrayForm means take what exists.
      PropertyOptions arrayForm = arrayNode.getOptions();
      if (!arrayForm.isArray() || arrayForm.isArrayAlternate())
      {
        throw new XMPException("Named property must be non-alternate array",
          XMPError.BADXPATH);
      }
      if (arrayOptions.equalArrayTypes(arrayForm))
View Full Code Here


          sourceSchema.getName(), false);
      boolean createdSchema = false;
      if (destSchema == null)
      {
        destSchema = new XMPNode(sourceSchema.getName(), sourceSchema.getValue(),
            new PropertyOptions().setSchemaNode(true));
        dest.getRoot().addChild(destSchema);
        createdSchema = true;
      }

      // Process the source schema's children.     
View Full Code Here

    else
    {
      // The destination exists and is not totally replaced. Structs and
      // arrays are merged.

      PropertyOptions sourceForm = sourceNode.getOptions();
      PropertyOptions destForm = destNode.getOptions();
      if (sourceForm != destForm)
      {
        return;
      }
      if (sourceForm.isStruct())
View Full Code Here

   * @return Returns true if the nodes are equal, false otherwise.
   * @throws XMPException Forwards exceptions to the calling method.
   */
  private static boolean itemValuesMatch(XMPNode leftNode, XMPNode rightNode) throws XMPException
  {
    PropertyOptions leftForm = leftNode.getOptions();
    PropertyOptions rightForm = rightNode.getOptions();

    if (leftForm.equals(rightForm))
    {
      return false;
    }
View Full Code Here

     * @param id
     */
    static public void setIdentifiers(XMPMeta xmpMeta, String[] id) throws XMPException {
        XMPUtils.removeProperties(xmpMeta, XMPConst.NS_DC, IDENTIFIER, true, true);
        for (int i = 0; i < id.length; i++) {
            xmpMeta.appendArrayItem(XMPConst.NS_DC, IDENTIFIER, new PropertyOptions(PropertyOptions.ARRAY), id[i], null);
        }
    }
View Full Code Here

     *
     * @param xmpMeta
     * @param title
     */
    static public void addTitle(XMPMeta xmpMeta, String title) throws XMPException {
        xmpMeta.appendArrayItem(XMPConst.NS_DC, TITLE, new PropertyOptions(PropertyOptions.ARRAY_ALTERNATE), title, null);
    }
View Full Code Here

     *
     * @param xmpMeta
     * @param desc
     */
    static public void addDescription(XMPMeta xmpMeta, String desc) throws XMPException {
        xmpMeta.appendArrayItem(XMPConst.NS_DC, DESCRIPTION, new PropertyOptions(PropertyOptions.ARRAY_ALTERNATE), desc, null);

    }
View Full Code Here

     *
     * @param xmpMeta
     * @param subject
     */
    static public void addSubject(XMPMeta xmpMeta, String subject) throws XMPException {
        xmpMeta.appendArrayItem(XMPConst.NS_DC, SUBJECT, new PropertyOptions(PropertyOptions.ARRAY), subject, null);
    }
View Full Code Here

     * @param subject array of subjects
     */
    static public void setSubject(XMPMeta xmpMeta, String[] subject) throws XMPException {
        XMPUtils.removeProperties(xmpMeta, XMPConst.NS_DC, SUBJECT, true, true);
        for (int i = 0; i < subject.length; i++) {
            xmpMeta.appendArrayItem(XMPConst.NS_DC, SUBJECT, new PropertyOptions(PropertyOptions.ARRAY), subject[i], null);
        }
    }
View Full Code Here

     *
     * @param xmpMeta
     * @param author
     */
    static public void addAuthor(XMPMeta xmpMeta, String author) throws XMPException {
        xmpMeta.appendArrayItem(XMPConst.NS_DC, CREATOR, new PropertyOptions(PropertyOptions.ARRAY_ORDERED), author, null);
    }
View Full Code Here

TOP

Related Classes of com.itextpdf.xmp.options.PropertyOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.