Ejemplo n.º 1
0
 /** {@inheritDoc} */
 public boolean parseXMP(
     ImageMetaTagInfo tagInfo, Element element, ElementPrefixFilter dirPrefixFilter) {
   if (tagInfo.getID() != IPTC_CREATOR_CONTACT_INFO) return false;
   final Node[] children = XMLUtil.getChildrenOf(element, dirPrefixFilter);
   XMPMetadataReader.parseElements(children, dirPrefixFilter, this);
   return true;
 }
Ejemplo n.º 2
0
 /**
  * Reads the {@link ImageMetadata} from a sidecar XMP file, if any.
  *
  * @return Returns said {@link ImageMetadata} or <code>null</code> if there is no sidecar XMP
  *     file.
  */
 private ImageMetadata readXMPMetadata()
     throws BadImageFileException, IOException, UnknownImageTypeException {
   final String xmpFilename = getXMPFilename();
   if (xmpFilename != null) {
     try {
       return XMPMetadataReader.readFrom(new File(xmpFilename));
     } catch (FileNotFoundException e) {
       // ignore
     }
   }
   return null;
 }