Package org.apache.batik.bridge.svg12
Class AbstractContentSelector
- java.lang.Object
-
- org.apache.batik.bridge.svg12.AbstractContentSelector
-
- Direct Known Subclasses:
DefaultContentSelector,XPathPatternContentSelector,XPathSubsetContentSelector
public abstract class AbstractContentSelector extends java.lang.ObjectA base class for handlers of different XBL content element includes attribute syntaxes.- Version:
- $Id: AbstractContentSelector.java 1808023 2017-09-11 12:43:22Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceAbstractContentSelector.ContentSelectorFactoryAn interface for content selector factories.protected static classAbstractContentSelector.XPathPatternContentSelectorFactoryA factory for XPathPatternContentSelector objects.protected static classAbstractContentSelector.XPathSubsetContentSelectorFactoryA factory for XPathSubsetContentSelector objects.
-
Field Summary
Fields Modifier and Type Field Description protected org.w3c.dom.ElementboundElementThe bound element.protected XBLOMContentElementcontentElementThe XBL content element.protected ContentManagercontentManagerThe ContentManager object that owns this selector.protected static java.util.HashMapselectorFactoriesMap of selector languages to factories.
-
Constructor Summary
Constructors Constructor Description AbstractContentSelector(ContentManager cm, XBLOMContentElement content, org.w3c.dom.Element bound)Creates a new AbstractContentSelector object.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static AbstractContentSelectorcreateSelector(java.lang.String selectorLanguage, ContentManager cm, XBLOMContentElement content, org.w3c.dom.Element bound, java.lang.String selector)Creates a new selector object.abstract org.w3c.dom.NodeListgetSelectedContent()Returns a list of nodes that were matched by this selector.protected booleanisSelected(org.w3c.dom.Node n)Returns true if the given node has already been selected by a content element.(package private) abstract booleanupdate()Forces this selector to update its selected nodes list.
-
-
-
Field Detail
-
contentManager
protected ContentManager contentManager
The ContentManager object that owns this selector.
-
contentElement
protected XBLOMContentElement contentElement
The XBL content element.
-
boundElement
protected org.w3c.dom.Element boundElement
The bound element.
-
selectorFactories
protected static java.util.HashMap selectorFactories
Map of selector languages to factories.
-
-
Constructor Detail
-
AbstractContentSelector
public AbstractContentSelector(ContentManager cm, XBLOMContentElement content, org.w3c.dom.Element bound)
Creates a new AbstractContentSelector object.
-
-
Method Detail
-
getSelectedContent
public abstract org.w3c.dom.NodeList getSelectedContent()
Returns a list of nodes that were matched by this selector.
-
update
abstract 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.
-
isSelected
protected boolean isSelected(org.w3c.dom.Node n)
Returns true if the given node has already been selected by a content element.
-
createSelector
public static AbstractContentSelector createSelector(java.lang.String selectorLanguage, ContentManager cm, XBLOMContentElement content, org.w3c.dom.Element bound, java.lang.String selector)
Creates a new selector object.- Parameters:
content- The content element using this selector.bound- The bound element whose children will be selected.selector- The selector string.
-
-