org.w3c.flute.parser.selectors

Class ConditionFactoryImpl

public class ConditionFactoryImpl extends Object implements ConditionFactory

Version: $Revision: 1.1.1.1 $

Author: Philippe Le Hegaret

Method Summary
CombinatorConditioncreateAndCondition(Condition first, Condition second)
Creates an and condition
AttributeConditioncreateAttributeCondition(String localName, String namespaceURI, boolean specified, String value)
creates an attribute condition
AttributeConditioncreateBeginHyphenAttributeCondition(String localName, String namespaceURI, boolean specified, String value)
Creates a "begin hyphen" attribute condition
AttributeConditioncreateClassCondition(String namespaceURI, String value)
Creates a class condition
ContentConditioncreateContentCondition(String data)
Creates a content condition
AttributeConditioncreateIdCondition(String value)
Creates an id condition
LangConditioncreateLangCondition(String lang)
Creates a lang condition
NegativeConditioncreateNegativeCondition(Condition condition)
Creates a negative condition
AttributeConditioncreateOneOfAttributeCondition(String localName, String namespaceURI, boolean specified, String value)
Creates a "one of" attribute condition
ConditioncreateOnlyChildCondition()
Creates a "only one" child condition
ConditioncreateOnlyTypeCondition()
Creates a "only one" type condition
CombinatorConditioncreateOrCondition(Condition first, Condition second)
Creates an or condition
PositionalConditioncreatePositionalCondition(int position, boolean typeNode, boolean type)
Creates a positional condition
AttributeConditioncreatePseudoClassCondition(String namespaceURI, String value)
Creates a pseudo class condition

Method Detail

createAndCondition

public CombinatorCondition createAndCondition(Condition first, Condition second)
Creates an and condition

Parameters: first the first condition second the second condition

Returns: A combinator condition

Throws: CSSException if this exception is not supported.

createAttributeCondition

public AttributeCondition createAttributeCondition(String localName, String namespaceURI, boolean specified, String value)
creates an attribute condition

Parameters: localName the localName of the attribute namespaceURI the namespace URI of the attribute specified true if the attribute must be specified in the document. value the value of this attribute.

Returns: An attribute condition

Throws: CSSException if this exception is not supported.

createBeginHyphenAttributeCondition

public AttributeCondition createBeginHyphenAttributeCondition(String localName, String namespaceURI, boolean specified, String value)
Creates a "begin hyphen" attribute condition

Parameters: localName the localName of the attribute namespaceURI the namespace URI of the attribute specified true if the attribute must be specified in the document. value the value of this attribute.

Returns: A "begin hyphen" attribute condition

Throws: CSSException if this exception is not supported.

createClassCondition

public AttributeCondition createClassCondition(String namespaceURI, String value)
Creates a class condition

Parameters: localName the localName of the attribute namespaceURI the namespace URI of the attribute specified true if the attribute must be specified in the document. value the name of the class.

Returns: A class condition

Throws: CSSException if this exception is not supported.

createContentCondition

public ContentCondition createContentCondition(String data)
Creates a content condition

Parameters: data the data in the content

Returns: A content condition

Throws: CSSException if this exception is not supported.

createIdCondition

public AttributeCondition createIdCondition(String value)
Creates an id condition

Parameters: value the value of the id.

Returns: An Id condition

Throws: CSSException if this exception is not supported.

createLangCondition

public LangCondition createLangCondition(String lang)
Creates a lang condition

Parameters: value the value of the language.

Returns: A lang condition

Throws: CSSException if this exception is not supported.

createNegativeCondition

public NegativeCondition createNegativeCondition(Condition condition)
Creates a negative condition

Parameters: condition the condition

Returns: A negative condition

Throws: CSSException if this exception is not supported.

createOneOfAttributeCondition

public AttributeCondition createOneOfAttributeCondition(String localName, String namespaceURI, boolean specified, String value)
Creates a "one of" attribute condition

Parameters: localName the localName of the attribute namespaceURI the namespace URI of the attribute specified true if the attribute must be specified in the document. value the value of this attribute.

Returns: A "one of" attribute condition

Throws: CSSException if this exception is not supported.

createOnlyChildCondition

public Condition createOnlyChildCondition()
Creates a "only one" child condition

Returns: A "only one" child condition

Throws: CSSException if this exception is not supported.

createOnlyTypeCondition

public Condition createOnlyTypeCondition()
Creates a "only one" type condition

Returns: A "only one" type condition

Throws: CSSException if this exception is not supported.

createOrCondition

public CombinatorCondition createOrCondition(Condition first, Condition second)
Creates an or condition

Parameters: first the first condition second the second condition

Returns: A combinator condition

Throws: CSSException if this exception is not supported.

createPositionalCondition

public PositionalCondition createPositionalCondition(int position, boolean typeNode, boolean type)
Creates a positional condition

Parameters: position the position of the node in the list. typeNode true if the list should contain only nodes of the same type (element, text node, ...). type true true if the list should contain only nodes of the same node (for element, same localName and same namespaceURI).

Returns: A positional condition

Throws: CSSException if this exception is not supported.

createPseudoClassCondition

public AttributeCondition createPseudoClassCondition(String namespaceURI, String value)
Creates a pseudo class condition

Parameters: namespaceURI the namespace URI of the attribute value the name of the pseudo class

Returns: A pseudo class condition

Throws: CSSException if this exception is not supported.