|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.io.xml.XCardElement
public class XCardElement
Wraps xCard functionality around an XML Element
.
Constructor Summary | |
---|---|
XCardElement(Element element)
Wraps an existing XML element. |
|
XCardElement(Element element,
VCardVersion version)
Wraps an existing XML element. |
|
XCardElement(String propertyName)
Creates a new XML element under its own XML document. |
|
XCardElement(String propertyName,
VCardVersion version)
Creates a new XML element under its own XML document. |
Method Summary | |
---|---|
List<String> |
all(String localName)
Gets the value of all non-empty child elements that have the given name. |
List<String> |
all(VCardDataType dataType)
Gets all the values of a given data type. |
List<Element> |
append(String name,
Collection<String> values)
Adds multiple child elements, each with the same name. |
Element |
append(String name,
String value)
Adds a child element. |
Element |
append(VCardDataType dataType,
String value)
Adds a value. |
Document |
document()
Gets the owner document. |
Element |
element()
Gets the wrapped XML element. |
String |
first(String... names)
Gets the value of the first child element with one of the given names. |
String |
first(VCardDataType... dataTypes)
Gets the first value with one of the given data types. |
VCardVersion |
version()
Gets the vCard version. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XCardElement(String propertyName)
propertyName
- the property name (e.g. "adr")public XCardElement(String propertyName, VCardVersion version)
propertyName
- the property name (e.g. "adr")version
- the vCard versionpublic XCardElement(Element element)
element
- the XML elementpublic XCardElement(Element element, VCardVersion version)
element
- the XML elementversion
- the vCard versionMethod Detail |
---|
public String first(VCardDataType... dataTypes)
dataTypes
- the data type(s) to look for (null signifies the
"unknown" data type)
public String first(String... names)
names
- the possible names of the element
public List<String> all(VCardDataType dataType)
dataType
- the data type to look for
public List<String> all(String localName)
localName
- the element name
public Element append(VCardDataType dataType, String value)
dataType
- the data type or null for the "unknown" data typevalue
- the value
public Element append(String name, String value)
name
- the name of the child elementvalue
- the value of the child element.
public List<Element> append(String name, Collection<String> values)
name
- the name for all the child elementsvalues
- the values of each child element
public Document document()
public Element element()
public VCardVersion version()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |