home *** CD-ROM | disk | FTP | other *** search
/ Popular Software (Premium Edition) / mycd.iso / INTERNET / NETSCAP4.06 / CP32E406.EXE / netcast.z / ncjava10.jar / netscape / palomar / sgml / SGMLTextImpl.class (.txt) < prev   
Encoding:
Java Class File  |  1998-02-26  |  1.4 KB  |  43 lines

  1. package netscape.palomar.sgml;
  2.  
  3. import netscape.palomar.util.CascadedException;
  4.  
  5. public class SGMLTextImpl extends SGMLElementImpl implements SGMLText {
  6.    protected SGMLParser _parser;
  7.    protected String _unicodeValue;
  8.  
  9.    public void setParser(SGMLParser parser) {
  10.       this._parser = parser;
  11.    }
  12.  
  13.    public SGMLParser getParser() {
  14.       return this._parser;
  15.    }
  16.  
  17.    public String getUnicode() {
  18.       if (this._unicodeValue == null) {
  19.          this._unicodeValue = this._parser.unEscapeText(super._rawValue);
  20.       }
  21.  
  22.       return this._unicodeValue;
  23.    }
  24.  
  25.    public void setUnicode(String newUni) {
  26.       this._unicodeValue = newUni;
  27.       super._rawValue = null;
  28.    }
  29.  
  30.    public String getRawValue() throws CascadedException {
  31.       if (super._rawValue == null) {
  32.          super._rawValue = this._parser.escapeText(this._unicodeValue);
  33.       }
  34.  
  35.       return super._rawValue;
  36.    }
  37.  
  38.    public void setRawValue(String newRaw) {
  39.       super._rawValue = newRaw;
  40.       this._unicodeValue = null;
  41.    }
  42. }
  43.