Package org.w3c.css.sac
Interface ConditionFactory
-
public interface ConditionFactory
- Version:
- $Revision: 1.2 $
- Author:
- Philippe Le Hegaret
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CombinatorCondition
createAndCondition(Condition first, Condition second)
Creates an and conditionAttributeCondition
createAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value)
Creates an attribute conditionAttributeCondition
createBeginHyphenAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value)
Creates a "begin hyphen" attribute conditionAttributeCondition
createClassCondition(java.lang.String namespaceURI, java.lang.String value)
Creates a class conditionContentCondition
createContentCondition(java.lang.String data)
Creates a content conditionAttributeCondition
createIdCondition(java.lang.String value)
Creates an id conditionLangCondition
createLangCondition(java.lang.String lang)
Creates a lang conditionNegativeCondition
createNegativeCondition(Condition condition)
Creates a negative conditionAttributeCondition
createOneOfAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value)
Creates a "one of" attribute conditionCondition
createOnlyChildCondition()
Creates a "only one" child conditionCondition
createOnlyTypeCondition()
Creates a "only one" type conditionCombinatorCondition
createOrCondition(Condition first, Condition second)
Creates an or conditionPositionalCondition
createPositionalCondition(int position, boolean typeNode, boolean type)
Creates a positional conditionAttributeCondition
createPseudoClassCondition(java.lang.String namespaceURI, java.lang.String value)
Creates a pseudo class condition
-
-
-
Method Detail
-
createAndCondition
CombinatorCondition createAndCondition(Condition first, Condition second) throws CSSException
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
CombinatorCondition createOrCondition(Condition first, Condition second) throws CSSException
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
NegativeCondition createNegativeCondition(Condition condition) throws CSSException
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
-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
AttributeCondition createAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws CSSException
Creates an attribute condition- 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
AttributeCondition createIdCondition(java.lang.String value) throws CSSException
Creates an id condition- Parameters:
value
- the value of the id.- Returns:
- An Id condition
- Throws:
CSSException
- if this exception is not supported.
-
createLangCondition
LangCondition createLangCondition(java.lang.String lang) throws CSSException
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(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws CSSException
Creates a "one of" attribute condition- 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
AttributeCondition createBeginHyphenAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws CSSException
Creates a "begin hyphen" attribute condition- 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
AttributeCondition createClassCondition(java.lang.String namespaceURI, java.lang.String value) throws CSSException
Creates a class condition- 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 name of the class.- Returns:
- A class condition
- Throws:
CSSException
- if this exception is not supported.
-
createPseudoClassCondition
AttributeCondition createPseudoClassCondition(java.lang.String namespaceURI, java.lang.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
Condition createOnlyChildCondition() throws CSSException
Creates a "only one" child condition- Returns:
- A "only one" child condition
- Throws:
CSSException
- if this exception is not supported.
-
createOnlyTypeCondition
Condition createOnlyTypeCondition() throws CSSException
Creates a "only one" type condition- Returns:
- A "only one" type condition
- Throws:
CSSException
- if this exception is not supported.
-
createContentCondition
ContentCondition createContentCondition(java.lang.String data) throws CSSException
Creates a content condition- Parameters:
data
- the data in the content- Returns:
- A content condition
- Throws:
CSSException
- if this exception is not supported.
-
-