use of org.apache.xmpbox.type.ArrayProperty in project pdfbox by apache.
the class XMPSchema method addBagValue.
/**
* Add a new value to a bag property.
*
* @param qualifiedSeqName
* The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords"
* @param seqValue
* The value to add to the bag.
*/
public void addBagValue(String qualifiedSeqName, AbstractField seqValue) {
ArrayProperty bag = (ArrayProperty) getAbstractProperty(qualifiedSeqName);
if (bag != null) {
bag.getContainer().addProperty(seqValue);
} else {
ArrayProperty newBag = createArrayProperty(qualifiedSeqName, Cardinality.Bag);
newBag.getContainer().addProperty(seqValue);
addProperty(newBag);
}
}
use of org.apache.xmpbox.type.ArrayProperty in project pdfbox by apache.
the class XMPSchema method addUnqualifiedSequenceValue.
/**
* Add a new value to a sequence property.
*
* @param seqName
* The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords"
* @param seqValue
* The value to add to the sequence.
*/
public void addUnqualifiedSequenceValue(String seqName, AbstractField seqValue) {
ArrayProperty seq = (ArrayProperty) getAbstractProperty(seqName);
if (seq != null) {
seq.getContainer().addProperty(seqValue);
} else {
ArrayProperty newSeq = createArrayProperty(seqName, Cardinality.Seq);
newSeq.getContainer().addProperty(seqValue);
addProperty(newSeq);
}
}
Aggregations