Java Code Examples for com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer

The following examples show how to use com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jdk8u60   Source File: XMLDTDScannerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void init() {
    // reset state related data
    fStartDTDCalled = false;
    fExtEntityDepth = 0;
    fIncludeSectDepth = 0;
    fMarkUpDepth = 0;
    fPEDepth = 0;

    fStandalone = false;
    fSeenExternalDTD = false;
    fSeenExternalPE = false;

    // set starting state
    setScannerState(SCANNER_STATE_TEXT_DECL);
    //new SymbolTable());

    fLimitAnalyzer = new XMLLimitAnalyzer();
}
 
Example 2
void resetCommon() {
    // initialize vars
    fMarkupDepth = 0;
    fCurrentElement = null;
    fElementStack.clear();
    fHasExternalDTD = false;
    fStandaloneSet = false;
    fStandalone = false;
    fInScanContent = false;
    //skipping algorithm
    fShouldSkip = false;
    fAdd = false;
    fSkip = false;

    fEntityStore = fEntityManager.getEntityStore();
    dtdGrammarUtil = null;

    if (fSecurityManager != null) {
        fElementAttributeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT);
    } else {
        fElementAttributeLimit = 0;
    }
    fLimitAnalyzer = new XMLLimitAnalyzer();
    fEntityManager.setLimitAnalyzer(fLimitAnalyzer);
}
 
Example 3
private void init() {
    // reset state related data
    fStartDTDCalled = false;
    fExtEntityDepth = 0;
    fIncludeSectDepth = 0;
    fMarkUpDepth = 0;
    fPEDepth = 0;

    fStandalone = false;
    fSeenExternalDTD = false;
    fSeenExternalPE = false;

    // set starting state
    setScannerState(SCANNER_STATE_TEXT_DECL);
    //new SymbolTable());

    fLimitAnalyzer = new XMLLimitAnalyzer();
}
 
Example 4
void resetCommon() {
    // initialize vars
    fMarkupDepth = 0;
    fCurrentElement = null;
    fElementStack.clear();
    fHasExternalDTD = false;
    fStandaloneSet = false;
    fStandalone = false;
    fInScanContent = false;
    //skipping algorithm
    fShouldSkip = false;
    fAdd = false;
    fSkip = false;

    fEntityStore = fEntityManager.getEntityStore();
    dtdGrammarUtil = null;

    if (fSecurityManager != null) {
        fElementAttributeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT);
    } else {
        fElementAttributeLimit = 0;
    }
    fLimitAnalyzer = new XMLLimitAnalyzer();
    fEntityManager.setLimitAnalyzer(fLimitAnalyzer);
}
 
Example 5
Source Project: openjdk-8   Source File: XMLDTDScannerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void init() {
    // reset state related data
    fStartDTDCalled = false;
    fExtEntityDepth = 0;
    fIncludeSectDepth = 0;
    fMarkUpDepth = 0;
    fPEDepth = 0;

    fStandalone = false;
    fSeenExternalDTD = false;
    fSeenExternalPE = false;

    // set starting state
    setScannerState(SCANNER_STATE_TEXT_DECL);
    //new SymbolTable());

    fLimitAnalyzer = new XMLLimitAnalyzer();
}
 
Example 6
void resetCommon() {
    // initialize vars
    fMarkupDepth = 0;
    fCurrentElement = null;
    fElementStack.clear();
    fHasExternalDTD = false;
    fStandaloneSet = false;
    fStandalone = false;
    fInScanContent = false;
    //skipping algorithm
    fShouldSkip = false;
    fAdd = false;
    fSkip = false;

    fEntityStore = fEntityManager.getEntityStore();
    dtdGrammarUtil = null;

    if (fSecurityManager != null) {
        fElementAttributeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT);
    } else {
        fElementAttributeLimit = 0;
    }
    fLimitAnalyzer = new XMLLimitAnalyzer();
    fEntityManager.setLimitAnalyzer(fLimitAnalyzer);
}
 
Example 7
Source Project: jdk1.8-source-analysis   Source File: XMLEntityManager.java    License: Apache License 2.0 5 votes vote down vote up
public void reset(PropertyManager propertyManager){
    // xerces properties
    fSymbolTable = (SymbolTable)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
    fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
    try {
        fStaxEntityResolver = (StaxEntityResolverWrapper)propertyManager.getProperty(STAX_ENTITY_RESOLVER);
    } catch (XMLConfigurationException e) {
        fStaxEntityResolver = null;
    }

    fSupportDTD = ((Boolean)propertyManager.getProperty(XMLInputFactory.SUPPORT_DTD)).booleanValue();
    fReplaceEntityReferences = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)).booleanValue();
    fSupportExternalEntities = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)).booleanValue();

    // Zephyr feature ignore-external-dtd is the opposite of Xerces' load-external-dtd
    fLoadExternalDTD = !((Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD)).booleanValue();

    // JAXP 1.5 feature
    XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
    fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);

    fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);

    fLimitAnalyzer = new XMLLimitAnalyzer();
    //reset fEntityStorage
    fEntityStorage.reset(propertyManager);
    //reset XMLEntityReaderImpl
    fEntityScanner.reset(propertyManager);

    // initialize state
    //fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fCurrentEntity = null;
    fValidation = false;
    fExternalGeneralEntities = true;
    fExternalParameterEntities = true;
    fAllowJavaEncodings = true ;
}
 
Example 8
public void reset(PropertyManager propertyManager){
    // xerces properties
    fSymbolTable = (SymbolTable)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
    fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
    try {
        fStaxEntityResolver = (StaxEntityResolverWrapper)propertyManager.getProperty(STAX_ENTITY_RESOLVER);
    } catch (XMLConfigurationException e) {
        fStaxEntityResolver = null;
    }

    fSupportDTD = ((Boolean)propertyManager.getProperty(XMLInputFactory.SUPPORT_DTD)).booleanValue();
    fReplaceEntityReferences = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)).booleanValue();
    fSupportExternalEntities = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)).booleanValue();

    // Zephyr feature ignore-external-dtd is the opposite of Xerces' load-external-dtd
    fLoadExternalDTD = !((Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD)).booleanValue();

    // JAXP 1.5 feature
    XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
    fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);

    fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);

    fLimitAnalyzer = new XMLLimitAnalyzer();
    //reset fEntityStorage
    fEntityStorage.reset(propertyManager);
    //reset XMLEntityReaderImpl
    fEntityScanner.reset(propertyManager);

    // initialize state
    //fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fCurrentEntity = null;
    fValidation = false;
    fExternalGeneralEntities = true;
    fExternalParameterEntities = true;
    fAllowJavaEncodings = true ;
}
 
Example 9
Source Project: JDKSourceCode1.8   Source File: XMLEntityManager.java    License: MIT License 5 votes vote down vote up
public void reset(PropertyManager propertyManager){
    // xerces properties
    fSymbolTable = (SymbolTable)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
    fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
    try {
        fStaxEntityResolver = (StaxEntityResolverWrapper)propertyManager.getProperty(STAX_ENTITY_RESOLVER);
    } catch (XMLConfigurationException e) {
        fStaxEntityResolver = null;
    }

    fSupportDTD = ((Boolean)propertyManager.getProperty(XMLInputFactory.SUPPORT_DTD)).booleanValue();
    fReplaceEntityReferences = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)).booleanValue();
    fSupportExternalEntities = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)).booleanValue();

    // Zephyr feature ignore-external-dtd is the opposite of Xerces' load-external-dtd
    fLoadExternalDTD = !((Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD)).booleanValue();

    // JAXP 1.5 feature
    XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
    fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);

    fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);

    fLimitAnalyzer = new XMLLimitAnalyzer();
    //reset fEntityStorage
    fEntityStorage.reset(propertyManager);
    //reset XMLEntityReaderImpl
    fEntityScanner.reset(propertyManager);

    // initialize state
    //fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fCurrentEntity = null;
    fValidation = false;
    fExternalGeneralEntities = true;
    fExternalParameterEntities = true;
    fAllowJavaEncodings = true ;
}
 
Example 10
public void reset(PropertyManager propertyManager){
    // xerces properties
    fSymbolTable = (SymbolTable)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
    fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
    try {
        fStaxEntityResolver = (StaxEntityResolverWrapper)propertyManager.getProperty(STAX_ENTITY_RESOLVER);
    } catch (XMLConfigurationException e) {
        fStaxEntityResolver = null;
    }

    fSupportDTD = ((Boolean)propertyManager.getProperty(XMLInputFactory.SUPPORT_DTD)).booleanValue();
    fReplaceEntityReferences = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)).booleanValue();
    fSupportExternalEntities = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)).booleanValue();

    // Zephyr feature ignore-external-dtd is the opposite of Xerces' load-external-dtd
    fLoadExternalDTD = !((Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD)).booleanValue();

    // JAXP 1.5 feature
    XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
    fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);

    fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);

    fLimitAnalyzer = new XMLLimitAnalyzer();
    //reset fEntityStorage
    fEntityStorage.reset(propertyManager);
    //reset XMLEntityReaderImpl
    fEntityScanner.reset(propertyManager);

    // initialize state
    //fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fCurrentEntity = null;
    fValidation = false;
    fExternalGeneralEntities = true;
    fExternalParameterEntities = true;
    fAllowJavaEncodings = true ;
}
 
Example 11
public void reset(PropertyManager propertyManager){
    // xerces properties
    fSymbolTable = (SymbolTable)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
    fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
    try {
        fStaxEntityResolver = (StaxEntityResolverWrapper)propertyManager.getProperty(STAX_ENTITY_RESOLVER);
    } catch (XMLConfigurationException e) {
        fStaxEntityResolver = null;
    }

    fSupportDTD = ((Boolean)propertyManager.getProperty(XMLInputFactory.SUPPORT_DTD)).booleanValue();
    fReplaceEntityReferences = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)).booleanValue();
    fSupportExternalEntities = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)).booleanValue();

    // Zephyr feature ignore-external-dtd is the opposite of Xerces' load-external-dtd
    fLoadExternalDTD = !((Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD)).booleanValue();

    // JAXP 1.5 feature
    XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
    fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);

    fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);

    fLimitAnalyzer = new XMLLimitAnalyzer();
    //reset fEntityStorage
    fEntityStorage.reset(propertyManager);
    //reset XMLEntityReaderImpl
    fEntityScanner.reset(propertyManager);

    // initialize state
    //fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fCurrentEntity = null;
    fValidation = false;
    fExternalGeneralEntities = true;
    fExternalParameterEntities = true;
    fAllowJavaEncodings = true ;
}
 
Example 12
Source Project: hottub   Source File: XMLEntityManager.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void reset(PropertyManager propertyManager){
    // xerces properties
    fSymbolTable = (SymbolTable)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
    fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
    try {
        fStaxEntityResolver = (StaxEntityResolverWrapper)propertyManager.getProperty(STAX_ENTITY_RESOLVER);
    } catch (XMLConfigurationException e) {
        fStaxEntityResolver = null;
    }

    fSupportDTD = ((Boolean)propertyManager.getProperty(XMLInputFactory.SUPPORT_DTD)).booleanValue();
    fReplaceEntityReferences = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)).booleanValue();
    fSupportExternalEntities = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)).booleanValue();

    // Zephyr feature ignore-external-dtd is the opposite of Xerces' load-external-dtd
    fLoadExternalDTD = !((Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD)).booleanValue();

    // JAXP 1.5 feature
    XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
    fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);

    fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);

    fLimitAnalyzer = new XMLLimitAnalyzer();
    //reset fEntityStorage
    fEntityStorage.reset(propertyManager);
    //reset XMLEntityReaderImpl
    fEntityScanner.reset(propertyManager);

    // initialize state
    //fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fCurrentEntity = null;
    fValidation = false;
    fExternalGeneralEntities = true;
    fExternalParameterEntities = true;
    fAllowJavaEncodings = true ;
}
 
Example 13
Source Project: jdk1.8-source-analysis   Source File: XMLDTDScannerImpl.java    License: Apache License 2.0 4 votes vote down vote up
public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) {
    fLimitAnalyzer = limitAnalyzer;
}
 
Example 14
Source Project: jdk1.8-source-analysis   Source File: XMLEntityManager.java    License: Apache License 2.0 4 votes vote down vote up
public void reset() {
    fLimitAnalyzer = new XMLLimitAnalyzer();
    // initialize state
    fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fEntityExpansionCount = 0;

    fCurrentEntity = null;
    // reset scanner
    if(fXML10EntityScanner != null){
        fXML10EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }
    if(fXML11EntityScanner != null) {
        fXML11EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }

    // DEBUG
    if (DEBUG_ENTITIES) {
        addInternalEntity("text", "Hello, World.");
        addInternalEntity("empty-element", "<foo/>");
        addInternalEntity("balanced-element", "<foo></foo>");
        addInternalEntity("balanced-element-with-text", "<foo>Hello, World</foo>");
        addInternalEntity("balanced-element-with-entity", "<foo>&text;</foo>");
        addInternalEntity("unbalanced-entity", "<foo>");
        addInternalEntity("recursive-entity", "<foo>&recursive-entity2;</foo>");
        addInternalEntity("recursive-entity2", "<bar>&recursive-entity3;</bar>");
        addInternalEntity("recursive-entity3", "<baz>&recursive-entity;</baz>");
        try {
            addExternalEntity("external-text", null, "external-text.ent", "test/external-text.xml");
            addExternalEntity("external-balanced-element", null, "external-balanced-element.ent", "test/external-balanced-element.xml");
            addExternalEntity("one", null, "ent/one.ent", "test/external-entity.xml");
            addExternalEntity("two", null, "ent/two.ent", "test/ent/one.xml");
        }
        catch (IOException ex) {
            // should never happen
        }
    }

    fEntityHandler = null;

    // reset scanner
    //if(fEntityScanner!=null)
      //  fEntityScanner.reset(fSymbolTable, this,fErrorReporter);

}
 
Example 15
Source Project: jdk1.8-source-analysis   Source File: XMLEntityManager.java    License: Apache License 2.0 4 votes vote down vote up
public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) {
    this.fLimitAnalyzer = fLimitAnalyzer;
}
 
Example 16
public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) {
    fLimitAnalyzer = limitAnalyzer;
}
 
Example 17
public void reset() {
    fLimitAnalyzer = new XMLLimitAnalyzer();
    // initialize state
    fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fEntityExpansionCount = 0;

    fCurrentEntity = null;
    // reset scanner
    if(fXML10EntityScanner != null){
        fXML10EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }
    if(fXML11EntityScanner != null) {
        fXML11EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }

    // DEBUG
    if (DEBUG_ENTITIES) {
        addInternalEntity("text", "Hello, World.");
        addInternalEntity("empty-element", "<foo/>");
        addInternalEntity("balanced-element", "<foo></foo>");
        addInternalEntity("balanced-element-with-text", "<foo>Hello, World</foo>");
        addInternalEntity("balanced-element-with-entity", "<foo>&text;</foo>");
        addInternalEntity("unbalanced-entity", "<foo>");
        addInternalEntity("recursive-entity", "<foo>&recursive-entity2;</foo>");
        addInternalEntity("recursive-entity2", "<bar>&recursive-entity3;</bar>");
        addInternalEntity("recursive-entity3", "<baz>&recursive-entity;</baz>");
        try {
            addExternalEntity("external-text", null, "external-text.ent", "test/external-text.xml");
            addExternalEntity("external-balanced-element", null, "external-balanced-element.ent", "test/external-balanced-element.xml");
            addExternalEntity("one", null, "ent/one.ent", "test/external-entity.xml");
            addExternalEntity("two", null, "ent/two.ent", "test/ent/one.xml");
        }
        catch (IOException ex) {
            // should never happen
        }
    }

    fEntityHandler = null;

    // reset scanner
    //if(fEntityScanner!=null)
      //  fEntityScanner.reset(fSymbolTable, this,fErrorReporter);

}
 
Example 18
public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) {
    this.fLimitAnalyzer = fLimitAnalyzer;
}
 
Example 19
Source Project: jdk8u60   Source File: XMLDTDScannerImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) {
    fLimitAnalyzer = limitAnalyzer;
}
 
Example 20
Source Project: jdk8u60   Source File: XMLEntityManager.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) {
    this.fLimitAnalyzer = fLimitAnalyzer;
}
 
Example 21
Source Project: JDKSourceCode1.8   Source File: XMLDTDScannerImpl.java    License: MIT License 4 votes vote down vote up
public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) {
    fLimitAnalyzer = limitAnalyzer;
}
 
Example 22
Source Project: JDKSourceCode1.8   Source File: XMLEntityManager.java    License: MIT License 4 votes vote down vote up
public void reset() {
    fLimitAnalyzer = new XMLLimitAnalyzer();
    // initialize state
    fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fEntityExpansionCount = 0;

    fCurrentEntity = null;
    // reset scanner
    if(fXML10EntityScanner != null){
        fXML10EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }
    if(fXML11EntityScanner != null) {
        fXML11EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }

    // DEBUG
    if (DEBUG_ENTITIES) {
        addInternalEntity("text", "Hello, World.");
        addInternalEntity("empty-element", "<foo/>");
        addInternalEntity("balanced-element", "<foo></foo>");
        addInternalEntity("balanced-element-with-text", "<foo>Hello, World</foo>");
        addInternalEntity("balanced-element-with-entity", "<foo>&text;</foo>");
        addInternalEntity("unbalanced-entity", "<foo>");
        addInternalEntity("recursive-entity", "<foo>&recursive-entity2;</foo>");
        addInternalEntity("recursive-entity2", "<bar>&recursive-entity3;</bar>");
        addInternalEntity("recursive-entity3", "<baz>&recursive-entity;</baz>");
        try {
            addExternalEntity("external-text", null, "external-text.ent", "test/external-text.xml");
            addExternalEntity("external-balanced-element", null, "external-balanced-element.ent", "test/external-balanced-element.xml");
            addExternalEntity("one", null, "ent/one.ent", "test/external-entity.xml");
            addExternalEntity("two", null, "ent/two.ent", "test/ent/one.xml");
        }
        catch (IOException ex) {
            // should never happen
        }
    }

    fEntityHandler = null;

    // reset scanner
    //if(fEntityScanner!=null)
      //  fEntityScanner.reset(fSymbolTable, this,fErrorReporter);

}
 
Example 23
Source Project: JDKSourceCode1.8   Source File: XMLEntityManager.java    License: MIT License 4 votes vote down vote up
public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) {
    this.fLimitAnalyzer = fLimitAnalyzer;
}
 
Example 24
public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) {
    fLimitAnalyzer = limitAnalyzer;
}
 
Example 25
public void reset() {
    fLimitAnalyzer = new XMLLimitAnalyzer();
    // initialize state
    fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fEntityExpansionCount = 0;

    fCurrentEntity = null;
    // reset scanner
    if(fXML10EntityScanner != null){
        fXML10EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }
    if(fXML11EntityScanner != null) {
        fXML11EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }

    // DEBUG
    if (DEBUG_ENTITIES) {
        addInternalEntity("text", "Hello, World.");
        addInternalEntity("empty-element", "<foo/>");
        addInternalEntity("balanced-element", "<foo></foo>");
        addInternalEntity("balanced-element-with-text", "<foo>Hello, World</foo>");
        addInternalEntity("balanced-element-with-entity", "<foo>&text;</foo>");
        addInternalEntity("unbalanced-entity", "<foo>");
        addInternalEntity("recursive-entity", "<foo>&recursive-entity2;</foo>");
        addInternalEntity("recursive-entity2", "<bar>&recursive-entity3;</bar>");
        addInternalEntity("recursive-entity3", "<baz>&recursive-entity;</baz>");
        try {
            addExternalEntity("external-text", null, "external-text.ent", "test/external-text.xml");
            addExternalEntity("external-balanced-element", null, "external-balanced-element.ent", "test/external-balanced-element.xml");
            addExternalEntity("one", null, "ent/one.ent", "test/external-entity.xml");
            addExternalEntity("two", null, "ent/two.ent", "test/ent/one.xml");
        }
        catch (IOException ex) {
            // should never happen
        }
    }

    fEntityHandler = null;

    // reset scanner
    //if(fEntityScanner!=null)
      //  fEntityScanner.reset(fSymbolTable, this,fErrorReporter);

}
 
Example 26
public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) {
    this.fLimitAnalyzer = fLimitAnalyzer;
}
 
Example 27
public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) {
    fLimitAnalyzer = limitAnalyzer;
}
 
Example 28
public void reset() {
    fLimitAnalyzer = new XMLLimitAnalyzer();
    // initialize state
    fStandalone = false;
    fEntities.clear();
    fEntityStack.removeAllElements();
    fEntityExpansionCount = 0;

    fCurrentEntity = null;
    // reset scanner
    if(fXML10EntityScanner != null){
        fXML10EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }
    if(fXML11EntityScanner != null) {
        fXML11EntityScanner.reset(fSymbolTable, this, fErrorReporter);
    }

    // DEBUG
    if (DEBUG_ENTITIES) {
        addInternalEntity("text", "Hello, World.");
        addInternalEntity("empty-element", "<foo/>");
        addInternalEntity("balanced-element", "<foo></foo>");
        addInternalEntity("balanced-element-with-text", "<foo>Hello, World</foo>");
        addInternalEntity("balanced-element-with-entity", "<foo>&text;</foo>");
        addInternalEntity("unbalanced-entity", "<foo>");
        addInternalEntity("recursive-entity", "<foo>&recursive-entity2;</foo>");
        addInternalEntity("recursive-entity2", "<bar>&recursive-entity3;</bar>");
        addInternalEntity("recursive-entity3", "<baz>&recursive-entity;</baz>");
        try {
            addExternalEntity("external-text", null, "external-text.ent", "test/external-text.xml");
            addExternalEntity("external-balanced-element", null, "external-balanced-element.ent", "test/external-balanced-element.xml");
            addExternalEntity("one", null, "ent/one.ent", "test/external-entity.xml");
            addExternalEntity("two", null, "ent/two.ent", "test/ent/one.xml");
        }
        catch (IOException ex) {
            // should never happen
        }
    }

    fEntityHandler = null;

    // reset scanner
    //if(fEntityScanner!=null)
      //  fEntityScanner.reset(fSymbolTable, this,fErrorReporter);

}
 
Example 29
public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) {
    this.fLimitAnalyzer = fLimitAnalyzer;
}
 
Example 30
Source Project: Bytecoder   Source File: XMLDTDScannerImpl.java    License: Apache License 2.0 4 votes vote down vote up
public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) {
    fLimitAnalyzer = limitAnalyzer;
}