|
xmlgraphics-commons 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlgraphics.xmp.XMPComplexValue
org.apache.xmlgraphics.xmp.XMPArray
public class XMPArray
Represents an XMP array as defined by the XMP specification.
Constructor Summary | |
---|---|
XMPArray(XMPArrayType type)
Main constructor |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XMPArray(XMPArrayType type)
type
- the intended type of arrayMethod Detail |
---|
public XMPArrayType getType()
public Object getValue(int idx)
idx
- the index of the requested value
public XMPStructure getStructure(int idx)
idx
- the index of the requested value
public Object getSimpleValue()
getSimpleValue
in class XMPComplexValue
public 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 removed
public 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 to
SAXException
- if there's a problem generating the SAX eventspublic String toString()
toString
in class Object
|
xmlgraphics-commons 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |