Class XmpPackage

Class XmpPackage

Namespace: Aspose.Imaging.Xmp
Assembly: Aspose.Imaging.dll (25.2.0)

Represents base abstraction for XMP package.

[JsonObject(MemberSerialization.OptIn)]
public class XmpPackage : IXmlValue, IEnumerable<keyvaluepair<string, object="">&gt;, IEnumerable

Inheritance

objectXmpPackage

Derived

DicomPackage, DublinCorePackage, PdfPackage, PhotoshopPackage, XmpBasicPackage, XmpDynamicMediaPackage, XmpMediaManagementPackage, XmpRightsManagementPackage

Implements

IXmlValue, IEnumerable<keyvaluepair<string, object="">&gt;, IEnumerable

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Fields

namespaceUri

Namespace uri for the specific XMP schema.

[JsonProperty]
protected readonly string namespaceUri

Field Value

string

prefix

Xmlns prefix. For example, xmlns:dc.

[JsonProperty]
protected readonly string prefix

Field Value

string

properties

Dictionary of key/value properties XMP package.

[JsonProperty]
protected Dictionary<string, object=""> properties

Field Value

Dictionary<string, object&gt;

Properties

Count

Gets the XMP key count.

public int Count { get; }

Property Value

int

Keys

Gets the keys in XMP package.

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

Property Value

Dictionary<string, object&gt;.KeyCollection

NamespaceUri

Gets the namespace URI.

public string NamespaceUri { get; }

Property Value

string

Prefix

Gets the prefix.

public string Prefix { get; }

Property Value

string

XmlNamespace

Gets the XML namespace.

public string XmlNamespace { get; }

Property Value

string

this[string]

Gets or sets the System.Object with the specified key.

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

Property Value

object

Methods

AddValue(string, string)

Adds the value to the specified key.

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.

AddValue(string, object)

Adds the value to the specified key.

public virtual void AddValue(string key, object value)

Parameters

key string

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

value object

The value to add to.

Exceptions

ArgumentNullException

key is null.

Clear()

Clears this instance.

public virtual void Clear()

ContainsKey(string)

Determines whether this collection specified key.

public virtual bool ContainsKey(string key)

Parameters

key string

The key to be checked.

Returns

bool

true if the System.Collections.Generic.IDictionary`2 contains the specified key; otherwise, false.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<keyvaluepair<string, object="">&gt; GetEnumerator()

Returns

IEnumerator<KeyValuePair<string, object&gt;&gt;

A System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

GetKeyValueAsXml(string)

Gets the RDF code for specific Aspose.Imaging.Xmp.XmpArrayType.

protected virtual string GetKeyValueAsXml(string key)

Parameters

key string

The type of XMP array.

Returns

string

Returns the RDF code for specific Aspose.Imaging.Xmp.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.

SetValue(string, IXmpType)

Sets the value.

public virtual void SetValue(string key, IXmpType value)

Parameters

key string

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

value IXmpType

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.

TryGetValue(string, out object)

Gets the value by the key.

public bool TryGetValue(string key, out object value)

Parameters

key string

The XMP element key.

value object

The XMP value.

Returns

bool

true, if the System.Collections.Generic.IDictionary`2 contains the key; otherwise, false. </keyvaluepair<string,></string,></string,></keyvaluepair<string,></keyvaluepair<string,>