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 / SGMLElementImpl.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  1.5 KB  |  39 lines

  1. package netscape.palomar.sgml;
  2.  
  3. import java.io.DataOutputStream;
  4. import netscape.palomar.util.CascadedException;
  5. import netscape.palomar.util.TreeImpl;
  6.  
  7. public abstract class SGMLElementImpl extends TreeImpl implements SGMLElement {
  8.    protected String _rawValue;
  9.  
  10.    public String getTagType() {
  11.       return "";
  12.    }
  13.  
  14.    public String getRawValue() throws CascadedException {
  15.       return this._rawValue;
  16.    }
  17.  
  18.    public void setRawValue(String newValue) {
  19.       this._rawValue = newValue;
  20.    }
  21.  
  22.    public void writeYourself(DataOutputStream dos) throws CascadedException {
  23.       try {
  24.          dos.writeBytes(this.getRawValue());
  25.          int last = ((TreeImpl)this).numChildren();
  26.  
  27.          for(int i = 0; i < last; ++i) {
  28.             ((SGMLElement)((TreeImpl)this).childAt(i)).writeYourself(dos);
  29.          }
  30.  
  31.       } catch (Exception e) {
  32.          SGMLException ce = new SGMLException(214, e);
  33.          throw ce;
  34.       }
  35.    }
  36.  
  37.    public abstract SGMLParser getParser();
  38. }
  39.