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

Java SymbolTable类代码示例

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

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



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

示例1: ValidatorImpl

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
ValidatorImpl(SymbolTable symbolTable, XMLGrammarPool grammarPool, PropertyMap properties) {
  this.symbolTable = symbolTable;
  XMLErrorHandler errorHandlerWrapper = new ErrorHandlerWrapper(properties.get(ValidateProperty.ERROR_HANDLER));
  components = new XMLComponent[] { errorReporter, schemaValidator, entityManager };
  for (int i = 0; i < components.length; i++) {
    addRecognizedFeatures(components[i].getRecognizedFeatures());
    addRecognizedProperties(components[i].getRecognizedProperties());
  }
  addRecognizedFeatures(recognizedFeatures);
  addRecognizedProperties(recognizedProperties);
  setFeature(Features.SCHEMA_AUGMENT_PSVI, false);
  setFeature(Features.SCHEMA_FULL_CHECKING, true);
  setFeature(Features.VALIDATION, true);
  setFeature(Features.SCHEMA_VALIDATION, true);
  setFeature(Features.ID_IDREF_CHECKING, true);
  setFeature(Features.IDC_CHECKING, true);
  setProperty(Properties.XMLGRAMMAR_POOL, grammarPool);
  setProperty(Properties.SYMBOL_TABLE, symbolTable);
  errorReporter.setDocumentLocator(this);
  setProperty(Properties.ERROR_REPORTER, errorReporter);
  setProperty(Properties.ERROR_HANDLER, errorHandlerWrapper);
  setProperty(Properties.VALIDATION_MANAGER, validationManager);
  setProperty(Properties.ENTITY_MANAGER, entityManager);
  setProperty(Properties.ENTITY_RESOLVER, this);
  reset();
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:27,代码来源:ValidatorImpl.java


示例2: SAXParserMMImpl

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a SAX parser using the specified symbol table and
 * grammar pool.
 */
public SAXParserMMImpl(SymbolTable symbolTable, XMLGrammarPool grammarPool) {
    // modified by rsun 11/06/03 - use XML11ConfigurationMMImpl instead
    // of XML11ConfigurationImpl
    super((XMLParserConfiguration)ObjectFactory.createObject(
        "org.apache.xerces.xni.parser.XMLParserConfiguration",
        "org.apache.xerces.parsers.XML11ConfigurationMMImpl"
        ));

    // 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:BowlerHatLLC,项目名称:feathers-sdk,代码行数:27,代码来源:SAXParserMMImpl.java


示例3: SAXParser

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a SAX parser using the specified symbol table and
 * grammar pool.
 */
public SAXParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) {
    super((XMLParserConfiguration)ObjectFactory.createObject(
        "org.apache.xerces.xni.parser.XMLParserConfiguration",
        "org.apache.xerces.parsers.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:AaronZhangL,项目名称:SplitCharater,代码行数:25,代码来源:SAXParser.java


示例4: DOMParser

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

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

}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:21,代码来源:DOMParser.java


示例5: XMLGrammarCachingConfiguration

import org.apache.xerces.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:AaronZhangL,项目名称:SplitCharater,代码行数:31,代码来源:XMLGrammarCachingConfiguration.java


示例6: setProperty

import org.apache.xerces.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;
        }
        else if (suffixLength == Constants.ENTITY_MANAGER_PROPERTY.length() && 
            propertyId.endsWith(Constants.ENTITY_MANAGER_PROPERTY)) {
            fEntityManager = (XMLEntityManager)value;
        }
    }

}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:29,代码来源:XMLScanner.java


示例7: reset

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/**
 * Resets the component. The component can query the component manager
 * about any features and properties that affect the operation of the
 * component.
 *
 * @param componentManager The component manager.
 *
 * @throws SAXException Thrown by component on initialization error.
 *                      For example, if a feature or property is
 *                      required for the operation of the component, the
 *                      component manager may throw a
 *                      SAXNotRecognizedException or a
 *                      SAXNotSupportedException.
 */
public void reset(XMLComponentManager componentManager)
    throws XNIException {

    // features
    try {
        fNamespaces = componentManager.getFeature(NAMESPACES);
    }
    catch (XMLConfigurationException e) {
        fNamespaces = true;
    }

    // Xerces properties
    fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
    fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);

}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:31,代码来源:XMLNamespaceBinder.java


示例8: setProperty

import org.apache.xerces.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:AaronZhangL,项目名称:SplitCharater,代码行数:26,代码来源:XMLNamespaceBinder.java


示例9: XPath

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/** Constructs a field XPath expression. */
public XPath(String xpath, 
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(fixupXPath(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++) {
            org.apache.xerces.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:AaronZhangL,项目名称:SplitCharater,代码行数:19,代码来源:Field.java


示例10: main

import org.apache.xerces.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:AaronZhangL,项目名称:SplitCharater,代码行数:18,代码来源:XPath.java


示例11: SchemaImpl

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
SchemaImpl(SymbolTable symbolTable,
           XMLGrammarPool grammarPool,
           PropertyMap properties,
           PropertyId<?>[] supportedPropertyIds) {
  super(properties, supportedPropertyIds);
  this.symbolTable = symbolTable;
  this.grammarPool = grammarPool;
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:9,代码来源:SchemaImpl.java


示例12: createSchema

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
public Schema createSchema(SAXSource source, PropertyMap properties)
        throws IOException, SAXException, IncorrectSchemaException {
  SymbolTable symbolTable = new SymbolTable();
  XMLGrammarPreparser preparser = new XMLGrammarPreparser(symbolTable);
  XMLGrammarPool grammarPool = new XMLGrammarPoolImpl();
  preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
  preparser.setGrammarPool(grammarPool);
  ErrorHandler eh = properties.get(ValidateProperty.ERROR_HANDLER);
  SAXXMLErrorHandler xeh = new SAXXMLErrorHandler(eh);
  preparser.setErrorHandler(xeh);
  EntityResolver er = properties.get(ValidateProperty.ENTITY_RESOLVER);
  if (er != null)
    preparser.setEntityResolver(new EntityResolverWrapper(er));
  try {
    preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, toXMLInputSource(source.getInputSource()));
    Name attributeOwner = properties.get(WrapProperty.ATTRIBUTE_OWNER);
    if (attributeOwner != null) {
      Reader r = new StringReader(createWrapper(attributeOwner));
 	preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA,
                                new XMLInputSource(null, null, null, r, null));
    }
  }
  catch (XNIException e) {
    throw ValidatorImpl.toSAXException(e);
  }
  if (xeh.getHadError())
    throw new IncorrectSchemaException();
  return new SchemaImpl(new SynchronizedSymbolTable(symbolTable),
                        new CachingParserPool.SynchronizedGrammarPool(grammarPool),
                        properties,
                        supportedPropertyIds);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:33,代码来源:SchemaReaderImpl.java


示例13: IntegratedParserConfigurationMMImpl

import org.apache.xerces.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 IntegratedParserConfigurationMMImpl(SymbolTable symbolTable,
                                     XMLGrammarPool grammarPool,
                                     XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);
    
    // create components
    fNonNSScanner = new XMLDocumentScannerImpl();
    fNonNSDTDValidator = new XMLDTDValidator();

    // add components
    addComponent((XMLComponent)fNonNSScanner);
    addComponent((XMLComponent)fNonNSDTDValidator);

}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:27,代码来源:IntegratedParserConfigurationMMImpl.java


示例14: XPointerParserConfiguration

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a parser configuration using the specified symbol table,
 * grammar pool, and parent settings.
 * <p>
 *
 * @param symbolTable    The symbol table to use.
 * @param grammarPool    The grammar pool to use.
 * @param parentSettings The parent settings.
 */
public XPointerParserConfiguration(
    SymbolTable symbolTable,
    XMLGrammarPool grammarPool,
    XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);

    fXIncludeHandler = new XIncludeHandler();
    addCommonComponent(fXIncludeHandler);
    
    fXPointerHandler = new XPointerHandler();
    addCommonComponent(fXPointerHandler);
    
    final String[] recognizedFeatures = {
        ALLOW_UE_AND_NOTATION_EVENTS,
        XINCLUDE_FIXUP_BASE_URIS,
        XINCLUDE_FIXUP_LANGUAGE
    };
    addRecognizedFeatures(recognizedFeatures);

    // add default recognized properties
    final String[] recognizedProperties =
        { XINCLUDE_HANDLER, XPOINTER_HANDLER, NAMESPACE_CONTEXT };
    addRecognizedProperties(recognizedProperties);
    
    setFeature(ALLOW_UE_AND_NOTATION_EVENTS, true);
    setFeature(XINCLUDE_FIXUP_BASE_URIS, true);
    setFeature(XINCLUDE_FIXUP_LANGUAGE, true);
    
    setProperty(XINCLUDE_HANDLER, fXIncludeHandler);
    setProperty(XPOINTER_HANDLER, fXPointerHandler);
    setProperty(NAMESPACE_CONTEXT, new XIncludeNamespaceSupport());
    
        
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:44,代码来源:XPointerParserConfiguration.java


示例15: XPointerHandler

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/**
 *  
 */
public XPointerHandler() {
    super();

    fXPointerParts = new ArrayList();
    fSymbolTable = new SymbolTable();
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:10,代码来源:XPointerHandler.java


示例16: Tokens

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructor 
 * 
 * @param symbolTable SymbolTable
 */
private Tokens(SymbolTable symbolTable) {
    fSymbolTable = symbolTable;

    fTokenNames.put(new Integer(XPTRTOKEN_ELEM_NCNAME),
            "XPTRTOKEN_ELEM_NCNAME");
    fTokenNames.put(new Integer(XPTRTOKEN_ELEM_CHILD),
            "XPTRTOKEN_ELEM_CHILD");
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:14,代码来源:ElementSchemePointer.java


示例17: XMLGrammarParser

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/**
 * Construct an XMLGrammarParser with the specified symbol table
 *
 * @param symbolTable
 */
protected XMLGrammarParser(SymbolTable symbolTable) {
    super((XMLParserConfiguration)ObjectFactory.createObject(
        "org.apache.xerces.xni.parser.XMLParserConfiguration",
        "org.apache.xerces.parsers.XIncludeAwareParserConfiguration"
        ));
    fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY, symbolTable);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:13,代码来源:XMLGrammarParser.java


示例18: createSAXParser

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


示例19: XMLGrammarPreparser

import org.apache.xerces.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:AaronZhangL,项目名称:SplitCharater,代码行数:15,代码来源:XMLGrammarPreparser.java


示例20: XIncludeParserConfiguration

import org.apache.xerces.util.SymbolTable; //导入依赖的package包/类
/**
 * Constructs a parser configuration using the specified symbol table,
 * grammar pool, and parent settings.
 * <p>
 *
 * @param symbolTable    The symbol table to use.
 * @param grammarPool    The grammar pool to use.
 * @param parentSettings The parent settings.
 */
public XIncludeParserConfiguration(
    SymbolTable symbolTable,
    XMLGrammarPool grammarPool,
    XMLComponentManager parentSettings) {
    super(symbolTable, grammarPool, parentSettings);

    fXIncludeHandler = new XIncludeHandler();
    addCommonComponent(fXIncludeHandler);
    
    final String[] recognizedFeatures = {
        ALLOW_UE_AND_NOTATION_EVENTS,
        XINCLUDE_FIXUP_BASE_URIS,
        XINCLUDE_FIXUP_LANGUAGE
    };
    addRecognizedFeatures(recognizedFeatures);

    // add default recognized properties
    final String[] recognizedProperties =
        { XINCLUDE_HANDLER, NAMESPACE_CONTEXT };
    addRecognizedProperties(recognizedProperties);
    
    setFeature(ALLOW_UE_AND_NOTATION_EVENTS, true);
    setFeature(XINCLUDE_FIXUP_BASE_URIS, true);
    setFeature(XINCLUDE_FIXUP_LANGUAGE, true);
    
    setProperty(XINCLUDE_HANDLER, fXIncludeHandler);
    setProperty(NAMESPACE_CONTEXT, new XIncludeNamespaceSupport());
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:38,代码来源:XIncludeParserConfiguration.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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