|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
N - the name typepublic interface StaxNavigator<N>
| Method Summary | ||
|---|---|---|
N |
child()
Attempts to navigate to the first child found and return its name. |
|
boolean |
child(N name)
Attempts to navigate to the first child having the specified name. |
|
int |
descendant(N name)
Attempts to navigate to the first descendant with the specified name. |
|
boolean |
find(N name)
Attempts to navigate to an element following the current one when it has the specified name. |
|
StaxNavigator<N> |
fork()
Creates a navigator scoped around the currently navigated element. |
|
StaxNavigator<N> |
fork(Axis axis)
Creates a navigator scoped around the currently navigated element. |
|
java.lang.Iterable<StaxNavigator<N>> |
fork(Axis axis,
N name)
Returns an iterable of stax navigator that is built according to the rules: The current element is added if it matches the specified name. Subsequent elements are found thanks to the provided axis. |
|
java.lang.Iterable<StaxNavigator<N>> |
fork(N name)
Returns an iterable of stax navigator that is built according to the rules: The current element is added if it matches the specified name. Subsequent elements are found thanks to the sibling(Object) method.
|
|
java.lang.String |
getAttribute(javax.xml.namespace.QName name)
Returns an attribute of the current element or null if such attribute does not exist. |
|
java.lang.String |
getAttribute(java.lang.String name)
Returns an attribute of the current element or null if such attribute does not exist. |
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns all attributes of the current element or null when the no valid node is being navigated. |
|
java.lang.String |
getContent()
Returns the current navigated element textual content. |
|
int |
getDepth()
Returns the current navigated element depth. |
|
java.lang.String |
getLocalName()
Returns the string representation of the local xml element. |
|
javax.xml.stream.Location |
getLocation()
Returns the location of the start tag of the currently navigated element. |
|
N |
getName()
Returns the current navigated element name. |
|
java.lang.String |
getNamespaceByPrefix(java.lang.String prefix)
Returns a namespace URI by its prefix or return null if it is not bound. |
|
Naming<N> |
getNaming()
Returns the naming used for this navigator. |
|
javax.xml.namespace.QName |
getQName()
Returns the qname of the current xml element. |
|
java.util.Map<javax.xml.namespace.QName,java.lang.String> |
getQualifiedAttributes()
Returns all attributes of the current element or null when the no valid node is being navigated. |
|
boolean |
getTrimContent()
Returns the trim content configuration. |
|
N |
navigate(Axis axis)
Navigates to the next element according to the axis argument and returns its name or null if the end of the stream is reached. |
|
boolean |
navigate(Axis axis,
N name)
Attempt to navigate to the next element according to the axis argument having the specified name. |
|
N |
next()
Navigates to the next element and returns its name or null if the end of the stream is reached. |
|
boolean |
next(N name)
Attempt to navigate to the next element having the specified name. |
|
N |
next(java.util.Set<N> names)
Attempts to navigate to the next element when it belongs to the set of specified names. |
|
|
parseContent(ValueType<V> valueType)
Parses the content of the currently navigated element and return the parsed value. |
|
void |
setTrimContent(boolean trimContent)
Configures the content trimming when getContent() method is invoked. |
|
N |
sibling()
Attempt to navigate to the next sibling and return its name. |
|
boolean |
sibling(N name)
Attempts to navigate to the next sibling having the specified name. |
|
| Method Detail |
|---|
N getName()
throws StaxNavException
StaxNavException - any StaxNavExceptionNaming<N> getNaming()
java.lang.String getLocalName()
throws StaxNavException
StaxNavException - any StaxNavException
javax.xml.namespace.QName getQName()
throws StaxNavException
StaxNavException
javax.xml.stream.Location getLocation()
throws StaxNavException
StaxNavException - any StaxNavException
int getDepth()
throws StaxNavException
StaxNavException - any StaxNavException
java.lang.String getContent()
throws StaxNavException
StaxNavException - any StaxNavExceptionvoid setTrimContent(boolean trimContent)
getContent() method is invoked.
trimContent - true to trim contentboolean getTrimContent()
<V> V parseContent(ValueType<V> valueType)
throws java.lang.IllegalStateException,
java.lang.NullPointerException,
StaxNavException,
TypeConversionException
V - the generic type of the valuevalueType - the content value type
java.lang.IllegalStateException - if the current element does not point to a content
java.lang.NullPointerException - if the value type argument is null
StaxNavException - any StaxNavException
TypeConversionException - when the a type conversion error occured
StaxNavigator<N> fork()
throws StaxNavException
StaxNavException - any StaxNavException
StaxNavigator<N> fork(Axis axis)
throws java.lang.NullPointerException
axis argument value when a valid element is found otherwise it will not
change.
axis - the axis
java.lang.NullPointerException - if the axis argument is null
java.lang.Iterable<StaxNavigator<N>> fork(N name)
throws java.lang.NullPointerException
sibling(Object) method.
name - the name of the root elements of the forked navigator
java.lang.NullPointerException - if the name argument is null
java.lang.Iterable<StaxNavigator<N>> fork(Axis axis,
N name)
throws java.lang.NullPointerException
axis - the axis of navigation for the forksname - the name of the root elements of the forked navigator
java.lang.NullPointerException - if the name argument is null
boolean find(N name)
throws StaxNavException
name - the element name to find
StaxNavException - any StaxNavException
N navigate(Axis axis)
throws StaxNavException
axis - the navigation axis
StaxNavException - any StaxNavException
boolean navigate(Axis axis,
N name)
throws StaxNavException
axis - the navigation axisname - the desired element name
java.lang.NullPointerException - if the specified name is null
StaxNavException - any StaxNavException
N next()
throws StaxNavException
StaxNavException - any StaxNavException
boolean next(N name)
throws java.lang.NullPointerException,
StaxNavException
name - the desired element name
java.lang.NullPointerException - if the specified name is null
StaxNavException - any StaxNavException
N next(java.util.Set<N> names)
throws java.lang.NullPointerException,
StaxNavException
names - the set of desired element names
java.lang.NullPointerException - if the names argument is null
StaxNavException - any StaxNavException
N child()
throws StaxNavException
StaxNavException - any StaxNavException
boolean child(N name)
throws java.lang.NullPointerException,
StaxNavException
name - the child name
java.lang.NullPointerException - if the name argument is null
StaxNavException - any StaxNavException
N sibling()
throws StaxNavException
StaxNavException - any StaxNavException
boolean sibling(N name)
throws java.lang.NullPointerException,
StaxNavException
name - the next sibling name
java.lang.NullPointerException - if the name argument is null
StaxNavException - any StaxNavException
java.lang.String getAttribute(java.lang.String name)
throws java.lang.NullPointerException,
StaxNavException
name - the attribute name
java.lang.NullPointerException - if the name argument is null
StaxNavException - any StaxNavException
java.lang.String getAttribute(javax.xml.namespace.QName name)
throws java.lang.NullPointerException,
StaxNavException
name - the attribute name
java.lang.NullPointerException - if the name argument is null
StaxNavException - any StaxNavException
java.util.Map<java.lang.String,java.lang.String> getAttributes()
throws StaxNavException
StaxNavException - any StaxNavException
java.util.Map<javax.xml.namespace.QName,java.lang.String> getQualifiedAttributes()
throws StaxNavException
StaxNavException - any StaxNavException
java.lang.String getNamespaceByPrefix(java.lang.String prefix)
throws java.lang.NullPointerException,
StaxNavException
prefix - the prefix
java.lang.NullPointerException - if the prefix is null
StaxNavException - any StaxNavException
int descendant(N name)
throws java.lang.NullPointerException,
StaxNavException
name - the descendant name
java.lang.NullPointerException - if the name is null
StaxNavException - any StaxNavException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||