Class ConditionFactoryImpl
java.lang.Object
com.steadystate.css.parser.selectors.ConditionFactoryImpl
- All Implemented Interfaces:
ConditionFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAndCondition
(Condition first, Condition second) Creates an and conditioncreateAttributeCondition
(String localName, String namespaceURI, boolean specified, String value) Creates an attribute conditioncreateBeginHyphenAttributeCondition
(String localName, String namespaceURI, boolean specified, String value) Creates a "begin hyphen" attribute conditioncreateClassCondition
(String namespaceURI, String value) Creates a class conditioncreateContentCondition
(String data) Creates a content conditioncreateIdCondition
(String value) Creates an id conditioncreateLangCondition
(String lang) Creates a lang conditioncreateNegativeCondition
(Condition condition) Creates a negative conditioncreateOneOfAttributeCondition
(String localName, String namespaceURI, boolean specified, String value) Creates a "one of" attribute conditionCreates a "only one" child conditionCreates a "only one" type conditioncreateOrCondition
(Condition first, Condition second) Creates an or conditioncreatePositionalCondition
(int position, boolean typeNode, boolean type) Creates a positional conditioncreatePseudoClassCondition
(String namespaceURI, String value) Creates a pseudo class condition
-
Constructor Details
-
ConditionFactoryImpl
public ConditionFactoryImpl()
-
-
Method Details
-
createAndCondition
public CombinatorCondition createAndCondition(Condition first, Condition second) throws CSSException Description copied from interface:ConditionFactory
Creates an and condition- Specified by:
createAndCondition
in interfaceConditionFactory
- Parameters:
first
- the first conditionsecond
- the second condition- Returns:
- A combinator condition
- Throws:
CSSException
- if this exception is not supported.
-
createOrCondition
Description copied from interface:ConditionFactory
Creates an or condition- Specified by:
createOrCondition
in interfaceConditionFactory
- Parameters:
first
- the first conditionsecond
- the second condition- Returns:
- A combinator condition
- Throws:
CSSException
- if this exception is not supported.
-
createNegativeCondition
Description copied from interface:ConditionFactory
Creates a negative condition- Specified by:
createNegativeCondition
in interfaceConditionFactory
- Parameters:
condition
- the condition- Returns:
- A negative condition
- Throws:
CSSException
- if this exception is not supported.
-
createPositionalCondition
public PositionalCondition createPositionalCondition(int position, boolean typeNode, boolean type) throws CSSException Description copied from interface:ConditionFactory
Creates a positional condition- Specified by:
createPositionalCondition
in interfaceConditionFactory
- 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.
-
createAttributeCondition
public AttributeCondition createAttributeCondition(String localName, String namespaceURI, boolean specified, String value) throws CSSException Description copied from interface:ConditionFactory
Creates an attribute condition- Specified by:
createAttributeCondition
in interfaceConditionFactory
- Parameters:
localName
- the localName of the attributenamespaceURI
- the namespace URI of the attributespecified
-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.
-
createIdCondition
Description copied from interface:ConditionFactory
Creates an id condition- Specified by:
createIdCondition
in interfaceConditionFactory
- Parameters:
value
- the value of the id.- Returns:
- An Id condition
- Throws:
CSSException
- if this exception is not supported.
-
createLangCondition
Description copied from interface:ConditionFactory
Creates a lang condition- Specified by:
createLangCondition
in interfaceConditionFactory
- Returns:
- A lang condition
- Throws:
CSSException
- if this exception is not supported.
-
createOneOfAttributeCondition
public AttributeCondition createOneOfAttributeCondition(String localName, String namespaceURI, boolean specified, String value) throws CSSException Description copied from interface:ConditionFactory
Creates a "one of" attribute condition- Specified by:
createOneOfAttributeCondition
in interfaceConditionFactory
- Parameters:
localName
- the localName of the attributenamespaceURI
- the namespace URI of the attributespecified
-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.
-
createBeginHyphenAttributeCondition
public AttributeCondition createBeginHyphenAttributeCondition(String localName, String namespaceURI, boolean specified, String value) throws CSSException Description copied from interface:ConditionFactory
Creates a "begin hyphen" attribute condition- Specified by:
createBeginHyphenAttributeCondition
in interfaceConditionFactory
- Parameters:
localName
- the localName of the attributenamespaceURI
- the namespace URI of the attributespecified
-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) throws CSSException Description copied from interface:ConditionFactory
Creates a class condition- Specified by:
createClassCondition
in interfaceConditionFactory
- Parameters:
namespaceURI
- the namespace URI of the attributevalue
- the name of the class.- Returns:
- A class condition
- Throws:
CSSException
- if this exception is not supported.
-
createPseudoClassCondition
public AttributeCondition createPseudoClassCondition(String namespaceURI, String value) throws CSSException Description copied from interface:ConditionFactory
Creates a pseudo class condition- Specified by:
createPseudoClassCondition
in interfaceConditionFactory
- Parameters:
namespaceURI
- the namespace URI of the attributevalue
- the name of the pseudo class- Returns:
- A pseudo class condition
- Throws:
CSSException
- if this exception is not supported.
-
createOnlyChildCondition
Description copied from interface:ConditionFactory
Creates a "only one" child condition- Specified by:
createOnlyChildCondition
in interfaceConditionFactory
- Returns:
- A "only one" child condition
- Throws:
CSSException
- if this exception is not supported.
-
createOnlyTypeCondition
Description copied from interface:ConditionFactory
Creates a "only one" type condition- Specified by:
createOnlyTypeCondition
in interfaceConditionFactory
- Returns:
- A "only one" type condition
- Throws:
CSSException
- if this exception is not supported.
-
createContentCondition
Description copied from interface:ConditionFactory
Creates a content condition- Specified by:
createContentCondition
in interfaceConditionFactory
- Parameters:
data
- the data in the content- Returns:
- A content condition
- Throws:
CSSException
- if this exception is not supported.
-