Interface XmpFilter

  • All Known Implementing Classes:
    XmpFilterBlackWhite

    public interface XmpFilter
    Filtering XMP metadata.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.io.InputStream filter​(java.io.InputStream xmpIS)
      Filter XMP properties from an XML inputstream and return the filtered XML in a new inputstream.
      boolean isActive()  
      java.io.InputStream sieve​(java.io.InputStream xmpIS)
      Sieve XMP properties from an XML inputstream and return the properties hold back during filtering in a new XMP document.
    • Method Detail

      • filter

        java.io.InputStream filter​(java.io.InputStream xmpIS)
                            throws java.io.IOException
        Filter XMP properties from an XML inputstream and return the filtered XML in a new inputstream.
        Parameters:
        xmpIS - the XML for filtering
        Returns:
        the filtered XML in utf-8 encoding
        Throws:
        java.io.IOException
      • isActive

        boolean isActive()
      • sieve

        java.io.InputStream sieve​(java.io.InputStream xmpIS)
                           throws java.io.IOException
        Sieve XMP properties from an XML inputstream and return the properties hold back during filtering in a new XMP document. Sieving is the opposite of filtering in regard to XMP XMP elements with one exception: sieve will never return partial properties. This means, filter(InputStream) may return the partial contents of an array XMP property (e.g. the first 10 entries). sieve(InputStream) will either report the complete array or ignore the property. Example: during ingestion, all but the first entry in xmpMM:History is filtered. The reported metadata contains just this one entry. If this metadata was written back to the document, all existing subsequent xmpMM:History entries would be overwritten and lost. The sieve(InputStream), called on the original data, will return such a property in full, e.g. the complete xmpMM:History. This allows the caller to merge changes as it desires.
        Parameters:
        xmpIS - the XML for sieving
        Returns:
        the filtered XML in utf-8 encoding
        Throws:
        java.io.IOException