Package org.apache.padaf.xmpbox.type

Examples of org.apache.padaf.xmpbox.type.Attribute


  @PropertyExtensionDefinition(propertyCategory = "external")
  public static final String MAIL_ADR = "mail";

  public BirthCertificateSchemaWithXMLDescriptions(XMPMetadata metadata) {
    super(metadata, PREFERED_PREFIX, NAMESPACE);
    this.setAttribute(new Attribute(null, "xmlns", "madn",
        "http://test.withfield.com/vt/"));
    this.setAboutAsSimple("");
  }
View Full Code Here


  }

  public void setMailaddr(String name, String domain) {
    ComplexPropertyContainer field = new ComplexPropertyContainer(metadata,
        localPrefix, MAIL_ADR);
    field.setAttribute(new Attribute(null, "rdf", "parseType", "Resource"));
    TextType namePart = new TextType(metadata, "madn", "name", name);
    TextType domainPart = new TextType(metadata, "madn", "domain", domain);
    field.addProperty(namePart);
    field.addProperty(domainPart);
    addProperty(field);
View Full Code Here

   */
  @Test
  public void testAttribute() throws Exception {

    IntegerType integer = new IntegerType(parent, "test", "integer", 1);
    Attribute value = new Attribute("http://www.test.org/test/", "test",
        "value1", "StringValue1");
    Attribute value2 = new Attribute(null, "test", "value2", "StringValue2");

    integer.setAttribute(value);

    // System.out.println(value.getQualifiedName());

    Assert.assertEquals(value, integer.getAttribute(value
        .getQualifiedName()));
    Assert.assertTrue(integer.containsAttribute(value.getQualifiedName()));

    // Replacement check

    integer.setAttribute(value2);
    Assert.assertEquals(value2, integer.getAttribute(value2
        .getQualifiedName()));

    integer.removeAttribute(value2.getQualifiedName());
    Assert
        .assertFalse(integer.containsAttribute(value2
            .getQualifiedName()));

    // Attribute with namespace Creation checking
    Attribute valueNS = new Attribute("http://www.tefst2.org/test/",
        "test2", "value2", "StringValue.2");
    integer.setAttribute(valueNS);
    Attribute valueNS2 = new Attribute("http://www.test2.org/test/",
        "test2", "value2", "StringValueTwo");
    integer.setAttribute(valueNS2);

    List<Attribute> atts = integer.getAllAttributes();
    /*
 
View Full Code Here

        this(metadata,PDFAEXTENSION);
    }

    public PDFAExtensionSchema(XMPMetadata metadata, String prefix) {
        super(metadata, prefix, PDFAEXTENSIONURI);
        setAttribute(new Attribute(NS_NAMESPACE, "xmlns", PDFASCHEMA,
                PDFASCHEMAURI));
        setAttribute(new Attribute(NS_NAMESPACE, "xmlns", PDFAPROPERTY,
                PDFAPROPERTYURI));
        setAttribute(new Attribute(NS_NAMESPACE, "xmlns", PDFATYPE, PDFATYPEURI));
        setAttribute(new Attribute(NS_NAMESPACE, "xmlns", PDFAFIELD,
                PDFAFIELDURI));

        descriptions = new SchemaDescriptionContainer();
        getElement().appendChild(descriptions.getElement());
View Full Code Here

            "Extension schema is declared without the pdfaSchema namespace specification");
        }
        namespaces.remove(PDFAEXTENSION);

        for (Entry<String, String> entry : namespaces.entrySet()) {
            setAttribute(new Attribute(NS_NAMESPACE, "xmlns", entry.getKey(),
                    entry.getValue()));
        }
        descriptions = new SchemaDescriptionContainer();
        getElement().appendChild(descriptions.getElement());
View Full Code Here

        this(metadata, PREFERED_JOB_TICKET_PREFIX);
    }

    public XMPBasicJobTicketSchema(XMPMetadata metadata, String ownPrefix) {
        super(metadata, ownPrefix, JOB_TICKET_URI);
        content.setAttribute(new Attribute(NS_NAMESPACE, "xmlns",
                JobType.PREFERED_PREFIX, JobType.ELEMENT_NS));

    }
View Full Code Here

   */
  public PDFAPropertyDescription(XMPMetadata metadata) {
    this.metadata = metadata;
    content = new ComplexPropertyContainer(metadata, "rdf", "li");
    content
        .setAttribute(new Attribute(null, "rdf", "parseType",
            "Resource"));
  }
View Full Code Here

   */
  public PDFAFieldDescription(XMPMetadata metadata) {
    this.metadata = metadata;
    content = new ComplexPropertyContainer(metadata, "rdf", "li");
    content
        .setAttribute(new Attribute(null, "rdf", "parseType",
            "Resource"));
  }
View Full Code Here

TOP

Related Classes of org.apache.padaf.xmpbox.type.Attribute

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.