XmpArray

Inheritance: java.lang.Object, com.groupdocs.metadata.core.PropertyValue, com.groupdocs.metadata.core.XmpValueBase

public class XmpArray extends XmpValueBase

Represents base abstraction for XMP array.

Constructors

Constructor Description
XmpArray(XmpArrayType arrayType, XmpValueBase[] items) Initializes a new instance of the XmpArray class.
XmpArray(XmpArrayType arrayType, XmpComplexType[] items) Initializes a new instance of the XmpArray class.

Methods

Method Description
getArrayType() Gets the type of the XMP array.
from(T[] array, XmpArrayType type) Creates an XmpArray instance form an array of XmpComplexType .
from(String[] array, XmpArrayType type) Creates an XmpArray instance form a string array.
from(int[] array, XmpArrayType type) Creates an XmpArray instance form an integer array.
from(Date[] array, XmpArrayType type) Creates an XmpArray instance form a date array.
from(double[] array, XmpArrayType type) Creates an XmpArray instance form a double array.
getXmpRepresentation() Converts XMP value to the xml representation.
toPlatformArray(Class type) Converts the XmpArray to a platform-specific array.

XmpArray(XmpArrayType arrayType, XmpValueBase[] items)

public XmpArray(XmpArrayType arrayType, XmpValueBase[] items)

Initializes a new instance of the XmpArray class.

Parameters:

Parameter Type Description
arrayType XmpArrayType Array type.
items XmpValueBase[] Array items.

XmpArray(XmpArrayType arrayType, XmpComplexType[] items)

public XmpArray(XmpArrayType arrayType, XmpComplexType[] items)

Initializes a new instance of the XmpArray class.

Parameters:

Parameter Type Description
arrayType XmpArrayType Array type.
items XmpComplexType[] Array items.

getArrayType()

public final XmpArrayType getArrayType()

Gets the type of the XMP array.

Returns: XmpArrayType - The type of the XMP array.

from(T[] array, XmpArrayType type)

public static XmpArray <T>from(T[] array, XmpArrayType type)

Creates an XmpArray instance form an array of XmpComplexType .

Parameters:

Parameter Type Description
array T[] The array to create an XmpArray from.
type XmpArrayType The type of the XmpArray .

T : The element type of the source array. |

Returns: XmpArray - An XmpArray containing all the elements from the original array.

from(String[] array, XmpArrayType type)

public static XmpArray from(String[] array, XmpArrayType type)

Creates an XmpArray instance form a string array.

Parameters:

Parameter Type Description
array java.lang.String[] The array to create an XmpArray from.
type XmpArrayType The type of the XmpArray .

Returns: XmpArray - An XmpArray containing all the elements from the original array.

from(int[] array, XmpArrayType type)

public static XmpArray from(int[] array, XmpArrayType type)

Creates an XmpArray instance form an integer array.

Parameters:

Parameter Type Description
array int[] The array to create an XmpArray from.
type XmpArrayType The type of the XmpArray .

Returns: XmpArray - An XmpArray containing all the elements from the original array.

from(Date[] array, XmpArrayType type)

public static XmpArray from(Date[] array, XmpArrayType type)

Creates an XmpArray instance form a date array.

Parameters:

Parameter Type Description
array java.util.Date[] The array to create an XmpArray from.
type XmpArrayType The type of the XmpArray .

Returns: XmpArray - An XmpArray containing all the elements from the original array.

from(double[] array, XmpArrayType type)

public static XmpArray from(double[] array, XmpArrayType type)

Creates an XmpArray instance form a double array.

Parameters:

Parameter Type Description
array double[] The array to create an XmpArray from.
type XmpArrayType The type of the XmpArray .

Returns: XmpArray - An XmpArray containing all the elements from the original array.

getXmpRepresentation()

public String getXmpRepresentation()

Converts XMP value to the xml representation.

Returns: java.lang.String - Returns string representation of XMP value.

toPlatformArray(Class type)

public final T[] <T>toPlatformArray(Class<T> type)

Converts the XmpArray to a platform-specific array.

Parameters:

Parameter Type Description
type java.lang.Class

Returns: T[] - A platform-specific array containing elements of the XmpArray .

T : The type of the array element.