Interface ConditionFactory
public interface ConditionFactory
- Version:
- $Revision: 1.2 $
- Author:
- Philippe Le Hegaret
-
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
-
Method Details
-
createAndCondition
Creates an and condition- Parameters:
first- the first conditionsecond- the second condition- Returns:
- A combinator condition
- Throws:
CSSException- if this exception is not supported.
-
createOrCondition
Creates an or condition- Parameters:
first- the first conditionsecond- the second condition- Returns:
- A combinator condition
- Throws:
CSSException- if this exception is not supported.
-
createNegativeCondition
Creates a negative condition- Parameters:
condition- the condition- Returns:
- A negative condition
- Throws:
CSSException- if this exception is not supported.
-
createPositionalCondition
PositionalCondition createPositionalCondition(int position, boolean typeNode, boolean type) throws CSSException Creates a positional condition- Parameters:
position- the position of the node in the list.typeNode-trueif the list should contain only nodes of the same type (element, text node, ...).type-truetrue 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
AttributeCondition createAttributeCondition(String localName, String namespaceURI, boolean specified, String value) throws CSSException Creates an attribute condition- Parameters:
localName- the localName of the attributenamespaceURI- the namespace URI of the attributespecified-trueif 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
Creates an id condition- Parameters:
value- the value of the id.- Returns:
- An Id condition
- Throws:
CSSException- if this exception is not supported.
-
createLangCondition
Creates a lang condition- Parameters:
value- the value of the language.- Returns:
- A lang condition
- Throws:
CSSException- if this exception is not supported.
-
createOneOfAttributeCondition
AttributeCondition createOneOfAttributeCondition(String localName, String namespaceURI, boolean specified, String value) throws CSSException Creates a "one of" attribute condition- Parameters:
localName- the localName of the attributenamespaceURI- the namespace URI of the attributespecified-trueif 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
AttributeCondition createBeginHyphenAttributeCondition(String localName, String namespaceURI, boolean specified, String value) throws CSSException Creates a "begin hyphen" attribute condition- Parameters:
localName- the localName of the attributenamespaceURI- the namespace URI of the attributespecified-trueif 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
Creates a class condition- Parameters:
namespaceURI- the namespace URI of the attributevalue- the name of the class.localName- the localName of the attributespecified-trueif the attribute must be specified in the document.- Returns:
- A class condition
- Throws:
CSSException- if this exception is not supported.
-
createPseudoClassCondition
AttributeCondition createPseudoClassCondition(String namespaceURI, String value) throws CSSException Creates a pseudo class condition- 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
Creates a "only one" child condition- Returns:
- A "only one" child condition
- Throws:
CSSException- if this exception is not supported.
-
createOnlyTypeCondition
Creates a "only one" type condition- Returns:
- A "only one" type condition
- Throws:
CSSException- if this exception is not supported.
-
createContentCondition
Creates a content condition- Parameters:
data- the data in the content- Returns:
- A content condition
- Throws:
CSSException- if this exception is not supported.
-