Table of Contents

Class XmpPackage

Namespace
Aspose.Imaging.Xmp
Assembly
Aspose.Imaging.dll

Represents base abstraction for XMP package.

public class XmpPackage : IXmlValue, IEnumerable<KeyValuePair<string, object>>, IEnumerable
Inheritance
XmpPackage
Implements
Derived
Inherited Members

Fields

namespaceUri

Namespace uri for the specific XMP schema.

protected readonly string namespaceUri

Field Value

string

prefix

Xmlns prefix. For example, xmlns:dc.

protected readonly string prefix

Field Value

string

properties

Dictionary of key/value properties XMP package.

protected Dictionary<string, object> properties

Field Value

Dictionary<string, object>

Properties

this[string]

Gets or sets the object with the specified key.

public virtual object this[string key] { get; set; }

Parameters

key string

The key that identifies value.

Property Value

object

The object.

Keys

Gets the keys in XMP package.

public virtual Dictionary<string, object>.KeyCollection Keys { get; }

Property Value

Dictionary<string, object>.KeyCollection

The keys in XMP package.

NamespaceUri

Gets the namespace URI.

public string NamespaceUri { get; }

Property Value

string

The namespace URI.

Prefix

Gets the prefix.

public string Prefix { get; }

Property Value

string

The prefix.

XmlNamespace

Gets the XML namespace.

public string XmlNamespace { get; }

Property Value

string

The XML namespace.

Methods

AddValue(string, string)

Adds the value.

public virtual void AddValue(string key, string value)

Parameters

key string

The string representation of key that is identified with added value.

value string

The value to add to.

Exceptions

ArgumentNullException

key is null.

Clear()

Clears this instance.

public virtual void Clear()

ContainsKey(string)

Determines whether the specified key contains key.

public virtual bool ContainsKey(string key)

Parameters

key string

The key to be checked.

Returns

bool

Returns true if the specified key contains key.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<KeyValuePair<string, object>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<string, object>>

A IEnumerator<T> that can be used to iterate through the collection.

GetKeyValueAsXml(string)

Gets the RDF code for specific XmpArrayType.

protected virtual string GetKeyValueAsXml(string key)

Parameters

key string

The type of XMP array.

Returns

string

Returns the RDF code for specific XmpArrayType.

GetXmlValue()

Converts XMP value to the XML representation.

public virtual string GetXmlValue()

Returns

string

Returns the XMP value converted to the XML representation.

Remove(string)

Remove the value with the specified key.

public virtual bool Remove(string key)

Parameters

key string

The string representation of key that is identified with removed value.

Returns

bool

Returns true if the value with the specified key was removed.

SetValue(string, IXmlValue)

Sets the value.

public virtual void SetValue(string key, IXmlValue value)

Parameters

key string

The string representation of key that is identified with added value.

value IXmlValue

The value to add to.

SetXmpBoolean(string, string)

Sets the XMP boolean value.

protected void SetXmpBoolean(string key, string boolValue)

Parameters

key string

The string representation of key that is identified with set value.

boolValue string

The boolean value.

SetXmpDate(string, string)

Sets the XMP date.

protected void SetXmpDate(string key, string date)

Parameters

key string

The string representation of key that is identified with set value.

date string

The date to set.

SetXmpGuid(string, string)

Sets the XMP unique identifier.

protected void SetXmpGuid(string key, string guid)

Parameters

key string

The string representation of key that is identified with set GUID value.

guid string

The unique identifier.

SetXmpInteger(string, string)

Sets the XMP integer.

protected void SetXmpInteger(string key, string intValue)

Parameters

key string

The string representation of key that is identified with set value.

intValue string

The integer value.

SetXmpTypeValue(string, XmpTypeBase)

Sets the XMP type value.

public virtual void SetXmpTypeValue(string key, XmpTypeBase value)

Parameters

key string

The string representation of key that is identified with set value.

value XmpTypeBase

The value to set to.