iText 7 7.1.8 API
iText.Kernel.XMP.XMPMetaFactory Class Reference

Creates More...

Static Public Member Functions

static XMPSchemaRegistry  GetSchemaRegistry ()
 
Returns
Returns the singleton instance of the
More...
 
static XMPMeta  Create ()
 
Returns
Returns an empty
More...
 
static XMPMeta  Parse (Stream @in)
  Parsing with default options. More...
 
static XMPMeta  Parse (Stream @in, ParseOptions options)
  These functions support parsing serialized RDF into an XMP object, and serailizing an XMP object into RDF. More...
 
static XMPMeta  ParseFromString (String packet)
  Parsing with default options. More...
 
static XMPMeta  ParseFromString (String packet, ParseOptions options)
  Creates an More...
 
static XMPMeta  ParseFromBuffer (byte[] buffer)
  Parsing with default options. More...
 
static XMPMeta  ParseFromBuffer (byte[] buffer, ParseOptions options)
  Creates an More...
 
static void  Serialize (XMPMeta xmp, Stream @out)
  Serializes an More...
 
static void  Serialize (XMPMeta xmp, Stream @out, SerializeOptions options)
  Serializes an More...
 
static byte[]  SerializeToBuffer (XMPMeta xmp, SerializeOptions options)
  Serializes an More...
 
static String  SerializeToString (XMPMeta xmp, SerializeOptions options)
  Serializes an More...
 
static void  Reset ()
  Resets the schema registry to its original state (creates a new one). More...
 
static XMPVersionInfo  GetVersionInfo ()
  Obtain version information. More...
 

Detailed Description

Creates

XMPMeta-instances from an InputStream

30.01.2006

Member Function Documentation

◆ Create()

static XMPMeta iText.Kernel.XMP.XMPMetaFactory.Create ( )
inlinestatic

Returns
Returns an empty

XMPMeta-object.

◆ GetSchemaRegistry()

static XMPSchemaRegistry iText.Kernel.XMP.XMPMetaFactory.GetSchemaRegistry ( )
inlinestatic

Returns
Returns the singleton instance of the

XMPSchemaRegistry.

◆ GetVersionInfo()

static XMPVersionInfo iText.Kernel.XMP.XMPMetaFactory.GetVersionInfo ( )
inlinestatic

Obtain version information.

Obtain version information. The XMPVersionInfo singleton is created the first time its requested.

Returns
Returns the version information.

◆ Parse() [1/2]

static XMPMeta iText.Kernel.XMP.XMPMetaFactory.Parse ( Stream @  in )
inlinestatic

Parsing with default options.

Parameters
in an
InputStream
Returns
Returns the
XMPMeta
-object created from the input.
Exceptions
XMPException If the file is not well-formed XML or if the parsing fails.
See also
Parse(System.IO.Stream, iText.Kernel.XMP.Options.ParseOptions)
Exceptions
iText.Kernel.XMP.XMPException

◆ Parse() [2/2]

static XMPMeta iText.Kernel.XMP.XMPMetaFactory.Parse ( Stream @  in,
ParseOptions  options 
)
inlinestatic

These functions support parsing serialized RDF into an XMP object, and serailizing an XMP object into RDF.

These functions support parsing serialized RDF into an XMP object, and serailizing an XMP object into RDF. The input for parsing may be any valid Unicode encoding. ISO Latin-1 is also recognized, but its use is strongly discouraged. Serialization is always as UTF-8.

parseFromBuffer()

parses RDF from an

InputStream

. The encoding is recognized automatically.

Parameters
in an
InputStream
options Options controlling the parsing.
The available options are:
  • XMP_REQUIRE_XMPMETA - The XML element is required around .
  • XMP_STRICT_ALIASING - Do not reconcile alias differences, throw an exception.
Note:The XMP_STRICT_ALIASING option is not yet implemented.
Returns
Returns the
XMPMeta
-object created from the input.
Exceptions
XMPException If the file is not well-formed XML or if the parsing fails.
iText.Kernel.XMP.XMPException

◆ ParseFromBuffer() [1/2]

static XMPMeta iText.Kernel.XMP.XMPMetaFactory.ParseFromBuffer ( byte[]  buffer )
inlinestatic

Parsing with default options.

Parameters
buffer a String contain an XMP-file.
Returns
Returns the
XMPMeta
-object created from the input.
Exceptions
XMPException If the file is not well-formed XML or if the parsing fails.
See also
ParseFromBuffer(byte[], iText.Kernel.XMP.Options.ParseOptions)
Exceptions
iText.Kernel.XMP.XMPException

◆ ParseFromBuffer() [2/2]

static XMPMeta iText.Kernel.XMP.XMPMetaFactory.ParseFromBuffer ( byte[]  buffer,
ParseOptions  options 
)
inlinestatic

Creates an

XMPMeta-object from a byte-buffer.

Parameters
buffer a String contain an XMP-file.
options Options controlling the parsing.
Returns
Returns the
XMPMeta
-object created from the input.
Exceptions
XMPException If the file is not well-formed XML or if the parsing fails.
See also
Parse(System.IO.Stream, iText.Kernel.XMP.Options.ParseOptions)
Exceptions
iText.Kernel.XMP.XMPException

◆ ParseFromString() [1/2]

static XMPMeta iText.Kernel.XMP.XMPMetaFactory.ParseFromString ( String  packet )
inlinestatic

Parsing with default options.

Parameters
packet a String contain an XMP-file.
Returns
Returns the
XMPMeta
-object created from the input.
Exceptions
XMPException If the file is not well-formed XML or if the parsing fails.
See also
Parse(System.IO.Stream)
Exceptions
iText.Kernel.XMP.XMPException

◆ ParseFromString() [2/2]

static XMPMeta iText.Kernel.XMP.XMPMetaFactory.ParseFromString ( String  packet,
ParseOptions  options 
)
inlinestatic

Creates an

XMPMeta-object from a string.

Parameters
packet a String contain an XMP-file.
options Options controlling the parsing.
Returns
Returns the
XMPMeta
-object created from the input.
Exceptions
XMPException If the file is not well-formed XML or if the parsing fails.
See also
ParseFromString(System.String, iText.Kernel.XMP.Options.ParseOptions)
Exceptions
iText.Kernel.XMP.XMPException

◆ Reset()

static void iText.Kernel.XMP.XMPMetaFactory.Reset ( )
inlinestatic

Resets the schema registry to its original state (creates a new one).

Resets the schema registry to its original state (creates a new one). Be careful this might break all existing XMPMeta-objects and should be used only for testing purpurses.

◆ Serialize() [1/2]

static void iText.Kernel.XMP.XMPMetaFactory.Serialize ( XMPMeta  xmp,
Stream @  out 
)
inlinestatic

Serializes an

XMPMeta-object as RDF into an OutputStream with default options.

Parameters
xmp a metadata object
out an
OutputStream
to write the serialized RDF to.
Exceptions
XMPException on serializsation errors.
iText.Kernel.XMP.XMPException

◆ Serialize() [2/2]

static void iText.Kernel.XMP.XMPMetaFactory.Serialize ( XMPMeta  xmp,
Stream @  out,
SerializeOptions  options 
)
inlinestatic

Serializes an

XMPMeta-object as RDF into an OutputStream.

Parameters
xmp a metadata object
options Options to control the serialization (see iText.Kernel.XMP.Options.SerializeOptions ).
out an
OutputStream
to write the serialized RDF to.
Exceptions
XMPException on serializsation errors.
iText.Kernel.XMP.XMPException

◆ SerializeToBuffer()

static byte [] iText.Kernel.XMP.XMPMetaFactory.SerializeToBuffer ( XMPMeta  xmp,
SerializeOptions  options 
)
inlinestatic

Serializes an

XMPMeta-object as RDF into a byte buffer.

Parameters
xmp a metadata object
options Options to control the serialization (see iText.Kernel.XMP.Options.SerializeOptions ).
Returns
Returns a byte buffer containing the serialized RDF.
Exceptions
XMPException on serializsation errors.
iText.Kernel.XMP.XMPException

◆ SerializeToString()

static String iText.Kernel.XMP.XMPMetaFactory.SerializeToString ( XMPMeta  xmp,
SerializeOptions  options 
)
inlinestatic

Serializes an

XMPMeta-object as RDF into a string.

Serializes an

XMPMeta

-object as RDF into a string. Note: Encoding is ignored when serializing to a string.

Parameters
xmp a metadata object
options Options to control the serialization (see iText.Kernel.XMP.Options.SerializeOptions ).
Returns
Returns a string containing the serialized RDF.
Exceptions
XMPException on serializsation errors.
iText.Kernel.XMP.XMPException