org.w3c.flute.parser.selectors

Class SelectorFactoryImpl

public class SelectorFactoryImpl extends Object implements SelectorFactory

Version: $Revision: 1.1.1.1 $

Author: Philippe Le Hegaret

Method Summary
SimpleSelectorcreateAnyNodeSelector()
Creates an any node selector.
CharacterDataSelectorcreateCDataSectionSelector(String data)
Creates a cdata section node selector.
DescendantSelectorcreateChildSelector(Selector parent, SimpleSelector child)
Creates a child selector.
CharacterDataSelectorcreateCommentSelector(String data)
Creates a comment node selector.
ConditionalSelectorcreateConditionalSelector(SimpleSelector selector, Condition condition)
Creates a conditional selector.
DescendantSelectorcreateDescendantSelector(Selector parent, SimpleSelector descendant)
Creates a descendant selector.
SiblingSelectorcreateDirectAdjacentSelector(short nodeType, Selector child, SimpleSelector directAdjacent)
Creates a direct adjacent selector.
ElementSelectorcreateElementSelector(String namespaceURI, String localName)
Creates an element selector.
NegativeSelectorcreateNegativeSelector(SimpleSelector selector)
Creates an negative selector.
ProcessingInstructionSelectorcreateProcessingInstructionSelector(String target, String data)
Creates a processing instruction node selector.
ElementSelectorcreatePseudoElementSelector(String namespaceURI, String pseudoName)
Creates a pseudo element selector.
SimpleSelectorcreateRootNodeSelector()
Creates an root node selector.
CharacterDataSelectorcreateTextNodeSelector(String data)
Creates a text node selector.

Method Detail

createAnyNodeSelector

public SimpleSelector createAnyNodeSelector()
Creates an any node selector.

Returns: the any node selector.

Throws: CSSException If this selector is not supported.

createCDataSectionSelector

public CharacterDataSelector createCDataSectionSelector(String data)
Creates a cdata section node selector.

Parameters: data the data

Returns: the cdata section node selector

Throws: CSSException If this selector is not supported.

createChildSelector

public DescendantSelector createChildSelector(Selector parent, SimpleSelector child)
Creates a child selector.

Parameters: parent the parent selector child the child selector

Returns: the combinator selector.

Throws: CSSException If this selector is not supported.

createCommentSelector

public CharacterDataSelector createCommentSelector(String data)
Creates a comment node selector.

Parameters: data the data

Returns: the comment node selector

Throws: CSSException If this selector is not supported.

createConditionalSelector

public ConditionalSelector createConditionalSelector(SimpleSelector selector, Condition condition)
Creates a conditional selector.

Parameters: selector a selector. condition a condition

Returns: the conditional selector.

Throws: CSSException If this selector is not supported.

createDescendantSelector

public DescendantSelector createDescendantSelector(Selector parent, SimpleSelector descendant)
Creates a descendant selector.

Parameters: parent the parent selector descendant the descendant selector

Returns: the combinator selector.

Throws: CSSException If this selector is not supported.

createDirectAdjacentSelector

public SiblingSelector createDirectAdjacentSelector(short nodeType, Selector child, SimpleSelector directAdjacent)
Creates a direct adjacent selector.

Parameters: child the child selector adjacent the direct adjacent selector

Returns: the combinator selector.

Throws: CSSException If this selector is not supported.

createElementSelector

public ElementSelector createElementSelector(String namespaceURI, String localName)
Creates an element selector.

Parameters: namespaceURI the namespace URI of the element selector. tagName the local part of the element name. NULL if this element selector can match any element.

Returns: the element selector

Throws: CSSException If this selector is not supported.

createNegativeSelector

public NegativeSelector createNegativeSelector(SimpleSelector selector)
Creates an negative selector.

Parameters: selector a selector.

Returns: the negative selector.

Throws: CSSException If this selector is not supported.

createProcessingInstructionSelector

public ProcessingInstructionSelector createProcessingInstructionSelector(String target, String data)
Creates a processing instruction node selector.

Parameters: target the target data the data

Returns: the processing instruction node selector

Throws: CSSException If this selector is not supported.

createPseudoElementSelector

public ElementSelector createPseudoElementSelector(String namespaceURI, String pseudoName)
Creates a pseudo element selector.

Parameters: pseudoName the pseudo element name. NULL if this element selector can match any pseudo element.

Returns: the element selector

Throws: CSSException If this selector is not supported.

createRootNodeSelector

public SimpleSelector createRootNodeSelector()
Creates an root node selector.

Returns: the root node selector.

Throws: CSSException If this selector is not supported.

createTextNodeSelector

public CharacterDataSelector createTextNodeSelector(String data)
Creates a text node selector.

Parameters: data the data

Returns: the text node selector

Throws: CSSException If this selector is not supported.