Package org.w3c.flute.parser.selectors
Class ConditionFactoryImpl
- java.lang.Object
-
- org.w3c.flute.parser.selectors.ConditionFactoryImpl
-
- All Implemented Interfaces:
org.w3c.css.sac.ConditionFactory
public class ConditionFactoryImpl extends java.lang.Object implements org.w3c.css.sac.ConditionFactory
- Version:
- $Revision: 6653 $
- Author:
- Philippe Le Hegaret
-
-
Constructor Summary
Constructors Constructor Description ConditionFactoryImpl()
-
Method Summary
Modifier and Type Method Description org.w3c.css.sac.CombinatorCondition
createAndCondition(org.w3c.css.sac.Condition first, org.w3c.css.sac.Condition second)
Creates an and conditionorg.w3c.css.sac.AttributeCondition
createAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value)
creates an attribute conditionorg.w3c.css.sac.AttributeCondition
createBeginHyphenAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value)
Creates a "begin hyphen" attribute conditionorg.w3c.css.sac.AttributeCondition
createClassCondition(java.lang.String namespaceURI, java.lang.String value)
Creates a class conditionorg.w3c.css.sac.ContentCondition
createContentCondition(java.lang.String data)
Creates a content conditionorg.w3c.css.sac.AttributeCondition
createIdCondition(java.lang.String value)
Creates an id conditionorg.w3c.css.sac.LangCondition
createLangCondition(java.lang.String lang)
Creates a lang conditionorg.w3c.css.sac.NegativeCondition
createNegativeCondition(org.w3c.css.sac.Condition condition)
Creates a negative conditionorg.w3c.css.sac.AttributeCondition
createOneOfAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value)
Creates a "one of" attribute conditionorg.w3c.css.sac.Condition
createOnlyChildCondition()
Creates a "only one" child conditionorg.w3c.css.sac.Condition
createOnlyTypeCondition()
Creates a "only one" type conditionorg.w3c.css.sac.CombinatorCondition
createOrCondition(org.w3c.css.sac.Condition first, org.w3c.css.sac.Condition second)
Creates an or conditionorg.w3c.css.sac.PositionalCondition
createPositionalCondition(int position, boolean typeNode, boolean type)
Creates a positional conditionorg.w3c.css.sac.AttributeCondition
createPseudoClassCondition(java.lang.String namespaceURI, java.lang.String value)
Creates a pseudo class condition
-
-
-
Method Detail
-
createAndCondition
public org.w3c.css.sac.CombinatorCondition createAndCondition(org.w3c.css.sac.Condition first, org.w3c.css.sac.Condition second) throws org.w3c.css.sac.CSSException
Creates an and condition- Specified by:
createAndCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Parameters:
first
- the first conditionsecond
- the second condition- Returns:
- A combinator condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createOrCondition
public org.w3c.css.sac.CombinatorCondition createOrCondition(org.w3c.css.sac.Condition first, org.w3c.css.sac.Condition second) throws org.w3c.css.sac.CSSException
Creates an or condition- Specified by:
createOrCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Parameters:
first
- the first conditionsecond
- the second condition- Returns:
- A combinator condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createNegativeCondition
public org.w3c.css.sac.NegativeCondition createNegativeCondition(org.w3c.css.sac.Condition condition) throws org.w3c.css.sac.CSSException
Creates a negative condition- Specified by:
createNegativeCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Parameters:
condition
- the condition- Returns:
- A negative condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createPositionalCondition
public org.w3c.css.sac.PositionalCondition createPositionalCondition(int position, boolean typeNode, boolean type) throws org.w3c.css.sac.CSSException
Creates a positional condition- Specified by:
createPositionalCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- 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:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createAttributeCondition
public org.w3c.css.sac.AttributeCondition createAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws org.w3c.css.sac.CSSException
creates an attribute condition- Specified by:
createAttributeCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- 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:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createIdCondition
public org.w3c.css.sac.AttributeCondition createIdCondition(java.lang.String value) throws org.w3c.css.sac.CSSException
Creates an id condition- Specified by:
createIdCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Parameters:
value
- the value of the id.- Returns:
- An Id condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createLangCondition
public org.w3c.css.sac.LangCondition createLangCondition(java.lang.String lang) throws org.w3c.css.sac.CSSException
Creates a lang condition- Specified by:
createLangCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Parameters:
value
- the value of the language.- Returns:
- A lang condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createOneOfAttributeCondition
public org.w3c.css.sac.AttributeCondition createOneOfAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws org.w3c.css.sac.CSSException
Creates a "one of" attribute condition- Specified by:
createOneOfAttributeCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- 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:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createBeginHyphenAttributeCondition
public org.w3c.css.sac.AttributeCondition createBeginHyphenAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws org.w3c.css.sac.CSSException
Creates a "begin hyphen" attribute condition- Specified by:
createBeginHyphenAttributeCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- 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:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createClassCondition
public org.w3c.css.sac.AttributeCondition createClassCondition(java.lang.String namespaceURI, java.lang.String value) throws org.w3c.css.sac.CSSException
Creates a class condition- Specified by:
createClassCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- 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:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createPseudoClassCondition
public org.w3c.css.sac.AttributeCondition createPseudoClassCondition(java.lang.String namespaceURI, java.lang.String value) throws org.w3c.css.sac.CSSException
Creates a pseudo class condition- Specified by:
createPseudoClassCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Parameters:
namespaceURI
- the namespace URI of the attributevalue
- the name of the pseudo class- Returns:
- A pseudo class condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createOnlyChildCondition
public org.w3c.css.sac.Condition createOnlyChildCondition() throws org.w3c.css.sac.CSSException
Creates a "only one" child condition- Specified by:
createOnlyChildCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Returns:
- A "only one" child condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createOnlyTypeCondition
public org.w3c.css.sac.Condition createOnlyTypeCondition() throws org.w3c.css.sac.CSSException
Creates a "only one" type condition- Specified by:
createOnlyTypeCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Returns:
- A "only one" type condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
createContentCondition
public org.w3c.css.sac.ContentCondition createContentCondition(java.lang.String data) throws org.w3c.css.sac.CSSException
Creates a content condition- Specified by:
createContentCondition
in interfaceorg.w3c.css.sac.ConditionFactory
- Parameters:
data
- the data in the content- Returns:
- A content condition
- Throws:
org.w3c.css.sac.CSSException
- if this exception is not supported.
-
-