home *** CD-ROM | disk | FTP | other *** search
- package netscape.palomar.sgml;
-
- import netscape.palomar.util.CascadedException;
-
- public class SGMLTextImpl extends SGMLElementImpl implements SGMLText {
- protected SGMLParser _parser;
- protected String _unicodeValue;
-
- public void setParser(SGMLParser parser) {
- this._parser = parser;
- }
-
- public SGMLParser getParser() {
- return this._parser;
- }
-
- public String getUnicode() {
- if (this._unicodeValue == null) {
- this._unicodeValue = this._parser.unEscapeText(super._rawValue);
- }
-
- return this._unicodeValue;
- }
-
- public void setUnicode(String newUni) {
- this._unicodeValue = newUni;
- super._rawValue = null;
- }
-
- public String getRawValue() throws CascadedException {
- if (super._rawValue == null) {
- super._rawValue = this._parser.escapeText(this._unicodeValue);
- }
-
- return super._rawValue;
- }
-
- public void setRawValue(String newRaw) {
- super._rawValue = newRaw;
- this._unicodeValue = null;
- }
- }
-