Package org.apache.batik.bridge.svg12
Class XPathSubsetContentSelector
java.lang.Object
org.apache.batik.bridge.svg12.AbstractContentSelector
org.apache.batik.bridge.svg12.XPathSubsetContentSelector
A class to handle the XPath subset syntax for XBL content elements.
- Version:
- $Id: XPathSubsetContentSelector.java 1733416 2016-03-03 07:07:13Z gadams $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A scanner for XPath subset selectors.protected class
Implementation of NodeList that contains the nodes that matched this selector.Nested classes/interfaces inherited from class org.apache.batik.bridge.svg12.AbstractContentSelector
AbstractContentSelector.ContentSelectorFactory, AbstractContentSelector.XPathPatternContentSelectorFactory, AbstractContentSelector.XPathSubsetContentSelectorFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The index for selection.protected String
The local name or ID used for selection.protected String
The QName prefix used for selection.protected XPathSubsetContentSelector.SelectedNodes
The selected nodes.protected static final int
protected static final int
protected static final int
protected static final int
protected int
The type of XPath subset expression.Fields inherited from class org.apache.batik.bridge.svg12.AbstractContentSelector
boundElement, contentElement, contentManager, selectorFactories
-
Constructor Summary
ConstructorsConstructorDescriptionXPathSubsetContentSelector
(ContentManager cm, XBLOMContentElement content, Element bound, String selector) Creates a new XPathSubsetContentSelector object. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of nodes that were matched by the given selector string.protected void
parseSelector
(String selector) Parses the selector string.(package private) boolean
update()
Forces this selector to update its selected nodes list.Methods inherited from class org.apache.batik.bridge.svg12.AbstractContentSelector
createSelector, isSelected
-
Field Details
-
SELECTOR_INVALID
protected static final int SELECTOR_INVALID- See Also:
-
SELECTOR_ANY
protected static final int SELECTOR_ANY- See Also:
-
SELECTOR_QNAME
protected static final int SELECTOR_QNAME- See Also:
-
SELECTOR_ID
protected static final int SELECTOR_ID- See Also:
-
selectorType
protected int selectorTypeThe type of XPath subset expression. -
prefix
The QName prefix used for selection. -
localName
The local name or ID used for selection. -
index
protected int indexThe index for selection. 0 means select all elements that match. -
selectedContent
The selected nodes.
-
-
Constructor Details
-
XPathSubsetContentSelector
public XPathSubsetContentSelector(ContentManager cm, XBLOMContentElement content, Element bound, String selector) Creates a new XPathSubsetContentSelector object.
-
-
Method Details
-
parseSelector
Parses the selector string. -
getSelectedContent
Returns a list of nodes that were matched by the given selector string.- Specified by:
getSelectedContent
in classAbstractContentSelector
-
update
boolean update()Forces this selector to update its selected nodes list. Returns true if the selected node list needed updating. This assumes that the previous content elements in this shadow tree (in document order) have up-to-date selectedContent lists.- Specified by:
update
in classAbstractContentSelector
-