/** * Remove a property * * @param property * The property to remove */ public final void removeProperty(AbstractField property) { container.removeProperty(property); }
/** * Add a property to the current structure * * @param obj * the property to add */ public void addProperty(AbstractField obj) { if (containsProperty(obj)) { removeProperty(obj); } properties.add(obj); }
if (xdefault.getAttribute(XmpConstants.LANG_NAME).getValue().equals(XmpConstants.X_DEFAULT)) alt.removeProperty(xdefault); xdefaultFound = true; alt.removeProperty(aToDelete);
/** * Generic method to remove a field from an array with an Elementable Object * * @param arrayName * the name of the property concerned * @param fieldValue * the elementable field value */ public void removeUnqualifiedArrayValue(String arrayName, AbstractField 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.equals(fieldValue)) { toDelete.add(tmp); } } for (AbstractField aToDelete : toDelete) { array.getContainer().removeProperty(aToDelete); } } }
/** * 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); } } }
/** * Remove a date sequence value from the list. * * @param seqName * The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords" * @param date * The date to remove from the sequence property. */ public void removeUnqualifiedSequenceDateValue(String seqName, Calendar date) { ArrayProperty seq = (ArrayProperty) getAbstractProperty(seqName); if (seq != null) { List<AbstractField> toDelete = new ArrayList<>(); for (AbstractField tmp : seq.getContainer().getAllProperties()) { if (tmp instanceof DateType && ((DateType) tmp).getValue().equals(date)) { toDelete.add(tmp); } } for (AbstractField aToDelete : toDelete) { seq.getContainer().removeProperty(aToDelete); } } }
/** * Remove a property * * @param property * The property to remove */ public final void removeProperty(AbstractField property) { container.removeProperty(property); }
/** * Remove a property * * @param property * The property to remove */ public final void removeProperty(AbstractField property) { container.removeProperty(property); }
getContainer().removeProperty(child); return;
/** * Add a property to the current structure * * @param obj * the property to add */ public void addProperty(AbstractField obj) { if (containsProperty(obj)) { removeProperty(obj); } properties.add(obj); }
/** * Add a property to the current structure * * @param obj * the property to add */ public void addProperty(AbstractField obj) { if (containsProperty(obj)) { removeProperty(obj); } properties.add(obj); }
arrayProp.getContainer().removeProperty(child); if (value != null)
/** * Generic method to remove a field from an array with an Elementable Object * * @param arrayName * the name of the property concerned * @param fieldValue * the elementable field value */ public void removeUnqualifiedArrayValue(String arrayName, AbstractField 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.equals(fieldValue)) { toDelete.add(tmp); } } for (AbstractField aToDelete : toDelete) { array.getContainer().removeProperty(aToDelete); } } }
/** * Generic method to remove a field from an array with an Elementable Object * * @param arrayName * the name of the property concerned * @param fieldValue * the elementable field value */ public void removeUnqualifiedArrayValue(String arrayName, AbstractField 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.equals(fieldValue)) { toDelete.add(tmp); } } for (AbstractField aToDelete : toDelete) { array.getContainer().removeProperty(aToDelete); } } }
/** * 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); } } }
/** * 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); } } }
/** * Remove a date sequence value from the list. * * @param seqName * The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords" * @param date * The date to remove from the sequence property. */ public void removeUnqualifiedSequenceDateValue(String seqName, Calendar date) { ArrayProperty seq = (ArrayProperty) getAbstractProperty(seqName); if (seq != null) { List<AbstractField> toDelete = new ArrayList<>(); for (AbstractField tmp : seq.getContainer().getAllProperties()) { if (tmp instanceof DateType && ((DateType) tmp).getValue().equals(date)) { toDelete.add(tmp); } } for (AbstractField aToDelete : toDelete) { seq.getContainer().removeProperty(aToDelete); } } }
/** * Remove a date sequence value from the list. * * @param seqName * The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords" * @param date * The date to remove from the sequence property. */ public void removeUnqualifiedSequenceDateValue(String seqName, Calendar date) { ArrayProperty seq = (ArrayProperty) getAbstractProperty(seqName); if (seq != null) { List<AbstractField> toDelete = new ArrayList<AbstractField>(); for (AbstractField tmp : seq.getContainer().getAllProperties()) { if (tmp instanceof DateType && ((DateType) tmp).getValue().equals(date)) { toDelete.add(tmp); } } for (AbstractField aToDelete : toDelete) { seq.getContainer().removeProperty(aToDelete); } } }
getContainer().removeProperty(child); return;
getContainer().removeProperty(child); return;