2
* Copyright (c) 1999 World Wide Web Consortium,
3
* (Massachusetts Institute of Technology, Institut National de
4
* Recherche en Informatique et en Automatique, Keio University). All
5
* Rights Reserved. This program is distributed under the W3C's Software
6
* Intellectual Property License. This program is distributed in the
7
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
12
* $Id: Condition.java,v 1.3 2005/03/27 08:58:37 cam Exp $
14
package org.w3c.css.sac;
17
* @version $Revision: 1.3 $
18
* @author Philippe Le Hegaret
20
public interface Condition {
23
* This condition checks exactly two conditions.
25
* <pre class="example">
28
* @see CombinatorCondition
30
public static final short SAC_AND_CONDITION = 0;
33
* This condition checks one of two conditions.
34
* @see CombinatorCondition
36
public static final short SAC_OR_CONDITION = 1;
39
* This condition checks that a condition can't be applied to a node.
40
* @see NegativeCondition
42
public static final short SAC_NEGATIVE_CONDITION = 2;
45
* This condition checks a specified position.
47
* <pre class="example">
50
* @see PositionalCondition
52
public static final short SAC_POSITIONAL_CONDITION = 3;
55
* This condition checks an attribute.
57
* <pre class="example">
61
* @see AttributeCondition
63
public static final short SAC_ATTRIBUTE_CONDITION = 4;
65
* This condition checks an id attribute.
67
* <pre class="example">
70
* @see AttributeCondition
72
public static final short SAC_ID_CONDITION = 5;
74
* This condition checks the language of the node.
76
* <pre class="example">
81
public static final short SAC_LANG_CONDITION = 6;
83
* This condition checks for a value in a space-separated values in a
84
* specified attribute.
86
* <pre class="example">
89
* @see AttributeCondition
91
public static final short SAC_ONE_OF_ATTRIBUTE_CONDITION = 7;
93
* This condition checks if the value is in a hypen-separated list of values
94
* in a specified attribute.
96
* <pre class="example">
99
* @see AttributeCondition
101
public static final short SAC_BEGIN_HYPHEN_ATTRIBUTE_CONDITION = 8;
103
* This condition checks for a specified class.
105
* <pre class="example">
108
* @see AttributeCondition
110
public static final short SAC_CLASS_CONDITION = 9;
112
* This condition checks for the link pseudo class.
114
* <pre class="example">
119
* @see AttributeCondition
121
public static final short SAC_PSEUDO_CLASS_CONDITION = 10;
123
* This condition checks if a node is the only one in the node list.
125
public static final short SAC_ONLY_CHILD_CONDITION = 11;
127
* This condition checks if a node is the only one of his type.
129
public static final short SAC_ONLY_TYPE_CONDITION = 12;
131
* This condition checks the content of a node.
132
* @see ContentCondition
134
public static final short SAC_CONTENT_CONDITION = 13;
137
* An integer indicating the type of <code>Condition</code>.
139
public short getConditionType();