• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SymbolTable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.org.apache.xerces.internal.util.SymbolTable的典型用法代码示例。如果您正苦于以下问题:Java SymbolTable类的具体用法?Java SymbolTable怎么用?Java SymbolTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SymbolTable类属于com.sun.org.apache.xerces.internal.util包,在下文中一共展示了SymbolTable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: DOMParser

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a DOM parser using the specified symbol table and
 * grammar pool.
 */
public DOMParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) {
    super(new XIncludeAwareParserConfiguration());

    // set properties
    fConfiguration.addRecognizedProperties(RECOGNIZED_PROPERTIES);
    if (symbolTable != null) {
        fConfiguration.setProperty(SYMBOL_TABLE, symbolTable);
    }
    if (grammarPool != null) {
        fConfiguration.setProperty(XMLGRAMMAR_POOL, grammarPool);
    }

    fConfiguration.addRecognizedFeatures(RECOGNIZED_FEATURES);

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:DOMParser.java


示例2: reset

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
public void reset(PropertyManager propertyManager) {
    init();
    // 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);

    fEntityManager = (XMLEntityManager)propertyManager.getProperty(ENTITY_MANAGER);
    fEntityStore = fEntityManager.getEntityStore() ;
    fEntityScanner = (XMLEntityScanner)fEntityManager.getEntityScanner() ;
    fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);

    //fEntityManager.reset();
    // DTD preparsing defaults:
    fValidation = false;
    fNotifyCharRefs = false;

}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:XMLScanner.java


示例3: XMLGrammarCachingConfiguration

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a parser configuration using the specified symbol table,
 * grammar pool, and parent settings.
 * <p>
 * <strong>REVISIT:</strong>
 * Grammar pool will be updated when the new validation engine is
 * implemented.
 *
 * @param symbolTable    The symbol table to use.
 * @param grammarPool    The grammar pool to use.
 * @param parentSettings The parent settings.
 */
public XMLGrammarCachingConfiguration(SymbolTable symbolTable,
                                   XMLGrammarPool grammarPool,
                                   XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);

    // REVISIT:  may need to add some features/properties
    // specific to this configuration at some point...

    // add default recognized features
    // set state for default features
    // add default recognized properties
    // create and register missing components
    fSchemaLoader = new XMLSchemaLoader(fSymbolTable);
    fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool);

    // and set up the DTD loader too:
    fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:XMLGrammarCachingConfiguration.java


示例4: SAXParser

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a SAX parser using the specified symbol table and
 * grammar pool.
 */
public SAXParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) {
    super(new XIncludeAwareParserConfiguration());

    // set features
    fConfiguration.addRecognizedFeatures(RECOGNIZED_FEATURES);
    fConfiguration.setFeature(NOTIFY_BUILTIN_REFS, true);

    // set properties
    fConfiguration.addRecognizedProperties(RECOGNIZED_PROPERTIES);
    if (symbolTable != null) {
        fConfiguration.setProperty(SYMBOL_TABLE, symbolTable);
    }
    if (grammarPool != null) {
        fConfiguration.setProperty(XMLGRAMMAR_POOL, grammarPool);
    }

}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:SAXParser.java


示例5: setProperty

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Sets the value of a property during parsing.
 *
 * @param propertyId
 * @param value
 */
public void setProperty(String propertyId, Object value)
    throws XMLConfigurationException {

    // Xerces properties
    if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
            final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();

        if (suffixLength == Constants.SYMBOL_TABLE_PROPERTY.length() &&
            propertyId.endsWith(Constants.SYMBOL_TABLE_PROPERTY)) {
            fSymbolTable = (SymbolTable)value;
        }
        else if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&
            propertyId.endsWith(Constants.ERROR_REPORTER_PROPERTY)) {
            fErrorReporter = (XMLErrorReporter)value;
        }
        return;
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:XMLNamespaceBinder.java


示例6: XPath

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:Field.java


示例7: main

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/** Main program entry. */
public static void main(String[] argv) throws Exception {

    for (int i = 0; i < argv.length; i++) {
        final String expression = argv[i];
        System.out.println("# XPath expression: \""+expression+'"');
        try {
            SymbolTable symbolTable = new SymbolTable();
            XPath xpath = new XPath(expression, symbolTable, null);
            System.out.println("expanded xpath: \""+xpath.toString()+'"');
        }
        catch (XPathException e) {
            System.out.println("error: "+e.getMessage());
        }
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:XPath.java


示例8: XMLGrammarPreparser

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a preparser using the specified symbol table.
 *
 * @param symbolTable The symbol table to use.
 */
public XMLGrammarPreparser (SymbolTable symbolTable) {
    fSymbolTable = symbolTable;

    fLoaders = new HashMap<>();
    fErrorReporter = new XMLErrorReporter();
    setLocale(Locale.getDefault());
    fEntityResolver = new XMLEntityManager();
    // those are all the basic properties...
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:XMLGrammarPreparser.java


示例9: createDOMParser

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/** Creates a new DOM parser. */
public DOMParser createDOMParser() {
    SymbolTable symbolTable = fShadowSymbolTable
                            ? new ShadowedSymbolTable(fSynchronizedSymbolTable)
                            : fSynchronizedSymbolTable;
    XMLGrammarPool grammarPool = fShadowGrammarPool
                            ? new ShadowedGrammarPool(fSynchronizedGrammarPool)
                            : fSynchronizedGrammarPool;
    return new DOMParser(symbolTable, grammarPool);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:CachingParserPool.java


示例10: XMLGrammarPreparser

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a preparser using the specified symbol table.
 *
 * @param symbolTable The symbol table to use.
 */
public XMLGrammarPreparser (SymbolTable symbolTable) {
    fSymbolTable = symbolTable;

    fLoaders = new Hashtable();
    fErrorReporter = new XMLErrorReporter();
    setLocale(Locale.getDefault());
    fEntityResolver = new XMLEntityManager();
    // those are all the basic properties...
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:XMLGrammarPreparser.java


示例11: XPath

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:Selector.java


示例12: DOMParserImpl

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a DOM Builder using the specified symbol table.
 */
public DOMParserImpl (SymbolTable symbolTable) {
    this (new XIncludeAwareParserConfiguration());
    fConfiguration.setProperty (
    Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY,
    symbolTable);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:DOMParserImpl.java


示例13: setProperty

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * <p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      The value of the property.
 *
 * @throws SAXNotRecognizedException The component should not throw
 *                                   this exception.
 * @throws SAXNotSupportedException The component should not throw
 *                                  this exception.
 */
public void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {
    if (propertyId.equals(SYMBOL_TABLE)) {
        fSymbolTable = (SymbolTable)value;
        fDTDScanner.setProperty(propertyId, value);
        fEntityManager.setProperty(propertyId, value);
    }
    else if(propertyId.equals(ERROR_REPORTER)) {
        fErrorReporter = (XMLErrorReporter)value;
        // Add XML message formatter if there isn't one.
        if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
            XMLMessageFormatter xmft = new XMLMessageFormatter();
            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft);
            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft);
        }
        fDTDScanner.setProperty(propertyId, value);
        fEntityManager.setProperty(propertyId, value);
    }
    else if (propertyId.equals(ERROR_HANDLER)) {
        fErrorReporter.setProperty(propertyId, value);
    }
    else if (propertyId.equals(ENTITY_RESOLVER)) {
        fEntityResolver = (XMLEntityResolver)value;
        fEntityManager.setProperty(propertyId, value);
    }
    else if (propertyId.equals(LOCALE)) {
        setLocale((Locale) value);
    }
    else if(propertyId.equals(GRAMMAR_POOL)) {
        fGrammarPool = (XMLGrammarPool)value;
    }
    else {
        throw new XMLConfigurationException(Status.NOT_RECOGNIZED, propertyId);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:51,代码来源:XMLDTDLoader.java


示例14: DOMValidatorHelper

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
public DOMValidatorHelper(XMLSchemaValidatorComponentManager componentManager) {
    fComponentManager = componentManager;
    fErrorReporter = (XMLErrorReporter) fComponentManager.getProperty(ERROR_REPORTER);
    fNamespaceContext = (NamespaceSupport) fComponentManager.getProperty(NAMESPACE_CONTEXT);
    fSchemaValidator = (XMLSchemaValidator) fComponentManager.getProperty(SCHEMA_VALIDATOR);
    fSymbolTable = (SymbolTable) fComponentManager.getProperty(SYMBOL_TABLE);
    fValidationManager = (ValidationManager) fComponentManager.getProperty(VALIDATION_MANAGER);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:DOMValidatorHelper.java


示例15: reset

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
    // obtain references from the manager
    fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
    fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
    try {
        fEntityResolver = (XMLEntityResolver) componentManager.getProperty(ENTITY_MANAGER);
    }
    catch (XMLConfigurationException e) {
        fEntityResolver = null;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:JAXPValidatorComponent.java


示例16: XPointerHandler

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
public XPointerHandler(SymbolTable symbolTable,
        XMLErrorHandler errorHandler, XMLErrorReporter errorReporter) {
    super();

    fXPointerParts = new Vector();
    fSymbolTable = symbolTable;
    fErrorHandler = errorHandler;
    fXPointerErrorReporter = errorReporter;
    //fErrorReporter = errorReporter; // The XInclude ErrorReporter
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:XPointerHandler.java


示例17: reset

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 *
 *
 * @param componentManager The component manager.
 *
 * @throws SAXException Throws exception if required features and
 *                      properties cannot be found.
 */
public void reset(XMLComponentManager componentManager)
throws XMLConfigurationException {

            fParserSettings = componentManager.getFeature(PARSER_SETTINGS, true);

            if (!fParserSettings) {
                    // parser settings have not been changed
                    init();
                    return;
            }


    // Xerces properties
    fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
    fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
    fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER);
    fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER);

    //this step is extra because we have separated the storage of entity
    fEntityStore = fEntityManager.getEntityStore() ;

    // sax features
    fValidation = componentManager.getFeature(VALIDATION, false);
    fNamespaces = componentManager.getFeature(NAMESPACES, true);
    fNotifyCharRefs = componentManager.getFeature(NOTIFY_CHAR_REFS, false);

    init();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:XMLScanner.java


示例18: setProperty

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 * Sets the value of a property during parsing.
 *
 * @param propertyId
 * @param value
 */
public void setProperty(String propertyId, Object value)
throws XMLConfigurationException {

    // Xerces properties
    if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
        String property =
                propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
        if (property.equals(Constants.SYMBOL_TABLE_PROPERTY)) {
            fSymbolTable = (SymbolTable)value;
        } else if (property.equals(Constants.ERROR_REPORTER_PROPERTY)) {
            fErrorReporter = (XMLErrorReporter)value;
        } else if (property.equals(Constants.ENTITY_MANAGER_PROPERTY)) {
            fEntityManager = (XMLEntityManager)value;
        }
    }

    if (propertyId.equals(SECURITY_MANAGER)) {
        fSecurityManager = (XMLSecurityManager)value;
    }
            /*else if(propertyId.equals(Constants.STAX_PROPERTIES)){
        fStaxProperties = (HashMap)value;
        //TODO::discuss with neeraj what are his thoughts on passing properties.
        //For now use this
    }*/

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:XMLScanner.java


示例19: reset

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/**
 *
 *
 * @param componentManager The component manager.
 *
 * @throws SAXException Throws exception if required features and
 *                      properties cannot be found.
 */
public void reset(XMLComponentManager componentManager)
    throws XMLConfigurationException {

    // Xerces properties
    fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
    fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
    fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER);
    for(int i=14; i<fExpectedVersionString.length; i++ )
        fExpectedVersionString[i] = ' ';
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:XMLVersionDetector.java


示例20: XMLDTDScannerImpl

import com.sun.org.apache.xerces.internal.util.SymbolTable; //导入依赖的package包/类
/** Constructor for he use of non-XMLComponentManagers. */
public XMLDTDScannerImpl(SymbolTable symbolTable,
        XMLErrorReporter errorReporter, XMLEntityManager entityManager) {
    fSymbolTable = symbolTable;
    fErrorReporter = errorReporter;
    fEntityManager = entityManager;
    entityManager.setProperty(SYMBOL_TABLE, fSymbolTable);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:XMLDTDScannerImpl.java



注:本文中的com.sun.org.apache.xerces.internal.util.SymbolTable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LibraryType类代码示例发布时间:2022-05-23
下一篇:
Java WrongTypeException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap