com.steadystate.css.parser.selectors
public class ConditionFactoryImpl extends java.lang.Object implements ConditionFactory
Constructor and Description |
---|
ConditionFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
CombinatorCondition |
createAndCondition(Condition first,
Condition second)
Creates an and condition
|
AttributeCondition |
createAttributeCondition(java.lang.String localName,
java.lang.String namespaceURI,
boolean specified,
java.lang.String value)
Creates an attribute condition
|
AttributeCondition |
createBeginHyphenAttributeCondition(java.lang.String localName,
java.lang.String namespaceURI,
boolean specified,
java.lang.String value)
Creates a "begin hyphen" attribute condition
|
AttributeCondition |
createClassCondition(java.lang.String namespaceURI,
java.lang.String value)
Creates a class condition
|
ContentCondition |
createContentCondition(java.lang.String data)
Creates a content condition
|
AttributeCondition |
createIdCondition(java.lang.String value)
Creates an id condition
|
LangCondition |
createLangCondition(java.lang.String lang)
Creates a lang condition
|
NegativeCondition |
createNegativeCondition(Condition condition)
Creates a negative condition
|
AttributeCondition |
createOneOfAttributeCondition(java.lang.String localName,
java.lang.String namespaceURI,
boolean specified,
java.lang.String value)
Creates a "one of" attribute condition
|
Condition |
createOnlyChildCondition()
Creates a "only one" child condition
|
Condition |
createOnlyTypeCondition()
Creates a "only one" type condition
|
CombinatorCondition |
createOrCondition(Condition first,
Condition second)
Creates an or condition
|
PositionalCondition |
createPositionalCondition(int position,
boolean typeNode,
boolean type)
Creates a positional condition
|
AttributeCondition |
createPseudoClassCondition(java.lang.String namespaceURI,
java.lang.String value)
Creates a pseudo class condition
|
public CombinatorCondition createAndCondition(Condition first, Condition second) throws CSSException
ConditionFactory
createAndCondition
in interface ConditionFactory
first
- the first conditionsecond
- the second conditionCSSException
- if this exception is not supported.public CombinatorCondition createOrCondition(Condition first, Condition second) throws CSSException
ConditionFactory
createOrCondition
in interface ConditionFactory
first
- the first conditionsecond
- the second conditionCSSException
- if this exception is not supported.public NegativeCondition createNegativeCondition(Condition condition) throws CSSException
ConditionFactory
createNegativeCondition
in interface ConditionFactory
condition
- the conditionCSSException
- if this exception is not supported.public PositionalCondition createPositionalCondition(int position, boolean typeNode, boolean type) throws CSSException
ConditionFactory
createPositionalCondition
in interface ConditionFactory
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).CSSException
- if this exception is not supported.public AttributeCondition createAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws CSSException
ConditionFactory
createAttributeCondition
in interface ConditionFactory
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.CSSException
- if this exception is not supported.public AttributeCondition createIdCondition(java.lang.String value) throws CSSException
ConditionFactory
createIdCondition
in interface ConditionFactory
value
- the value of the id.CSSException
- if this exception is not supported.public LangCondition createLangCondition(java.lang.String lang) throws CSSException
ConditionFactory
createLangCondition
in interface ConditionFactory
CSSException
- if this exception is not supported.public AttributeCondition createOneOfAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws CSSException
ConditionFactory
createOneOfAttributeCondition
in interface ConditionFactory
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.CSSException
- if this exception is not supported.public AttributeCondition createBeginHyphenAttributeCondition(java.lang.String localName, java.lang.String namespaceURI, boolean specified, java.lang.String value) throws CSSException
ConditionFactory
createBeginHyphenAttributeCondition
in interface ConditionFactory
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.CSSException
- if this exception is not supported.public AttributeCondition createClassCondition(java.lang.String namespaceURI, java.lang.String value) throws CSSException
ConditionFactory
createClassCondition
in interface ConditionFactory
namespaceURI
- the namespace URI of the attributevalue
- the name of the class.CSSException
- if this exception is not supported.public AttributeCondition createPseudoClassCondition(java.lang.String namespaceURI, java.lang.String value) throws CSSException
ConditionFactory
createPseudoClassCondition
in interface ConditionFactory
namespaceURI
- the namespace URI of the attributevalue
- the name of the pseudo classCSSException
- if this exception is not supported.public Condition createOnlyChildCondition() throws CSSException
ConditionFactory
createOnlyChildCondition
in interface ConditionFactory
CSSException
- if this exception is not supported.public Condition createOnlyTypeCondition() throws CSSException
ConditionFactory
createOnlyTypeCondition
in interface ConditionFactory
CSSException
- if this exception is not supported.public ContentCondition createContentCondition(java.lang.String data) throws CSSException
ConditionFactory
createContentCondition
in interface ConditionFactory
data
- the data in the contentCSSException
- if this exception is not supported.