XmpPackage

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.imaging.xmp.IXmlValue, com.aspose.ms.System.Collections.Generic.IGenericEnumerable

public class XmpPackage implements IXmlValue, System.Collections.Generic.IGenericEnumerable<System.Collections.Generic.KeyValuePair<String,Object>>

Represents base abstraction for XMP package.

Constructors

ConstructorDescription
XmpPackage(String prefix, String namespaceUri)Initializes a new instance of the XmpPackage class.

Methods

MethodDescription
getXmlNamespace()Gets the XML namespace.
getPrefix()Gets the prefix.
getNamespaceUri()Gets the namespace URI.
getKeys()Gets the keys in XMP package.
getCount()Gets the XMP key count.
containsKey(String key)Determines whether this collection specified key.
get_Item(String key)Gets or sets the Object with the specified key.
set_Item(String key, Object value)Sets the Object with the specified key.
addValue(String key, String value)Adds the value to the specified key.
addValue(String key, Object value)Adds the value to the specified key.
tryGetValue(String key, Object[] value)Gets the value by the key.
remove(String key)Remove the value with the specified key.
clear()Clears this instance.
setValue(String key, IXmlValue value)Sets the value.
setValue(String key, IXmpType value)Sets the value.
setXmpTypeValue(String key, XmpTypeBase value)Sets the XMP type value.
getXmlValue()Converts XMP value to the XML representation.
iterator()Returns an enumerator that iterates through the collection.

XmpPackage(String prefix, String namespaceUri)

public XmpPackage(String prefix, String namespaceUri)

Initializes a new instance of the XmpPackage class.

Parameters:

ParameterTypeDescription
prefixjava.lang.StringThe prefix.
namespaceUrijava.lang.StringThe namespace URI.

getXmlNamespace()

public String getXmlNamespace()

Gets the XML namespace.

Value: The XML namespace.

Returns: java.lang.String

getPrefix()

public String getPrefix()

Gets the prefix.

Value: The prefix.

Returns: java.lang.String

getNamespaceUri()

public String getNamespaceUri()

Gets the namespace URI.

Value: The namespace URI.

Returns: java.lang.String

getKeys()

public System.Collections.Generic.Dictionary.KeyCollection<String,Object> getKeys()

Gets the keys in XMP package.

Returns: com.aspose.ms.System.Collections.Generic.Dictionary.KeyCollection<java.lang.String,java.lang.Object>

getCount()

public final int getCount()

Gets the XMP key count.

Returns: int - the XMP key count.

containsKey(String key)

public boolean containsKey(String key)

Determines whether this collection specified key.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key to be checked.

Returns: boolean - true if the collection contains the specified key; otherwise, false.

get_Item(String key)

public Object get_Item(String key)

Gets or sets the Object with the specified key.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key that identifies value.

Returns: java.lang.Object - Returns the Object with the specified key.

set_Item(String key, Object value)

public void set_Item(String key, Object value)

Sets the Object with the specified key.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key that identifies value.
valuejava.lang.ObjectThe Object value.

addValue(String key, String value)

public void addValue(String key, String value)

Adds the value to the specified key.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe string representation of key that is identified with added value.
valuejava.lang.StringThe value to add to.

addValue(String key, Object value)

public void addValue(String key, Object value)

Adds the value to the specified key.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe string representation of key that is identified with added value.
valuejava.lang.ObjectThe value to add to.

tryGetValue(String key, Object[] value)

public final boolean tryGetValue(String key, Object[] value)

Gets the value by the key.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe XMP element key.
valuejava.lang.Object[]The XMP value.

Returns: boolean - true, if the collection contains the key; otherwise, false.

remove(String key)

public boolean remove(String key)

Remove the value with the specified key.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe string representation of key that is identified with removed value.

Returns: boolean - Returns true if the value with the specified key was removed.

clear()

public void clear()

Clears this instance.

setValue(String key, IXmlValue value)

public void setValue(String key, IXmlValue value)

Sets the value.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe string representation of key that is identified with added value.
valueIXmlValueThe value to add to.

setValue(String key, IXmpType value)

public void setValue(String key, IXmpType value)

Sets the value.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe string representation of key that is identified with added value.
valueIXmpTypeThe value to add to.

setXmpTypeValue(String key, XmpTypeBase value)

public void setXmpTypeValue(String key, XmpTypeBase value)

Sets the XMP type value.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe string representation of key that is identified with set value.
valueXmpTypeBaseThe value to set to.

getXmlValue()

public String getXmlValue()

Converts XMP value to the XML representation.

Returns: java.lang.String - Returns the XMP value converted to the XML representation.

iterator()

public System.Collections.Generic.IGenericEnumerator<System.Collections.Generic.KeyValuePair<String,Object>> iterator()

Returns an enumerator that iterates through the collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,java.lang.Object» - A T:System.Collections.Generic.IEnumerator\1` that can be used to iterate through the collection.