/** * 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); }
/** * 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'"); }
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()); } }
for (AbstractField field : fields) if (attribute.getName().compareTo(field.getPropertyName()) == 0)
for (Attribute attribute : attributes) esimple.setAttributeNS(attribute.getNamespace(), attribute.getName(), attribute.getValue());
/** * 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(); } }
/** * 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(); } }
/** * 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'"); }
/** * 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); }
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 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); }
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()); } }
for (AbstractField field : fields) if (attribute.getName().compareTo(field.getPropertyName()) == 0)
for (Attribute attribute : attributes) esimple.setAttributeNS(attribute.getNamespace(), attribute.getName(), attribute.getValue());
for (AbstractField field : fields) if (attribute.getName().compareTo(field.getPropertyName()) == 0)
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }