Examples of PropertyOptions


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

Examples of com.adobe.xmp.options.PropertyOptions

     */
    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

Examples of com.adobe.xmp.options.PropertyOptions

    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

Examples of com.itextpdf.xmp.options.PropertyOptions

        "XML namespace required for all elements and attributes", BADRDF);
    }

   
    // create schema node if not already there
    PropertyOptions childOptions = new PropertyOptions();
    boolean isAlias = false;
    if (isTopLevel)
    {
      // Lookup the schema node, adjust the XMP parent pointer.
      // Incoming parent must be the tree root.
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

    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

Examples of com.itextpdf.xmp.options.PropertyOptions

     
    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

Examples of com.itextpdf.xmp.options.PropertyOptions

  {
    // 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

Examples of com.itextpdf.xmp.options.PropertyOptions

   * Removes one qualifier node and fixes the options.
   * @param qualNode qualifier to remove
   */
  public void removeQualifier(XMPNode qualNode)
  {
    PropertyOptions opts = getOptions();
    if (qualNode.isLanguageNode())
    {
      // if "xml:lang" is removed, remove hasLanguage-flag too
      opts.setHasLanguage(false);
    }
    else if (qualNode.isTypeNode())
    {
      // if "rdf:type" is removed, remove hasType-flag too
      opts.setHasType(false);
    }
   
    getQualifier().remove(qualNode);
    if (qualifier.isEmpty())
    {
      opts.setHasQualifiers(false);
      qualifier = null;
    }
   
  }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

  /**
   * Removes all qualifiers from the node and sets the options appropriate.
   */
  public void removeQualifiers()
  {
    PropertyOptions opts = getOptions();
    // clear qualifier related options
    opts.setHasQualifiers(false);
    opts.setHasLanguage(false);
    opts.setHasType(false);
    qualifier = null;
  }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

   *
   * @see java.lang.Object#clone()
   */
  public Object clone()
  {
    PropertyOptions newOptions;
    try
    {
      newOptions = new PropertyOptions(getOptions().getOptions());
    }
    catch (XMPException e)
    {
      // cannot happen
      newOptions = new PropertyOptions();
    }
   
    XMPNode newNode = new XMPNode(name, value, newOptions);
    cloneSubtree(newNode);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.