本文整理汇总了Java中com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader类的典型用法代码示例。如果您正苦于以下问题:Java XMLGrammarLoader类的具体用法?Java XMLGrammarLoader怎么用?Java XMLGrammarLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XMLGrammarLoader类属于com.sun.org.apache.xerces.internal.xni.grammars包,在下文中一共展示了XMLGrammarLoader类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: registerPreparser
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public boolean registerPreparser(String grammarType, XMLGrammarLoader loader) {
if(loader == null) { // none specified!
if(KNOWN_LOADERS.containsKey(grammarType)) {
// got one; just instantiate it...
String loaderName = (String)KNOWN_LOADERS.get(grammarType);
try {
XMLGrammarLoader gl = (XMLGrammarLoader)(ObjectFactory.newInstance(loaderName, true));
fLoaders.put(grammarType, gl);
} catch (Exception e) {
return false;
}
return true;
}
return false;
}
// were given one
fLoaders.put(grammarType, loader);
return true;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:XMLGrammarPreparser.java
示例2: preparseGrammar
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
/**
* Parse a grammar from a location identified by an
* XMLInputSource.
* This method also adds this grammar to the XMLGrammarPool
*
* @param type The type of the grammar to be constructed
* @param is The XMLInputSource containing this grammar's
* information
* <strong>If a URI is included in the systemId field, the parser will not expand this URI or make it
* available to the EntityResolver</strong>
* @return The newly created <code>Grammar</code>.
* @exception XNIException thrown on an error in grammar
* construction
* @exception IOException thrown if an error is encountered
* in reading the file
*/
public Grammar preparseGrammar(String type, XMLInputSource
is) throws XNIException, IOException {
if(fLoaders.containsKey(type)) {
XMLGrammarLoader gl = (XMLGrammarLoader)fLoaders.get(type);
// make sure gl's been set up with all the "basic" properties:
gl.setProperty(SYMBOL_TABLE, fSymbolTable);
gl.setProperty(ENTITY_RESOLVER, fEntityResolver);
gl.setProperty(ERROR_REPORTER, fErrorReporter);
// potentially, not all will support this one...
if(fGrammarPool != null) {
try {
gl.setProperty(GRAMMAR_POOL, fGrammarPool);
} catch(Exception e) {
// too bad...
}
}
return gl.loadGrammar(is);
}
return null;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:XMLGrammarPreparser.java
示例3: setFeature
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public void setFeature(String featureId, boolean value) {
Enumeration loaders = fLoaders.elements();
while(loaders.hasMoreElements()){
XMLGrammarLoader gl = (XMLGrammarLoader)loaders.nextElement();
try {
gl.setFeature(featureId, value);
} catch(Exception e) {
// eat it up...
}
}
// since our error reporter is a property we set later,
// make sure features it understands are also set.
if(featureId.equals(CONTINUE_AFTER_FATAL_ERROR)) {
fErrorReporter.setFeature(CONTINUE_AFTER_FATAL_ERROR, value);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:XMLGrammarPreparser.java
示例4: preparseGrammar
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
/**
* Parse a grammar from a location identified by an
* XMLInputSource.
* This method also adds this grammar to the XMLGrammarPool
*
* @param type The type of the grammar to be constructed
* @param is The XMLInputSource containing this grammar's
* information
* <strong>If a URI is included in the systemId field, the parser will not expand this URI or make it
* available to the EntityResolver</strong>
* @return The newly created <code>Grammar</code>.
* @exception XNIException thrown on an error in grammar
* construction
* @exception IOException thrown if an error is encountered
* in reading the file
*/
public Grammar preparseGrammar(String type, XMLInputSource
is) throws XNIException, IOException {
if(fLoaders.containsKey(type)) {
XMLGrammarLoader gl = fLoaders.get(type);
// make sure gl's been set up with all the "basic" properties:
gl.setProperty(SYMBOL_TABLE, fSymbolTable);
gl.setProperty(ENTITY_RESOLVER, fEntityResolver);
gl.setProperty(ERROR_REPORTER, fErrorReporter);
// potentially, not all will support this one...
if(fGrammarPool != null) {
try {
gl.setProperty(GRAMMAR_POOL, fGrammarPool);
} catch(Exception e) {
// too bad...
}
}
return gl.loadGrammar(is);
}
return null;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:37,代码来源:XMLGrammarPreparser.java
示例5: setProperty
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public void setProperty(String propId, Object value) {
Enumeration loaders = fLoaders.elements();
while(loaders.hasMoreElements()){
XMLGrammarLoader gl = (XMLGrammarLoader)loaders.nextElement();
try {
gl.setProperty(propId, value);
} catch(Exception e) {
// eat it up...
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:XMLGrammarPreparser.java
示例6: setFeature
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public void setFeature(String featureId, boolean value) {
for (Map.Entry<String, XMLGrammarLoader> entry : fLoaders.entrySet()) {
try {
XMLGrammarLoader gl = entry.getValue();
gl.setFeature(featureId, value);
} catch(Exception e) {
// eat it up...
}
}
// since our error reporter is a property we set later,
// make sure features it understands are also set.
if(featureId.equals(CONTINUE_AFTER_FATAL_ERROR)) {
fErrorReporter.setFeature(CONTINUE_AFTER_FATAL_ERROR, value);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:XMLGrammarPreparser.java
示例7: setProperty
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public void setProperty(String propId, Object value) {
for (Map.Entry<String, XMLGrammarLoader> entry : fLoaders.entrySet()) {
try {
XMLGrammarLoader gl = entry.getValue();
gl.setProperty(propId, value);
} catch(Exception e) {
// eat it up...
}
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:XMLGrammarPreparser.java
示例8: getLoader
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public XMLGrammarLoader getLoader(String type) {
return (XMLGrammarLoader)fLoaders.get(type);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:XMLGrammarPreparser.java
示例9: getFeature
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public boolean getFeature(String type, String featureId) {
XMLGrammarLoader gl = (XMLGrammarLoader)fLoaders.get(type);
return gl.getFeature(featureId);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:XMLGrammarPreparser.java
示例10: getProperty
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public Object getProperty(String type, String propertyId) {
XMLGrammarLoader gl = (XMLGrammarLoader)fLoaders.get(type);
return gl.getProperty(propertyId);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:XMLGrammarPreparser.java
示例11: getLoader
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public XMLGrammarLoader getLoader(String type) {
return fLoaders.get(type);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:XMLGrammarPreparser.java
示例12: getFeature
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public boolean getFeature(String type, String featureId) {
XMLGrammarLoader gl = fLoaders.get(type);
return gl.getFeature(featureId);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:XMLGrammarPreparser.java
示例13: getProperty
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; //导入依赖的package包/类
public Object getProperty(String type, String propertyId) {
XMLGrammarLoader gl = fLoaders.get(type);
return gl.getProperty(propertyId);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:XMLGrammarPreparser.java
注:本文中的com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论