Class XmpPackage
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
prefix
Xmlns prefix. For example, xmlns:dc.
protected readonly string prefix
Field Value
properties
Dictionary of key/value properties XMP package.
protected Dictionary<string, object> properties
Field Value
Properties
this[string]
Gets or sets the object with the specified key.
public virtual object this[string key] { get; set; }
Parameters
key
stringThe key that identifies value.
Property Value
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
stringThe string representation of key that is identified with added value.
value
stringThe 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
stringThe 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
stringThe 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
stringThe 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
stringThe string representation of key that is identified with added value.
value
IXmlValueThe value to add to.
SetXmpBoolean(string, string)
Sets the XMP boolean value.
protected void SetXmpBoolean(string key, string boolValue)
Parameters
key
stringThe string representation of key that is identified with set value.
boolValue
stringThe boolean value.
SetXmpDate(string, string)
Sets the XMP date.
protected void SetXmpDate(string key, string date)
Parameters
key
stringThe string representation of key that is identified with set value.
date
stringThe date to set.
SetXmpGuid(string, string)
Sets the XMP unique identifier.
protected void SetXmpGuid(string key, string guid)
Parameters
key
stringThe string representation of key that is identified with set GUID value.
guid
stringThe unique identifier.
SetXmpInteger(string, string)
Sets the XMP integer.
protected void SetXmpInteger(string key, string intValue)
Parameters
key
stringThe string representation of key that is identified with set value.
intValue
stringThe integer value.
SetXmpTypeValue(string, XmpTypeBase)
Sets the XMP type value.
public virtual void SetXmpTypeValue(string key, XmpTypeBase value)
Parameters
key
stringThe string representation of key that is identified with set value.
value
XmpTypeBaseThe value to set to.