XMLizablepublic class XMPArray extends XMPComplexValue
| Constructor | Description |
|---|---|
XMPArray(XMPArrayType type) |
Main constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(Object value) |
Adds a new value to the array
|
void |
add(String value,
String lang) |
Adds a language-dependent value to the array.
|
String |
getLangValue(String lang) |
Returns a language-dependent values (available for alternative arrays).
|
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() |
|
Object |
getValue(int idx) |
Returns the value at a given position.
|
boolean |
isEmpty() |
Indicates whether the array is empty or not.
|
boolean |
remove(String value) |
Removes a value from the array.
|
String |
removeLangValue(String lang) |
Removes a language-dependent value.
|
Object[] |
toObjectArray() |
Converts the array to an object array.
|
void |
toSAX(ContentHandler handler) |
Generates SAX events representing the object's state.
|
String |
toString() |
public XMPArray(XMPArrayType type)
type - the intended type of arraypublic XMPArrayType getType()
public Object getValue(int idx)
idx - the index of the requested valuepublic XMPStructure getStructure(int idx)
idx - the index of the requested valuepublic Object getSimpleValue()
getSimpleValue in class XMPComplexValuepublic String getLangValue(String lang)
lang - the language ("x-default" for the default value)public String removeLangValue(String lang)
lang - the language ("x-default" for the default value)public void add(Object value)
value - the valuepublic boolean remove(String value)
value - the value to be removedpublic void add(String value, String lang)
value - the valuelang - the language ("x-default" for the default value)public int getSize()
public boolean isEmpty()
public Object[] toObjectArray()
public void toSAX(ContentHandler handler) throws SAXException
handler - ContentHandler instance to send the SAX events toSAXException - if there's a problem generating the SAX eventsCopyright © 2018 Apache Software Foundation. All rights reserved.