public class XCalElement extends Object
Element
object.Constructor and Description |
---|
XCalElement(Element element)
Creates a new xCal element.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
all(ICalDataType dataType)
Gets all the values of a given data type.
|
List<String> |
all(String localName)
Gets the values of all child elements that have the given name.
|
XCalElement |
append(ICalDataType dataType)
Adds an empty value.
|
Element |
append(ICalDataType dataType,
String value)
Adds a value.
|
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 |
child(ICalDataType dataType)
Gets the first child element with the given data type.
|
List<XCalElement> |
children(ICalDataType dataType)
Gets all child elements with the given data type.
|
Document |
document()
Gets the owner document.
|
String |
first(ICalDataType dataType)
Gets the first value of the given data type.
|
String |
first(String localName)
Gets the value of the first child element with the given name.
|
Element |
getElement()
Gets the wrapped XML element.
|
public XCalElement(Element element)
element
- the XML element to wrappublic String first(ICalDataType dataType)
dataType
- the data type to look for or null for the "unknown" data
typepublic String first(String localName)
localName
- the name of the elementpublic List<String> all(ICalDataType dataType)
dataType
- the data type to look for or null for the "unknown" data
typepublic List<String> all(String localName)
localName
- the element namepublic Element append(ICalDataType dataType, String value)
dataType
- the data type or null for the "unknown" data typevalue
- the valuepublic 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 elementpublic XCalElement append(ICalDataType dataType)
dataType
- the data typepublic List<Element> append(String name, Collection<String> values)
name
- the name for all the child elementsvalues
- the values of each child elementpublic Element getElement()
public List<XCalElement> children(ICalDataType dataType)
dataType
- the data typepublic XCalElement child(ICalDataType dataType)
dataType
- the data typeCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.