public class XMPArray extends XMPComplexValue
| Constructor and Description |
|---|
XMPArray(XMPArrayType type)
Main constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Object value) |
void |
add(java.lang.Object value,
java.lang.String lang)
Adds a language-dependent value to the array.
|
void |
add(java.lang.Object value,
java.lang.String lang,
java.lang.String parseType)
Adds a new value to the array
|
java.lang.String |
getLangValue(java.lang.String lang)
Returns a language-dependent values (available for alternative arrays).
|
java.lang.Object |
getSimpleValue()
Returns a normal Java object representing the value if it is available.
|
int |
getSize()
Returns the current number of values in the array.
|
XMPStructure |
getStructure(int idx)
Returns the structure at a given position.
|
XMPArrayType |
getType() |
java.lang.Object |
getValue(int idx)
Returns the value at a given position.
|
boolean |
isEmpty()
Indicates whether the array is empty or not.
|
boolean |
remove(java.lang.String value)
Removes a value from the array.
|
java.lang.String |
removeLangValue(java.lang.String lang)
Removes a language-dependent value.
|
java.lang.Object[] |
toObjectArray()
Converts the array to an object array.
|
void |
toSAX(org.xml.sax.ContentHandler handler)
Generates SAX events representing the object's state.
|
java.lang.String |
toString() |
public XMPArray(XMPArrayType type)
type - the intended type of arraypublic XMPArrayType getType()
public java.lang.Object getValue(int idx)
idx - the index of the requested valuepublic XMPStructure getStructure(int idx)
idx - the index of the requested valuepublic java.lang.Object getSimpleValue()
getSimpleValue in class XMPComplexValuepublic java.lang.String getLangValue(java.lang.String lang)
lang - the language ("x-default" for the default value)public java.lang.String removeLangValue(java.lang.String lang)
lang - the language ("x-default" for the default value)public void add(java.lang.Object value,
java.lang.String lang,
java.lang.String parseType)
value - the valuepublic void add(java.lang.Object value,
java.lang.String lang)
value - the valuelang - the language ("x-default" for the default value)public void add(java.lang.Object value)
public boolean remove(java.lang.String value)
value - the value to be removedpublic int getSize()
public boolean isEmpty()
public java.lang.Object[] toObjectArray()
public void toSAX(org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
handler - ContentHandler instance to send the SAX events toorg.xml.sax.SAXException - if there's a problem generating the SAX eventspublic java.lang.String toString()
toString in class java.lang.ObjectCopyright 1999-2025 The Apache Software Foundation. All Rights Reserved.