01: package com.rimfaxe.xml.xmlreader.xpath;
02:
03: /**
04: * Compare attribute to string.
05: *
06: <blockquote><small> Copyright (C) 2002 Hewlett-Packard Company.
07: This file is part of Sparta, an XML Parser, DOM, and XPath library.
08: This library is free software; you can redistribute it and/or
09: modify it under the terms of the <a href="doc-files/LGPL.txt">GNU
10: Lesser General Public License</a> as published by the Free Software
11: Foundation; either version 2.1 of the License, or (at your option)
12: any later version. This library is distributed in the hope that it
13: will be useful, but WITHOUT ANY WARRANTY; without even the implied
14: warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15: PURPOSE. </small></blockquote>
16: @version $Date: 2002/12/06 23:41:49 $ $Revision: 1.2 $
17: @author Eamonn O'Brien-Strain
18: */
19: public abstract class AttrCompareExpr extends AttrExpr {
20:
21: AttrCompareExpr(String attrName, String attrValue) {
22: super (attrName);
23: attrValue_ = attrValue;
24: }
25:
26: public String getAttrValue() {
27: return attrValue_;
28: }
29:
30: protected String toString(String op) {
31: return "[" + super .toString() + op + "\'" + attrValue_ + "\']";
32: }
33:
34: private final String attrValue_;
35:
36: }
37:
38: // $Log: AttrCompareExpr.java,v $
39: // Revision 1.2 2002/12/06 23:41:49 eobrain
40: // Add toString() which returns the original XPath.
41: //
42: // Revision 1.1 2002/10/30 16:16:52 eobrain
43: // initial
44: //
|