Search in sources :

Example 1 with ChoiceType

use of org.apache.xmpbox.type.ChoiceType in project mustangproject by ZUGFeRD.

the class XMPSchemaPDFAExtensions method addProperty.

private DefinedStructuredType addProperty(ArrayProperty parent, String name, String type, String category, String description) {
    XMPMetadata metadata = getMetadata();
    DefinedStructuredType li = new DefinedStructuredType(metadata, getNamespace(), getPrefix(), XmpConstants.LIST_NAME);
    li.setAttribute(new Attribute(getNamespace(), XmpConstants.PARSE_TYPE, XmpConstants.RESOURCE_NAME));
    ChoiceType pdfa2 = new ChoiceType(metadata, xmlns_pdfaProperty, prefix_pdfaProperty, PDFAPropertyType.NAME, name);
    li.addProperty(pdfa2);
    pdfa2 = new ChoiceType(metadata, xmlns_pdfaProperty, prefix_pdfaProperty, PDFAPropertyType.VALUETYPE, type);
    li.addProperty(pdfa2);
    pdfa2 = new ChoiceType(metadata, xmlns_pdfaProperty, prefix_pdfaProperty, PDFAPropertyType.CATEGORY, category);
    li.addProperty(pdfa2);
    pdfa2 = new ChoiceType(metadata, xmlns_pdfaProperty, prefix_pdfaProperty, PDFAPropertyType.DESCRIPTION, description);
    li.addProperty(pdfa2);
    parent.addProperty(li);
    return li;
}
Also used : DefinedStructuredType(org.apache.xmpbox.type.DefinedStructuredType) XMPMetadata(org.apache.xmpbox.XMPMetadata) Attribute(org.apache.xmpbox.type.Attribute) ChoiceType(org.apache.xmpbox.type.ChoiceType)

Aggregations

XMPMetadata (org.apache.xmpbox.XMPMetadata)1 Attribute (org.apache.xmpbox.type.Attribute)1 ChoiceType (org.apache.xmpbox.type.ChoiceType)1 DefinedStructuredType (org.apache.xmpbox.type.DefinedStructuredType)1