public LayerType(XMPMetadata metadata) { super(metadata); setAttribute(new Attribute(XmpConstants.RDF_NAMESPACE, "parseType", "Resource")); }
private void fillElementWithAttributes(Element target, AbstractComplexProperty property) { // normalize the attributes list List<Attribute> toSerialize = normalizeAttributes(property); for (Attribute attribute : toSerialize) { if (XmpConstants.RDF_NAMESPACE.equals(attribute.getNamespace())) { target.setAttribute(XmpConstants.DEFAULT_RDF_PREFIX + ":" + attribute.getName(), attribute.getValue()); } else { target.setAttribute(attribute.getName(), attribute.getValue()); } } for (Map.Entry<String, String> ns : property.getAllNamespacesWithPrefix().entrySet()) { target.setAttribute(XMLConstants.XMLNS_ATTRIBUTE + ":" + ns.getValue(), ns.getKey()); } }
/** * Set the RDF 'about' attribute * * @param about * the well-formed attribute * @throws BadFieldValueException * Bad Attribute name (not corresponding to about attribute) */ public void setAbout(Attribute about) throws BadFieldValueException { if (XmpConstants.RDF_NAMESPACE.equals(about.getNamespace()) && XmpConstants.ABOUT_NAME.equals(about.getName())) { setAttribute(about); return; } throw new BadFieldValueException("Attribute 'about' must be named 'rdf:about' or 'about'"); }
/** * Give the Conformance id * * @return conformance id value */ public String getConformance() { TextType tt = getConformanceProperty(); if (tt == null) { for (Attribute attribute : getAllAttributes()) { if (attribute.getName().equals(CONFORMANCE)) { return attribute.getValue(); } } return null; } else { return tt.getStringValue(); } }
if (child.getAttribute(XmpConstants.LANG_NAME).getValue().equals(language)) langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); reorganizeAltOrder(arrayProp.getContainer()); langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); addProperty(arrayProp);
/** * Get the RDF about value. * * @return The RDF 'about' value. If there is no rdf:about attribute, an empty string is returned. */ public String getAboutValue() { Attribute prop = getAttribute(XmpConstants.ABOUT_NAME); if (prop != null) { return prop.getValue(); } // PDFBOX-1685 : if missing, rdf:about should be considered as empty string return ""; }
/** * Set a new attribute for this entity * * @param value * The Attribute property to add */ public final void setAttribute(Attribute value) { if (attributes.containsKey(value.getName())) { // if same name in element, attribute will be replaced attributes.remove(value.getName()); } attributes.put(value.getName(), value); }
if (att.getNamespace().equals(getNamespace()))
/** * Give the PDFA Amendment Id (as an String) * * @return Amendment Value */ public String getAmd() { TextType tmp = getAmdProperty(); if (tmp == null) { for (Attribute attribute : getAllAttributes()) { if (attribute.getName().equals(AMD)) { return attribute.getValue(); } } return null; } else { return tmp.getStringValue(); } }
if (child.getAttribute(XmpConstants.LANG_NAME).getValue().equals(language)) langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); reorganizeAltOrder(arrayProp.getContainer()); langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); addProperty(arrayProp);
/** * Set the RDF 'about' attribute * * @param about * the well-formed attribute * @throws BadFieldValueException * Bad Attribute name (not corresponding to about attribute) */ public void setAbout(Attribute about) throws BadFieldValueException { if (XmpConstants.RDF_NAMESPACE.equals(about.getNamespace()) && XmpConstants.ABOUT_NAME.equals(about.getName())) { setAttribute(about); return; } throw new BadFieldValueException("Attribute 'about' must be named 'rdf:about' or 'about'"); }
for (AbstractField field : fields) if (attribute.getName().compareTo(field.getPropertyName()) == 0)
if (att.getNamespace().equals(getNamespace()))
for (Attribute attribute : attributes) esimple.setAttributeNS(attribute.getNamespace(), attribute.getName(), attribute.getValue());
/** * * @param metadata * The metadata to attach to this property */ public ThumbnailType(XMPMetadata metadata) { super(metadata); setAttribute(new Attribute(XmpConstants.RDF_NAMESPACE, "parseType", "Resource")); }
/** * Give the Conformance id * * @return conformance id value */ public String getConformance() { TextType tt = getConformanceProperty(); if (tt == null) { for (Attribute attribute : getAllAttributes()) { if (attribute.getName().equals(CONFORMANCE)) { return attribute.getValue(); } } return null; } else { return tt.getStringValue(); } }
if (child.getAttribute(XmpConstants.LANG_NAME).getValue().equals(language)) langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); reorganizeAltOrder(arrayProp.getContainer()); langValue.setAttribute(new Attribute(XMLConstants.XML_NS_URI, XmpConstants.LANG_NAME, language)); arrayProp.getContainer().addProperty(langValue); addProperty(arrayProp);
if (text != null) retval.add(text.getValue());
/** * Set the RDF 'about' attribute * * @param about * the well-formed attribute * @throws BadFieldValueException * Bad Attribute name (not corresponding to about attribute) */ public void setAbout(Attribute about) throws BadFieldValueException { if (XmpConstants.RDF_NAMESPACE.equals(about.getNamespace()) && XmpConstants.ABOUT_NAME.equals(about.getName())) { setAttribute(about); return; } throw new BadFieldValueException("Attribute 'about' must be named 'rdf:about' or 'about'"); }