|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiweekly.io.xml.XCalElement
public class XCalElement
Wraps xCal functionality around an XML Element
object.
Constructor Summary | |
---|---|
XCalElement(Element element)
Creates a new xCal element. |
Method Summary | |
---|---|
List<String> |
all(String localName)
Gets the values of all child elements that have the given name. |
List<String> |
all(Value dataType)
Gets all the values of a given data type. |
XCalElement |
append(String name)
Adds a child element. |
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. |
XCalElement |
append(Value dataType)
Adds an empty value. |
Element |
append(Value dataType,
String value)
Adds a value. |
Element |
appendUnknown(String value)
Adds a value with the "unknown" data type. |
XCalElement |
child(Value dataType)
Gets the first child element with the given data type. |
List<XCalElement> |
children(Value dataType)
Gets all child elements with the given data type. |
Document |
document()
Gets the owner document. |
String |
first(String localName)
Gets the value of the first child element with the given name. |
String |
first(Value dataType)
Gets the first value of the given data type. |
String |
firstUnknown()
Gets the first value of the "unknown" data type. |
Element |
getElement()
Gets the wrapped XML element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XCalElement(Element element)
element
- the XML element to wrapMethod Detail |
---|
public String first(Value dataType)
dataType
- the data type to look for
public String firstUnknown()
public String first(String localName)
localName
- the name of the element
public List<String> all(Value dataType)
dataType
- the data type to look for
public List<String> all(String localName)
localName
- the element name
public Element appendUnknown(String value)
value
- the value
public Element append(Value dataType, String value)
dataType
- the 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 XCalElement append(String name)
name
- the name of the child element
public XCalElement append(Value dataType)
dataType
- the data type
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 getElement()
public List<XCalElement> children(Value dataType)
dataType
- the data type
public XCalElement child(Value dataType)
dataType
- the data type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |