1 30 31 package com.steadystate.css.parser.selectors; 32 33 import org.w3c.css.sac.*; 34 35 public class ConditionFactoryImpl implements ConditionFactory { 36 37 public CombinatorCondition createAndCondition( 38 Condition first, 39 Condition second) throws CSSException { 40 return new AndConditionImpl(first, second); 41 } 42 43 public CombinatorCondition createOrCondition( 44 Condition first, 45 Condition second) throws CSSException { 46 throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR); 47 } 48 49 public NegativeCondition createNegativeCondition(Condition condition) 50 throws CSSException { 51 throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR); 52 } 53 54 public PositionalCondition createPositionalCondition( 55 int position, 56 boolean typeNode, 57 boolean type) throws CSSException { 58 throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR); 59 } 60 61 public AttributeCondition createAttributeCondition( 62 String localName, 63 String namespaceURI, 64 boolean specified, 65 String value) throws CSSException { 66 return new AttributeConditionImpl(localName, value); 70 } 72 73 public AttributeCondition createIdCondition(String value) 74 throws CSSException { 75 return new IdConditionImpl(value); 76 } 77 78 public LangCondition createLangCondition(String lang) 79 throws CSSException { 80 return new LangConditionImpl(lang); 81 } 82 83 public AttributeCondition createOneOfAttributeCondition( 84 String localName, 85 String namespaceURI, 86 boolean specified, 87 String value) throws CSSException { 88 return new OneOfAttributeConditionImpl(localName, value); 92 } 94 95 public AttributeCondition createBeginHyphenAttributeCondition( 96 String localName, 97 String namespaceURI, 98 boolean specified, 99 String value) throws CSSException { 100 return new BeginHyphenAttributeConditionImpl(localName, value); 104 } 106 107 public AttributeCondition createClassCondition( 108 String namespaceURI, 109 String value) throws CSSException { 110 return new ClassConditionImpl(value); 111 } 112 113 public AttributeCondition createPseudoClassCondition( 114 String namespaceURI, 115 String value) throws CSSException { 116 return new PseudoClassConditionImpl(value); 117 } 118 119 public Condition createOnlyChildCondition() throws CSSException { 120 throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR); 121 } 122 123 public Condition createOnlyTypeCondition() throws CSSException { 124 throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR); 125 } 126 127 public ContentCondition createContentCondition(String data) 128 throws CSSException { 129 throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR); 130 } 131 } 132 | Popular Tags |