本文整理汇总了Java中com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager.getFeature方法的典型用法代码示例。如果您正苦于以下问题:Java XMLComponentManager.getFeature方法的具体用法?Java XMLComponentManager.getFeature怎么用?Java XMLComponentManager.getFeature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager
的用法示例。
在下文中一共展示了XMLComponentManager.getFeature方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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 XMLConfigurationException {
//System.out.println(" this is being called");
// xerces features
fAllowJavaEncodings = componentManager.getFeature(ALLOW_JAVA_ENCODINGS, false);
//xerces properties
fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
fCurrentEntity = null;
whiteSpaceLen = 0;
whiteSpaceInfoNeeded = true;
listeners.clear();
}
示例2: copyFeatures1
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的package包/类
private void copyFeatures1(
Enumeration features,
String featurePrefix,
XMLComponentManager from,
XMLParserConfiguration to) {
while (features.hasMoreElements()) {
String featureId = featurePrefix + (String)features.nextElement();
boolean value = from.getFeature(featureId);
try {
to.setFeature(featureId, value);
}
catch (XMLConfigurationException e) {
// componentManager doesn't support this feature,
// so we won't worry about it
}
}
}
示例3: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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();
}
示例4: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的package包/类
public void reset(XMLComponentManager componentManager)
throws XMLConfigurationException {
fDTDGrammar = null;
fInElementContent = false;
fCurrentElementIndex = -1;
fCurrentContentSpecType = -1;
fNamespaces = componentManager.getFeature(NAMESPACES, true);
fSymbolTable = (SymbolTable) componentManager.getProperty(
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
fElementDepth = -1;
}
示例5: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的package包/类
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
boolean parser_settings = componentManager.getFeature(PARSER_SETTINGS, true);
if (!parser_settings) {
// parser settings have not been changed
reset();
return;
}
// sax features
fValidation = componentManager.getFeature(VALIDATION, false);
fDTDValidation =
!(componentManager
.getFeature(
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE, false));
// Xerces features
fWarnDuplicateAttdef = componentManager.getFeature(WARN_ON_DUPLICATE_ATTDEF, false);
fWarnOnUndeclaredElemdef = componentManager.getFeature(WARN_ON_UNDECLARED_ELEMDEF, false);
// get needed components
fErrorReporter =
(XMLErrorReporter) componentManager.getProperty(
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
fSymbolTable =
(SymbolTable) componentManager.getProperty(
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
fGrammarPool = (XMLGrammarPool) componentManager.getProperty(GRAMMAR_POOL, null);
try {
fValidator = (XMLDTDValidator) componentManager.getProperty(DTD_VALIDATOR, null);
} catch (ClassCastException e) {
fValidator = null;
}
// we get our grammarBucket from the validator...
if (fValidator != null) {
fGrammarBucket = fValidator.getGrammarBucket();
} else {
fGrammarBucket = null;
}
reset();
}
示例6: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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 XMLConfigurationException {
super.reset(componentManager);
// other settings
// fDocumentSystemId = null;
// sax features
//fAttributes.setNamespaces(fNamespaces);
// xerces features
fReportCdataEvent = componentManager.getFeature(Constants.STAX_REPORT_CDATA_EVENT, true);
fSecurityManager = (XMLSecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER, null);
fNotifyBuiltInRefs = componentManager.getFeature(NOTIFY_BUILTIN_REFS, false);
Object resolver = componentManager.getProperty(ENTITY_RESOLVER, null);
fExternalSubsetResolver = (resolver instanceof ExternalSubsetResolver) ?
(ExternalSubsetResolver) resolver : null;
//attribute
fReadingAttributes = false;
//xxx: external entities are supported in Xerces
// it would be good to define feature for this case
fSupportExternalEntities = true;
fReplaceEntityReferences = true;
fIsCoalesce = false;
// setup Driver
setScannerState(SCANNER_STATE_CONTENT);
setDriver(fContentDriver);
// JAXP 1.5 features and properties
XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)
componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER, null);
fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);
fStrictURI = componentManager.getFeature(STANDARD_URI_CONFORMANT, false);
resetCommon();
//fEntityManager.test();
}
示例7: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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 XMLConfigurationException {
super.reset(componentManager);
// other settings
// fDocumentSystemId = null;
// sax features
//fAttributes.setNamespaces(fNamespaces);
// xerces features
fReportCdataEvent = componentManager.getFeature(Constants.STAX_REPORT_CDATA_EVENT, true);
fSecurityManager = (XMLSecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER, null);
fNotifyBuiltInRefs = componentManager.getFeature(NOTIFY_BUILTIN_REFS, false);
Object resolver = componentManager.getProperty(ENTITY_RESOLVER, null);
fExternalSubsetResolver = (resolver instanceof ExternalSubsetResolver) ?
(ExternalSubsetResolver) resolver : null;
//attribute
fReadingAttributes = false;
//xxx: external entities are supported in Xerces
// it would be good to define feature for this case
fSupportExternalEntities = true;
fReplaceEntityReferences = true;
fIsCoalesce = false;
// setup Driver
setScannerState(SCANNER_STATE_CONTENT);
setDriver(fContentDriver);
// JAXP 1.5 features and properties
XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)
componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER, null);
fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);
fStrictURI = componentManager.getFeature(STANDARD_URI_CONFORMANT, false);
fChunkSize = JdkXmlUtils.getValue(componentManager.getProperty(JdkXmlUtils.CDATA_CHUNK_SIZE),
JdkXmlUtils.CDATA_CHUNK_SIZE_DEFAULT);
resetCommon();
//fEntityManager.test();
}
示例8: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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 XMLConfigurationException {
super.reset(componentManager);
// other settings
// fDocumentSystemId = null;
// sax features
//fAttributes.setNamespaces(fNamespaces);
// xerces features
fReportCdataEvent = componentManager.getFeature(Constants.STAX_REPORT_CDATA_EVENT, true);
fSecurityManager = (XMLSecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER, null);
fLimitAnalyzer = fSecurityManager.getLimitAnalyzer();
fElementAttributeLimit = (fSecurityManager != null)?
fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT):0;
fNotifyBuiltInRefs = componentManager.getFeature(NOTIFY_BUILTIN_REFS, false);
Object resolver = componentManager.getProperty(ENTITY_RESOLVER, null);
fExternalSubsetResolver = (resolver instanceof ExternalSubsetResolver) ?
(ExternalSubsetResolver) resolver : null;
// initialize vars
fMarkupDepth = 0;
fCurrentElement = null;
fElementStack.clear();
fHasExternalDTD = false;
fStandaloneSet = false;
fStandalone = false;
fInScanContent = false;
//skipping algorithm
fShouldSkip = false;
fAdd = false;
fSkip = false;
//attribute
fReadingAttributes = false;
//xxx: external entities are supported in Xerces
// it would be good to define feature for this case
fSupportExternalEntities = true;
fReplaceEntityReferences = true;
fIsCoalesce = false;
// setup Driver
setScannerState(SCANNER_STATE_CONTENT);
setDriver(fContentDriver);
fEntityStore = fEntityManager.getEntityStore();
dtdGrammarUtil = null;
// JAXP 1.5 features and properties
XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)
componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER, null);
fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);
fStrictURI = componentManager.getFeature(STANDARD_URI_CONFORMANT, false);
//fEntityManager.test();
}
示例9: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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
fNamespaces = componentManager.getFeature(NAMESPACES, true);
// Xerces properties
fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
}
示例10: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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
fContinueAfterFatalError = componentManager.getFeature(CONTINUE_AFTER_FATAL_ERROR, false);
// properties
fErrorHandler = (XMLErrorHandler)componentManager.getProperty(ERROR_HANDLER);
}
示例11: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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 XMLConfigurationException {
// xerces features
fWarnDuplicateEntityDef = componentManager.getFeature(WARN_ON_DUPLICATE_ENTITYDEF, false);
fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
fEntities.clear();
fCurrentEntity = null;
}
示例12: reset
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; //导入方法依赖的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 XMLConfigurationException {
// xerces features
fAllowJavaEncodings = componentManager.getFeature(ALLOW_JAVA_ENCODINGS, false);
//xerces properties
fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
resetCommon();
}