|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.util.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<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. |
String |
dateAndOrTime()
Gets the value of the first <date-and-or-time> child
element. |
Element |
dateAndOrTime(String dateAndOrTime)
Adds a <date-and-or-time> child element. |
Document |
document()
Gets the owner document. |
Element |
element()
Gets the wrapped XML element. |
String |
get(String... names)
Gets the value of the first child element with one of the given names. |
List<String> |
getAll(String localName)
Gets the value of all non-empty child elements that have the given name. |
String |
text()
Gets the value of the first <text> child element. |
Element |
text(String text)
Adds a <text> child element. |
String |
timestamp()
Gets the value of the first <timestamp> child element. |
Element |
timestamp(String timestamp)
Adds a <timestamp> child element. |
String |
uri()
Gets the value of the first <uri> child element. |
Element |
uri(String uri)
Adds a <uri> child element. |
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 element
public XCardElement(Element element,
VCardVersion version)
element - the XML elementversion - the vCard version| Method Detail |
|---|
public String text()
<text> child element.
public String uri()
<uri> child element.
public String dateAndOrTime()
<date-and-or-time> child
element.
public String timestamp()
<timestamp> child element.
public String get(String... names)
names - the possible names of the element
public List<String> getAll(String localName)
localName - the element name
public Element text(String text)
<text> child element.
text - the text
public Element uri(String uri)
<uri> child element.
uri - the URI
public Element dateAndOrTime(String dateAndOrTime)
<date-and-or-time> child element.
dateAndOrTime - the date/time
public Element timestamp(String timestamp)
<timestamp> child element.
timestamp - the timestamp
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 | |||||||||