use of com.adobe.xmp.options.IteratorOptions in project tika by apache.
the class XMPMetadata method size.
/**
* Returns the number of top-level namespaces
*/
@Override
public int size() {
int size = 0;
try {
// Get an iterator for the XMP packet, starting at the top level schema nodes
XMPIterator nsIter = xmpData.iterator(new IteratorOptions().setJustChildren(true).setOmitQualifiers(true));
// iterate all top level namespaces
while (nsIter.hasNext()) {
nsIter.next();
size++;
}
} catch (XMPException e) {
// ignore
}
return size;
}
Aggregations