home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / xml4j.jar / com / ibm / xml / framework / ParserState.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-08-30  |  3.9 KB  |  156 lines

  1. package com.ibm.xml.framework;
  2.  
  3. import com.ibm.xml.internal.DefaultAttrPool;
  4. import com.ibm.xml.internal.DefaultElementDeclPool;
  5. import com.ibm.xml.internal.DefaultEntityPool;
  6. import com.ibm.xml.internal.DefaultStringPool;
  7.  
  8. public final class ParserState {
  9.    private static final boolean USE_CHAR_READER_FOR_UTF8 = true;
  10.    private XMLParser fParser;
  11.    private StringPool fStringPool;
  12.    private AttrPool fAttrPool;
  13.    private EntityPool fEntityPool;
  14.    private EntityPool fParameterEntityPool;
  15.    private ElementDeclPool fElementDeclPool;
  16.  
  17.    ParserState(XMLParser var1) {
  18.       this.fParser = var1;
  19.    }
  20.  
  21.    ParserState(ParserState var1) {
  22.       this.fParser = var1.fParser;
  23.       this.fStringPool = var1.fStringPool.resetOrCopy(this);
  24.       this.fAttrPool = var1.fAttrPool.resetOrCopy(this);
  25.       this.fEntityPool = var1.fEntityPool.resetOrCopy(this);
  26.       if (var1.fParameterEntityPool != null) {
  27.          this.fParameterEntityPool = var1.fParameterEntityPool.resetOrCopy(this);
  28.       }
  29.  
  30.       this.fElementDeclPool = var1.fElementDeclPool.resetOrCopy(this);
  31.    }
  32.  
  33.    void reset() {
  34.       this.fStringPool.reset(this);
  35.       this.fAttrPool.reset(this);
  36.       this.fEntityPool.reset(this);
  37.       if (this.fParameterEntityPool != null) {
  38.          this.fParameterEntityPool.reset(this);
  39.       }
  40.  
  41.       this.fElementDeclPool.reset(this);
  42.    }
  43.  
  44.    ParserState resetOrCopy() {
  45.       return new ParserState(this);
  46.    }
  47.  
  48.    public XMLScanner getScanner() {
  49.       return this.fParser.getScanner();
  50.    }
  51.  
  52.    public boolean getAllowJavaEncodingName() {
  53.       return this.fParser.getAllowJavaEncodingName();
  54.    }
  55.  
  56.    public boolean getWarningOnDuplicateAttDef() {
  57.       return this.fParser.getWarningOnDuplicateAttDef();
  58.    }
  59.  
  60.    public boolean getCheckNamespace() {
  61.       return this.fParser.getCheckNamespace();
  62.    }
  63.  
  64.    public boolean getUseCharReaderForUTF8() {
  65.       return true;
  66.    }
  67.  
  68.    public XMLDocumentHandler getDocumentHandler() {
  69.       return this.fParser.getDocumentHandler();
  70.    }
  71.  
  72.    public XMLDocumentTypeHandler getDocumentTypeHandler() {
  73.       return this.fParser.getDocumentTypeHandler();
  74.    }
  75.  
  76.    public XMLEntityHandler getEntityHandler() {
  77.       return this.fParser.getEntityHandler();
  78.    }
  79.  
  80.    public XMLErrorHandler getErrorHandler() {
  81.       return this.fParser.getErrorHandler();
  82.    }
  83.  
  84.    public XMLValidationHandler getValidationHandler() {
  85.       return this.fParser.getValidationHandler();
  86.    }
  87.  
  88.    public StringPool cacheStringPool() {
  89.       return this.fStringPool;
  90.    }
  91.  
  92.    public StringPool getStringPool() {
  93.       return this.fStringPool;
  94.    }
  95.  
  96.    public void setStringPool(StringPool var1) {
  97.       this.fStringPool = var1;
  98.    }
  99.  
  100.    public void useDefaultStringPool() {
  101.       this.fStringPool = new DefaultStringPool(this);
  102.    }
  103.  
  104.    public AttrPool cacheAttrPool() {
  105.       return this.fAttrPool;
  106.    }
  107.  
  108.    public AttrPool getAttrPool() {
  109.       return this.fAttrPool;
  110.    }
  111.  
  112.    public void setAttrPool(AttrPool var1) {
  113.       this.fAttrPool = var1;
  114.    }
  115.  
  116.    public void useDefaultAttrPool() {
  117.       this.fAttrPool = new DefaultAttrPool(this);
  118.    }
  119.  
  120.    public EntityPool getEntityPool() {
  121.       return this.fEntityPool;
  122.    }
  123.  
  124.    public void setEntityPool(EntityPool var1) {
  125.       this.fEntityPool = var1;
  126.    }
  127.  
  128.    public void useDefaultEntityPool() {
  129.       this.fEntityPool = new DefaultEntityPool(this, true);
  130.    }
  131.  
  132.    public EntityPool getParameterEntityPool() {
  133.       return this.fParameterEntityPool;
  134.    }
  135.  
  136.    public void setParameterEntityPool(EntityPool var1) {
  137.       this.fParameterEntityPool = var1;
  138.    }
  139.  
  140.    public ElementDeclPool cacheElementDeclPool() {
  141.       return this.fElementDeclPool;
  142.    }
  143.  
  144.    public ElementDeclPool getElementDeclPool() {
  145.       return this.fElementDeclPool;
  146.    }
  147.  
  148.    public void setElementDeclPool(ElementDeclPool var1) {
  149.       this.fElementDeclPool = var1;
  150.    }
  151.  
  152.    public void useDefaultElementDeclPool() {
  153.       this.fElementDeclPool = new DefaultElementDeclPool(this);
  154.    }
  155. }
  156.