org.apache.batik.bridge.svg12

Class AbstractContentSelector

public abstract class AbstractContentSelector extends Object

A base class for handlers of different XBL content element includes attribute syntaxes.
Nested Class Summary
protected static interfaceAbstractContentSelector.ContentSelectorFactory
An interface for content selector factories.
protected static classAbstractContentSelector.XPathPatternContentSelectorFactory
A factory for XPathPatternContentSelector objects.
protected static classAbstractContentSelector.XPathSubsetContentSelectorFactory
A factory for XPathSubsetContentSelector objects.
Field Summary
protected ElementboundElement
The bound element.
protected XBLOMContentElementcontentElement
The XBL content element.
protected ContentManagercontentManager
The ContentManager object that owns this selector.
protected static HashMapselectorFactories
Map of selector languages to factories.
Constructor Summary
AbstractContentSelector(ContentManager cm, XBLOMContentElement content, Element bound)
Creates a new AbstractContentSelector object.
Method Summary
static AbstractContentSelectorcreateSelector(String selectorLanguage, ContentManager cm, XBLOMContentElement content, Element bound, String selector)
Creates a new selector object.
abstract NodeListgetSelectedContent()
Returns a list of nodes that were matched by this selector.
protected booleanisSelected(Node n)
Returns true if the given node has already been selected by a content element.

Field Detail

boundElement

protected Element boundElement
The bound element.

contentElement

protected XBLOMContentElement contentElement
The XBL content element.

contentManager

protected ContentManager contentManager
The ContentManager object that owns this selector.

selectorFactories

protected static HashMap selectorFactories
Map of selector languages to factories.

Constructor Detail

AbstractContentSelector

public AbstractContentSelector(ContentManager cm, XBLOMContentElement content, Element bound)
Creates a new AbstractContentSelector object.

Method Detail

createSelector

public static AbstractContentSelector createSelector(String selectorLanguage, ContentManager cm, XBLOMContentElement content, Element bound, 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.

getSelectedContent

public abstract NodeList getSelectedContent()
Returns a list of nodes that were matched by this selector.

isSelected

protected boolean isSelected(Node n)
Returns true if the given node has already been selected by a content element.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.