localPrefix = simple.getPrefix(); Element esimple = doc.createElement(localPrefix + ":" + simple.getPropertyName()); esimple.setTextContent(simple.getStringValue()); List<Attribute> attributes = simple.getAllAttributes(); for (Attribute attribute : attributes)
/** * Property specific type constructor (namespaceURI is given) * * @param metadata * The metadata to attach to this property * @param namespaceURI * the specified namespace URI associated to this property * @param prefix * The prefix to set for this property * @param propertyName * The local Name of this property * @param value * the value to give */ public AbstractSimpleProperty(XMPMetadata metadata, String namespaceURI, String prefix, String propertyName, Object value) { super(metadata, propertyName); setValue(value); this.namespace = namespaceURI; this.prefix = prefix; this.rawValue = value; }
@Override public String toString() { return "[" + this.getClass().getSimpleName() + ":" + getStringValue() + "]"; }
/** * Add a SimpleProperty to this schema * * @param prop * The Property to add */ private void setSpecifiedSimpleTypeProperty(AbstractSimpleProperty prop) { // attribute placement for simple property has been removed // Search in properties to erase for (AbstractField child : getAllProperties()) { if (child.getPropertyName().equals(prop.getPropertyName())) { removeProperty(child); addProperty(prop); return; } } addProperty(prop); }
protected String getPropertyValueAsString(String fieldName) { AbstractSimpleProperty absProp = (AbstractSimpleProperty) getProperty(fieldName); if (absProp == null) { return null; } else { return absProp.getStringValue(); } }
/** * Add a SimpleProperty to this schema * * @param prop * The Property to add */ private void setSpecifiedSimpleTypeProperty(AbstractSimpleProperty prop) { // attribute placement for simple property has been removed // Search in properties to erase for (AbstractField child : getAllProperties()) { if (child.getPropertyName().equals(prop.getPropertyName())) { removeProperty(child); addProperty(prop); return; } } addProperty(prop); }
localPrefix = simple.getPrefix(); Element esimple = doc.createElement(localPrefix + ":" + simple.getPropertyName()); esimple.setTextContent(simple.getStringValue()); List<Attribute> attributes = simple.getAllAttributes(); for (Attribute attribute : attributes)
public List<String> getElementsAsString() { List<String> retval; retval = new ArrayList<>(); Iterator<AbstractField> it = getContainer().getAllProperties().iterator(); AbstractSimpleProperty tmp; while (it.hasNext()) { tmp = (AbstractSimpleProperty) it.next(); retval.add(tmp.getStringValue()); } retval = Collections.unmodifiableList(retval); return retval; }
/** * Add a SimpleProperty to this schema * * @param prop * The Property to add */ private void setSpecifiedSimpleTypeProperty(AbstractSimpleProperty prop) { // attribute placement for simple property has been removed // Search in properties to erase for (AbstractField child : getAllProperties()) { if (child.getPropertyName().equals(prop.getPropertyName())) { removeProperty(child); addProperty(prop); return; } } addProperty(prop); }
/** * Property specific type constructor (namespaceURI is given) * * @param metadata * The metadata to attach to this property * @param namespaceURI * the specified namespace URI associated to this property * @param prefix * The prefix to set for this property * @param propertyName * The local Name of this property * @param value * the value to give */ public AbstractSimpleProperty(XMPMetadata metadata, String namespaceURI, String prefix, String propertyName, Object value) { super(metadata, propertyName); setValue(value); this.namespace = namespaceURI; this.prefix = prefix; this.rawValue = value; }
localPrefix = simple.getPrefix(); Element esimple = doc.createElement(localPrefix + ":" + simple.getPropertyName()); esimple.setTextContent(simple.getStringValue()); List<Attribute> attributes = simple.getAllAttributes(); for (Attribute attribute : attributes)
/** * Generic array property removing * * @param fieldValue * the field value */ private void removeUnqualifiedArrayValue(String arrayName, String fieldValue) { ArrayProperty array = (ArrayProperty) getAbstractProperty(arrayName); if (array != null) { List<AbstractField> toDelete = new ArrayList<>(); for (AbstractField abstractField : array.getContainer().getAllProperties()) { AbstractSimpleProperty tmp = (AbstractSimpleProperty) abstractField; if (tmp.getStringValue().equals(fieldValue)) { toDelete.add(tmp); } } for (AbstractField aToDelete : toDelete) { array.getContainer().removeProperty(aToDelete); } } }
/** * Property specific type constructor (namespaceURI is given) * * @param metadata * The metadata to attach to this property * @param namespaceURI * the specified namespace URI associated to this property * @param prefix * The prefix to set for this property * @param propertyName * The local Name of this property * @param value * the value to give */ public AbstractSimpleProperty(XMPMetadata metadata, String namespaceURI, String prefix, String propertyName, Object value) { super(metadata, propertyName); setValue(value); this.namespace = namespaceURI; this.prefix = prefix; this.rawValue = value; }
@Override public String toString() { return "[" + this.getClass().getSimpleName() + ":" + getStringValue() + "]"; }
@Override public String toString() { return "[" + this.getClass().getSimpleName() + ":" + getStringValue() + "]"; }
protected String getPropertyValueAsString(String fieldName) { AbstractSimpleProperty absProp = (AbstractSimpleProperty) getProperty(fieldName); if (absProp == null) { return null; } else { return absProp.getStringValue(); } }
protected String getPropertyValueAsString(String fieldName) { AbstractSimpleProperty absProp = (AbstractSimpleProperty) getProperty(fieldName); if (absProp == null) { return null; } else { return absProp.getStringValue(); } }
public List<String> getElementsAsString() { List<String> retval; retval = new ArrayList<String>(); Iterator<AbstractField> it = getContainer().getAllProperties().iterator(); AbstractSimpleProperty tmp; while (it.hasNext()) { tmp = (AbstractSimpleProperty) it.next(); retval.add(tmp.getStringValue()); } retval = Collections.unmodifiableList(retval); return retval; }
public List<String> getElementsAsString() { List<String> retval; retval = new ArrayList<>(); Iterator<AbstractField> it = getContainer().getAllProperties().iterator(); AbstractSimpleProperty tmp; while (it.hasNext()) { tmp = (AbstractSimpleProperty) it.next(); retval.add(tmp.getStringValue()); } retval = Collections.unmodifiableList(retval); return retval; }
/** * Generic array property removing * * @param fieldValue * the field value */ private void removeUnqualifiedArrayValue(String arrayName, String fieldValue) { ArrayProperty array = (ArrayProperty) getAbstractProperty(arrayName); if (array != null) { List<AbstractField> toDelete = new ArrayList<AbstractField>(); for (AbstractField abstractField : array.getContainer().getAllProperties()) { AbstractSimpleProperty tmp = (AbstractSimpleProperty) abstractField; if (tmp.getStringValue().equals(fieldValue)) { toDelete.add(tmp); } } for (AbstractField aToDelete : toDelete) { array.getContainer().removeProperty(aToDelete); } } }