C# Class iTextSharp.xmp.XmpMetaFactory

Creates XMPMeta-instances from an InputStream @since 30.01.2006
ファイルを表示 Open project: nonorganic/dssnet

Public Methods

Method Description
Create ( ) : IXmpMeta
Parse ( Stream @in ) : IXmpMeta

Parsing with default options.

Parse ( Stream @in, ParseOptions options ) : IXmpMeta

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.

ParseFromBuffer ( byte buffer ) : IXmpMeta

Parsing with default options.

ParseFromBuffer ( byte buffer, ParseOptions options ) : IXmpMeta

Creates an XMPMeta-object from a byte-buffer.

ParseFromString ( string packet ) : IXmpMeta

Parsing with default options.

ParseFromString ( string packet, ParseOptions options ) : IXmpMeta

Creates an XMPMeta-object from a string.

Reset ( ) : void

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 ( IXmpMeta xmp, Stream @out ) : void

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

Serialize ( IXmpMeta xmp, Stream @out, SerializeOptions options ) : void

Serializes an XMPMeta-object as RDF into an OutputStream.

SerializeToBuffer ( IXmpMeta xmp, SerializeOptions options ) : byte[]

Serializes an XMPMeta-object as RDF into a byte buffer.

SerializeToString ( IXmpMeta xmp, SerializeOptions options ) : string

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

Private Methods

Method Description
AssertImplementation ( IXmpMeta xmp ) : void
GetVersionInfo ( ) : IXmpVersionInfo

Method Details

Create() public static method

public static Create ( ) : IXmpMeta
return IXmpMeta

Parse() public static method

Parsing with default options.
If the file is not well-formed XML or if the parsing fails.
public static Parse ( Stream @in ) : IXmpMeta
@in Stream
return IXmpMeta

Parse() public static method

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.

If the file is not well-formed XML or if the parsing fails.
public static Parse ( Stream @in, ParseOptions options ) : IXmpMeta
@in Stream
options iTextSharp.xmp.options.ParseOptions Options controlling the parsing.
/// The available options are: ///
    ///
  • XMP_REQUIRE_XMPMETA - The <x:xmpmeta> XML element is required around /// <rdf:RDF>. ///
  • XMP_STRICT_ALIASING - Do not reconcile alias differences, throw an exception. ///
/// Note:The XMP_STRICT_ALIASING option is not yet implemented.
return IXmpMeta

ParseFromBuffer() public static method

Parsing with default options.
If the file is not well-formed XML or if the parsing fails.
public static ParseFromBuffer ( byte buffer ) : IXmpMeta
buffer byte a String contain an XMP-file.
return IXmpMeta

ParseFromBuffer() public static method

Creates an XMPMeta-object from a byte-buffer.
If the file is not well-formed XML or if the parsing fails.
public static ParseFromBuffer ( byte buffer, ParseOptions options ) : IXmpMeta
buffer byte a String contain an XMP-file.
options iTextSharp.xmp.options.ParseOptions Options controlling the parsing.
return IXmpMeta

ParseFromString() public static method

Parsing with default options.
If the file is not well-formed XML or if the parsing fails.
public static ParseFromString ( string packet ) : IXmpMeta
packet string a String contain an XMP-file.
return IXmpMeta

ParseFromString() public static method

Creates an XMPMeta-object from a string.
If the file is not well-formed XML or if the parsing fails.
public static ParseFromString ( string packet, ParseOptions options ) : IXmpMeta
packet string a String contain an XMP-file.
options iTextSharp.xmp.options.ParseOptions Options controlling the parsing.
return IXmpMeta

Reset() public static method

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.
public static Reset ( ) : void
return void

Serialize() public static method

Serializes an XMPMeta-object as RDF into an OutputStream with default options.
on serializsation errors.
public static Serialize ( IXmpMeta xmp, Stream @out ) : void
xmp IXmpMeta a metadata object
@out Stream
return void

Serialize() public static method

Serializes an XMPMeta-object as RDF into an OutputStream.
on serializsation errors.
public static Serialize ( IXmpMeta xmp, Stream @out, SerializeOptions options ) : void
xmp IXmpMeta a metadata object
@out Stream
options iTextSharp.xmp.options.SerializeOptions Options to control the serialization (see ).
return void

SerializeToBuffer() public static method

Serializes an XMPMeta-object as RDF into a byte buffer.
on serializsation errors.
public static SerializeToBuffer ( IXmpMeta xmp, SerializeOptions options ) : byte[]
xmp IXmpMeta a metadata object
options iTextSharp.xmp.options.SerializeOptions Options to control the serialization (see ).
return byte[]

SerializeToString() public static method

Serializes an XMPMeta-object as RDF into a string. Note: Encoding is ignored when serializing to a string.
on serializsation errors.
public static SerializeToString ( IXmpMeta xmp, SerializeOptions options ) : string
xmp IXmpMeta a metadata object
options iTextSharp.xmp.options.SerializeOptions Options to control the serialization (see ).
return string