net.sf.saxon.pull
public class PullFilter extends Object implements PullProvider
Field Summary | |
---|---|
protected int | currentEvent |
Constructor Summary | |
---|---|
PullFilter(PullProvider base)
Create a PullFilter |
Method Summary | |
---|---|
void | close()
Close the event reader. |
int | current()
Get the event most recently returned by next(), or by other calls that change
the position, for example getStringValue() and skipToMatchingEnd(). |
AtomicValue | getAtomicValue()
Get an atomic value. |
AttributeCollection | getAttributes()
Get the attributes associated with the current element. |
int | getFingerprint()
Get the fingerprint of the name of the element. |
int | getNameCode()
Get the nameCode identifying the name of the current node. |
NamePool | getNamePool()
Helper method to get the current namePool |
NamespaceDeclarations | getNamespaceDeclarations()
Get the namespace declarations associated with the current element. |
PipelineConfiguration | getPipelineConfiguration()
Get configuration information. |
SourceLocator | getSourceLocator()
Get the location of the current event.
|
CharSequence | getStringValue()
Get the string value of the current element, text node, processing-instruction,
or top-level attribute or namespace node, or atomic value.
|
int | getTypeAnnotation()
Get the type annotation of the current attribute or element node, or atomic value.
|
PullProvider | getUnderlyingProvider()
Get the underlying PullProvider |
int | next()
Get the next event.
|
void | setPipelineConfiguration(PipelineConfiguration pipe)
Set configuration information. |
int | skipToMatchingEnd()
Skip the current subtree. |
Parameters: base the PullProvider to which requests are to be passed
Returns: the current event
Attributes may be read before or after reading the namespaces of an element, but must not be read after the first child node has been read, or after calling one of the methods skipToEnd(), getStringValue(), or getTypedValue().
Returns: an AttributeCollection representing the attributes of the element that has just been notified.
Returns: the fingerprint. The fingerprint can be used to obtain the local name and namespace URI from the name pool.
Returns: the nameCode. The nameCode can be used to obtain the prefix, local name, and namespace URI from the name pool.
It is permissible for this method to return namespace declarations that are redundant.
The NamespaceDeclarations object is guaranteed to remain unchanged until the next START_ELEMENT event, but may then be overwritten. The object should not be modified by the client.
Namespaces may be read before or after reading the attributes of an element, but must not be read after the first child node has been read, or after calling one of the methods skipToEnd(), getStringValue(), or getTypedValue().
*In other situations the result is undefined and may result in an IllegalStateException.
If the most recent event was a PullFilter, this method causes the content of the element to be read. The next event notified will be the corresponding PullFilter.
Returns: the String Value of the node in question, defined according to the rules in the XPath data model.
Returns: the type annotation. This code is the fingerprint of a type name, which may be resolved to a SchemaType by access to the Configuration.
Note that a subclass that overrides this method is responsible for ensuring that current() works properly. This can be achieved by setting the field currentEvent to the event returned by any call on next().
Returns: an integer code indicating the type of event. The code PullFilter is returned at the end of the sequence.