KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > flute > parser > selectors > IdConditionImpl


1 /*
2  * Copyright (c) 2000 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
9  * PURPOSE.
10  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11  *
12  * $Id: IdConditionImpl.java,v 1.1.1.1 2006/04/23 14:51:57 taqua Exp $
13  */

14 package org.w3c.flute.parser.selectors;
15
16 import org.w3c.css.sac.AttributeCondition;
17 import org.w3c.css.sac.Condition;
18
19 /**
20  * @version $Revision: 1.1.1.1 $
21  * @author Philippe Le Hegaret
22  */

23 public class IdConditionImpl implements AttributeCondition {
24
25     String JavaDoc value;
26     
27     /**
28      * Creates a new AttributeConditionImpl
29      */

30     public IdConditionImpl(String JavaDoc value) {
31     this.value = value;
32     }
33     
34     /**
35      * An integer indicating the type of <code>Condition</code>.
36      */

37     public short getConditionType() {
38     return Condition.SAC_ID_CONDITION;
39     }
40
41     /**
42      * Returns the
43      * <a HREF="http://www.w3.org/TR/REC-xml-names/#dt-NSName">namespace
44      * URI</a> of this attribute condition.
45      * <p><code>NULL</code> if :
46      * <ul>
47      * <li>this attribute condition can match any namespace.
48      * <li>this attribute is an id attribute.
49      * </ul>
50      */

51     public String JavaDoc getNamespaceURI() {
52     return null;
53     }
54
55     /**
56      * Returns the
57      * <a HREF="http://www.w3.org/TR/REC-xml-names/#NT-LocalPart">local part</a>
58      * of the
59      * <a HREF="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">qualified
60      * name</a> of this attribute.
61      * <p><code>NULL</code> if :
62      * <ul>
63      * <li><p>this attribute condition can match any attribute.
64      * <li><p>this attribute is a class attribute.
65      * <li><p>this attribute is an id attribute.
66      * <li><p>this attribute is a pseudo-class attribute.
67      * </ul>
68      */

69     public String JavaDoc getLocalName() {
70     return null;
71     }
72
73     /**
74      * Returns <code>true</code> if the attribute must have an explicit value
75      * in the original document, <code>false</code> otherwise.
76      */

77     public boolean getSpecified() {
78     return false;
79     }
80
81     /**
82      * Returns the value of the attribute.
83      * If this attribute is a class or a pseudo class attribute, you'll get
84      * the class name (or psedo class name) without the '.' or ':'.
85      */

86     public String JavaDoc getValue() {
87     return value;
88     }
89 }
90
91
Popular Tags