001 /* 002 * Copyright (c) 2000 World Wide Web Consortium, 003 * (Massachusetts Institute of Technology, Institut National de 004 * Recherche en Informatique et en Automatique, Keio University). All 005 * Rights Reserved. This program is distributed under the W3C's Software 006 * Intellectual Property License. This program is distributed in the 007 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even 008 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 009 * PURPOSE. 010 * See W3C License http://www.w3.org/Consortium/Legal/ for more details. 011 * 012 * $Id: ClassConditionImpl.java,v 1.1.1.1 2006/04/23 14:51:57 taqua Exp $ 013 */ 014 package org.w3c.flute.parser.selectors; 015 016 import org.w3c.css.sac.AttributeCondition; 017 import org.w3c.css.sac.Condition; 018 019 /** 020 * @version $Revision: 1.1.1.1 $ 021 * @author Philippe Le Hegaret 022 */ 023 public class ClassConditionImpl implements AttributeCondition { 024 025 String value; 026 027 /** 028 * Creates a new AttributeConditionImpl 029 */ 030 public ClassConditionImpl(String value) { 031 this.value = value; 032 } 033 034 /** 035 * An integer indicating the type of <code>Condition</code>. 036 */ 037 public short getConditionType() { 038 return Condition.SAC_CLASS_CONDITION; 039 } 040 041 /** 042 * Returns the 043 * <a href="http://www.w3.org/TR/REC-xml-names/#dt-NSName">namespace 044 * URI</a> of this attribute condition. 045 * <p><code>NULL</code> if : 046 * <ul> 047 * <li>this attribute condition can match any namespace. 048 * <li>this attribute is an id attribute. 049 * </ul> 050 */ 051 public String getNamespaceURI() { 052 return null; 053 } 054 055 /** 056 * Returns the 057 * <a href="http://www.w3.org/TR/REC-xml-names/#NT-LocalPart">local part</a> 058 * of the 059 * <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">qualified 060 * name</a> of this attribute. 061 * <p><code>NULL</code> if : 062 * <ul> 063 * <li><p>this attribute condition can match any attribute. 064 * <li><p>this attribute is a class attribute. 065 * <li><p>this attribute is an id attribute. 066 * <li><p>this attribute is a pseudo-class attribute. 067 * </ul> 068 */ 069 public String getLocalName() { 070 return null; 071 } 072 073 /** 074 * Returns <code>true</code> if the attribute must have an explicit value 075 * in the original document, <code>false</code> otherwise. 076 */ 077 public boolean getSpecified() { 078 return false; 079 } 080 081 /** 082 * Returns the value of the attribute. 083 * If this attribute is a class or a pseudo class attribute, you'll get 084 * the class name (or psedo class name) without the '.' or ':'. 085 */ 086 public String getValue() { 087 return value; 088 } 089 } 090