public final class XMPMetaFactory extends Object
XMPMeta
-instances from an InputStream
Modifier and Type | Method and Description |
---|---|
static XMPMeta |
create() |
static XMPSchemaRegistry |
getSchemaRegistry() |
static XMPVersionInfo |
getVersionInfo()
Obtain version information.
|
static XMPMeta |
parse(InputStream in)
Parsing with default options.
|
static XMPMeta |
parse(InputStream in, ParseOptions options)
These functions support parsing serialized RDF into an XMP object, and serailizing an XMP object into RDF.
|
static XMPMeta |
parseFromBuffer(byte[] buffer)
Parsing with default options.
|
static XMPMeta |
parseFromBuffer(byte[] buffer, ParseOptions options)
Creates an XMPMeta -object from a byte-buffer.
|
static XMPMeta |
parseFromString(String packet)
Parsing with default options.
|
static XMPMeta |
parseFromString(String packet, ParseOptions options)
Creates an XMPMeta -object from a string.
|
static void |
reset()
Resets the schema registry to its original state (creates a new one).
|
static void |
serialize(XMPMeta xmp, OutputStream out)
Serializes an XMPMeta -object as RDF into an OutputStream with default options.
|
static void |
serialize(XMPMeta xmp, OutputStream out, SerializeOptions options)
Serializes an XMPMeta -object as RDF into an OutputStream .
|
static byte[] |
serializeToBuffer(XMPMeta xmp, SerializeOptions options)
Serializes an XMPMeta -object as RDF into a byte buffer.
|
static String |
serializeToString(XMPMeta xmp, SerializeOptions options)
Serializes an XMPMeta -object as RDF into a string.
|
public static XMPSchemaRegistry getSchemaRegistry()
XMPSchemaRegistry
.
public static XMPMeta create()
XMPMeta
-object.
public static XMPMeta parse(InputStream in) throws XMPException
in
- an InputStream
XMPMeta
-object created from the input.
XMPException
- If the file is not well-formed XML or if the parsing fails.
parse(InputStream, ParseOptions)
public static XMPMeta parse(InputStream in, ParseOptions options) throws XMPException
parseFromBuffer()
parses RDF from an InputStream
. The encoding is recognized automatically.
in
- an InputStream
options
- Options controlling the parsing.
XMPMeta
-object created from the input.
XMPException
- If the file is not well-formed XML or if the parsing fails.
public static XMPMeta parseFromString(String packet) throws XMPException
packet
- a String contain an XMP-file.
XMPMeta
-object created from the input.
XMPException
- If the file is not well-formed XML or if the parsing fails.
parse(InputStream)
public static XMPMeta parseFromString(String packet, ParseOptions options) throws XMPException
XMPMeta
-object from a string.
packet
- a String contain an XMP-file.
options
- Options controlling the parsing.
XMPMeta
-object created from the input.
XMPException
- If the file is not well-formed XML or if the parsing fails.
parseFromString(String, ParseOptions)
public static XMPMeta parseFromBuffer(byte[] buffer) throws XMPException
buffer
- a String contain an XMP-file.
XMPMeta
-object created from the input.
XMPException
- If the file is not well-formed XML or if the parsing fails.
parseFromBuffer(byte[], ParseOptions)
public static XMPMeta parseFromBuffer(byte[] buffer, ParseOptions options) throws XMPException
XMPMeta
-object from a byte-buffer.
buffer
- a String contain an XMP-file.
options
- Options controlling the parsing.
XMPMeta
-object created from the input.
XMPException
- If the file is not well-formed XML or if the parsing fails.
parse(InputStream, ParseOptions)
public static void serialize(XMPMeta xmp, OutputStream out) throws XMPException
XMPMeta
-object as RDF into an OutputStream
with default options.
xmp
- a metadata object
out
- an OutputStream
to write the serialized RDF to.
XMPException
- on serializsation errors.
public static void serialize(XMPMeta xmp, OutputStream out, SerializeOptions options) throws XMPException
XMPMeta
-object as RDF into an OutputStream
.
xmp
- a metadata object
options
- Options to control the serialization (see SerializeOptions
).
out
- an OutputStream
to write the serialized RDF to.
XMPException
- on serializsation errors.
public static byte[] serializeToBuffer(XMPMeta xmp, SerializeOptions options) throws XMPException
XMPMeta
-object as RDF into a byte buffer.
xmp
- a metadata object
options
- Options to control the serialization (see SerializeOptions
).
XMPException
- on serializsation errors.
public static String serializeToString(XMPMeta xmp, SerializeOptions options) throws XMPException
XMPMeta
-object as RDF into a string. Note: Encoding is ignored when serializing to a string.
xmp
- a metadata object
options
- Options to control the serialization (see SerializeOptions
).
XMPException
- on serializsation errors.
public static void reset()
public static XMPVersionInfo getVersionInfo()
Copyright © 1998–2024. All rights reserved.