Class RDFXMLParser

  • All Implemented Interfaces:
    XMPParser

    public class RDFXMLParser
    extends java.lang.Object
    implements XMPParser
    RDF/XML Implementation of XMPParser-Interface, it only delegates to the implementation.
    • Constructor Summary

      Constructors 
      Constructor Description
      RDFXMLParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      XMPMetadata parse​(byte[] input, java.util.Map<java.lang.String,​java.lang.Object> parseContext)
      Parse XMP in RDF/XML form from a byte buffer.
      XMPMetadata parse​(java.io.InputStream input, java.util.Map<java.lang.String,​java.lang.Object> parseContext)
      Parse XMP in RDF/XML form from an InputStream.
      XMPMetadata parse​(java.lang.String input, java.util.Map<java.lang.String,​java.lang.Object> parseContext)
      Parse XMP in RDF/XML form from a String The parser will simply ignore sub-trees that contain invalid XMP data.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RDFXMLParser

        public RDFXMLParser()
    • Method Detail

      • parse

        public XMPMetadata parse​(java.io.InputStream input,
                                 java.util.Map<java.lang.String,​java.lang.Object> parseContext)
                          throws XMPException
        Description copied from interface: XMPParser
        Parse XMP in RDF/XML form from an InputStream. The input for parsing may be any valid Unicode encoding, it is recognized automatically. The client has to open/close the stream. The parser will simply ignore sub-trees that contain invalid XMP data. It will only throw on serious errors.
        Specified by:
        parse in interface XMPParser
        Parameters:
        input - the stream contains an XMP packet serialized as RDF/XML
        parseContext - a map to provide options for the parser, or return additional information other than the XMP data model; can be null if not needed
        Returns:
        an XMPMetadata object created from the input
        Throws:
        XMPException - If the data is invalid XML, invalid XMP or contains invalid data
        See Also:
        XMPParser.parse(InputStream, Map)
      • parse

        public XMPMetadata parse​(java.lang.String input,
                                 java.util.Map<java.lang.String,​java.lang.Object> parseContext)
                          throws XMPException
        Description copied from interface: XMPParser
        Parse XMP in RDF/XML form from a String The parser will simply ignore sub-trees that contain invalid XMP data. It will only throw on serious errors.
        Specified by:
        parse in interface XMPParser
        Parameters:
        input - String that contains an XMP packet serialized as RDF/XML
        parseContext - a map to provide options for the parser, or return additional information other than the XMP data model; can be null if not needed
        Returns:
        an XMPMetadata object
        Throws:
        XMPException
        See Also:
        XMPParser.parse(String, Map)
      • parse

        public XMPMetadata parse​(byte[] input,
                                 java.util.Map<java.lang.String,​java.lang.Object> parseContext)
                          throws XMPException
        Description copied from interface: XMPParser
        Parse XMP in RDF/XML form from a byte buffer. The data must be encoded with UTF-8. The parser will simply ignore sub-trees that contain invalid XMP data. It will only throw on serious errors.
        Specified by:
        parse in interface XMPParser
        Parameters:
        input - buffer that contains an XMP packet serialized as RDF/XML
        parseContext - a map to provide options for the parser, or return additional information other than the XMP data model; can be null if not needed
        Returns:
        an XMPMetadata object
        Throws:
        XMPException
        See Also:
        XMPParser.parse(byte[], Map)