Package com.adobe.xmp.options

Examples of com.adobe.xmp.options.PropertyOptions


     */
    protected void createArrayProperty(String tikaKey, String ns, String propertyName, int arrayType)
            throws XMPException {
        String[] values = metadata.getValues( tikaKey );
        if (values != null) {
            meta.setProperty( ns, propertyName, null, new PropertyOptions( arrayType ) );
            for (String value : values) {
                meta.appendArrayItem( ns, propertyName, value );
            }
        }
    }
View Full Code Here


     */
    protected void createCommaSeparatedArray(String tikaKey, String ns, String propertyName,
            int arrayType) throws XMPException {
        String value = metadata.get( tikaKey );
        if (value != null && value.length() > 0) {
            XMPUtils.separateArrayItems( meta, ns, propertyName, value, new PropertyOptions(
                    arrayType ), false );
        }
    }
View Full Code Here

    XMPNode schemaNode = tree.findChildByName(namespaceURI);
   
    if (schemaNode == null  &&  createNodes)
    {
      schemaNode = new XMPNode(namespaceURI,
        new PropertyOptions()
          .setSchemaNode(true));
      schemaNode.setImplicit(true);
     
      // only previously registered schema namespaces are allowed in the XMP tree.
      String prefix = XMPMetaFactory.getSchemaRegistry().getNamespacePrefix(namespaceURI);
View Full Code Here

     
    XMPNode childNode = parent.findChildByName(childName);
   
    if (childNode == null  &&  createNodes)
    {
      PropertyOptions options = new PropertyOptions();
      childNode = new XMPNode(childName, options);
      childNode.setImplicit(true);
      parent.addChild(childNode);
    }
   
View Full Code Here

  {
    // create empty and fix existing options
    if (options == null)
    {
      // set default options
      options = new PropertyOptions();
    }
   
    if (options.isArrayAltText())
    {
      options.setArrayAlternate(true);
View Full Code Here

    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

    ParameterAsserts.assertSchemaNS(schemaNS);
    ParameterAsserts.assertArrayName(arrayName);

    if (arrayOptions == null)
    {
      arrayOptions = new PropertyOptions();
    }
    if (!arrayOptions.isOnlyArrayOptions())
    {
      throw new XMPException("Only array form flags allowed for arrayOptions",
          XMPError.BADOPTIONS);
View Full Code Here

TOP

Related Classes of com.adobe.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.