File: ConditionFactory.java

package info (click to toggle)
sacjava 1.3%2Bdfsg-5.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 240 kB
  • sloc: java: 480; xml: 31; makefile: 11
file content (197 lines) | stat: -rw-r--r-- 6,675 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/*
 * Copyright (c) 1999 World Wide Web Consortium,
 * (Massachusetts Institute of Technology, Institut National de
 * Recherche en Informatique et en Automatique, Keio University). All
 * Rights Reserved. This program is distributed under the W3C's Software
 * Intellectual Property License. This program is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.
 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
 *
 * $Id: ConditionFactory.java,v 1.2 2000/02/15 02:07:34 plehegar Exp $
 */
package org.w3c.css.sac;

/**
 * @version $Revision: 1.2 $
 * @author  Philippe Le Hegaret
 */
public interface ConditionFactory {

    /**
     * Creates an and condition
     *
     * @param first the first condition
     * @param second the second condition
     * @return A combinator condition
     * @exception CSSException if this exception is not supported.
     */    
    CombinatorCondition createAndCondition(Condition first, Condition second)
	throws CSSException;

    /**
     * Creates an or condition
     *
     * @param first the first condition
     * @param second the second condition
     * @return A combinator condition
     * @exception CSSException if this exception is not supported.
     */    
    CombinatorCondition createOrCondition(Condition first, Condition second)
	throws CSSException;

    /**
     * Creates a negative condition
     *
     * @param condition the condition
     * @return A negative condition
     * @exception CSSException if this exception is not supported.
     */    
    NegativeCondition createNegativeCondition(Condition condition)
	throws CSSException;

    /**
     * Creates a positional condition
     *
     * @param position the position of the node in the list.
     * @param typeNode <code>true</code> if the list should contain
     *                 only nodes of the same type (element, text node, ...).
     * @param type <code>true</code> true if the list should contain
     *             only nodes of the same node (for element, same localName
     *             and same namespaceURI).
     * @return A positional condition
     * @exception CSSException if this exception is not supported.
     */    
    PositionalCondition createPositionalCondition(int position, 
						  boolean typeNode, 
						  boolean type)
	throws CSSException;
    
    /**
     * Creates an attribute condition
     *
     * @param localName the localName of the attribute
     * @param namespaceURI the namespace URI of the attribute
     * @param specified <code>true</code> if the attribute must be specified
     *                  in the document.
     * @param value the value of this attribute.
     * @return An attribute condition
     * @exception CSSException if this exception is not supported.
     */    
    AttributeCondition createAttributeCondition(String localName,
						String namespaceURI,
						boolean specified,
						String value)
	throws CSSException;

    /**
     * Creates an id condition
     *
     * @param value the value of the id.
     * @return An Id condition
     * @exception CSSException if this exception is not supported.
     */    
    AttributeCondition createIdCondition(String value)
	throws CSSException;

    /**
     * Creates a lang condition
     *
     * @param value the value of the language.
     * @return A lang condition
     * @exception CSSException if this exception is not supported.
     */    
    LangCondition createLangCondition(String lang)
	throws CSSException;

    /**
     * Creates a "one of" attribute condition
     *
     * @param localName the localName of the attribute
     * @param namespaceURI the namespace URI of the attribute
     * @param specified <code>true</code> if the attribute must be specified
     *                  in the document.
     * @param value the value of this attribute.
     * @return A "one of" attribute condition
     * @exception CSSException if this exception is not supported.
     */    
    AttributeCondition createOneOfAttributeCondition(String localName,
						     String namespaceURI,
						     boolean specified,
						     String value)
	throws CSSException;

    /**
     * Creates a "begin hyphen" attribute condition
     *
     * @param localName the localName of the attribute
     * @param namespaceURI the namespace URI of the attribute
     * @param specified <code>true</code> if the attribute must be specified
     *                  in the document.
     * @param value the value of this attribute.
     * @return A "begin hyphen" attribute condition
     * @exception CSSException if this exception is not supported.
     */    
    AttributeCondition createBeginHyphenAttributeCondition(String localName,
							   String namespaceURI,
							   boolean specified,
							   String value)
	throws CSSException;

    /**
     * Creates a class condition
     *
     * @param localName the localName of the attribute
     * @param namespaceURI the namespace URI of the attribute
     * @param specified <code>true</code> if the attribute must be specified
     *                  in the document.
     * @param value the name of the class.
     * @return A class condition
     * @exception CSSException if this exception is not supported.
     */    
    AttributeCondition createClassCondition(String namespaceURI,
					    String value)
	throws CSSException;

    /**
     * Creates a pseudo class condition
     *
     * @param namespaceURI the namespace URI of the attribute
     * @param value the name of the pseudo class
     * @return A pseudo class condition
     * @exception CSSException if this exception is not supported.
     */    
    AttributeCondition createPseudoClassCondition(String namespaceURI,
						  String value)
	throws CSSException;

    /**
     * Creates a "only one" child condition
     *
     * @return A "only one" child condition
     * @exception CSSException if this exception is not supported.
     */    
    Condition createOnlyChildCondition() throws CSSException;


    /**
     * Creates a "only one" type condition
     *
     * @return A "only one" type condition
     * @exception CSSException if this exception is not supported.
     */    
    Condition createOnlyTypeCondition() throws CSSException;

    /**
     * Creates a content condition
     *
     * @param data the data in the content
     * @return A content condition
     * @exception CSSException if this exception is not supported.
     */    
    ContentCondition createContentCondition(String data)
	throws CSSException;

    
}