本文整理汇总了Java中com.sun.org.apache.xerces.internal.util.PropertyState类的典型用法代码示例。如果您正苦于以下问题:Java PropertyState类的具体用法?Java PropertyState怎么用?Java PropertyState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyState类属于com.sun.org.apache.xerces.internal.util包,在下文中一共展示了PropertyState类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: checkProperty
import com.sun.org.apache.xerces.internal.util.PropertyState; //导入依赖的package包/类
/**
* Check a property. If the property is know and supported, this method
* simply returns. Otherwise, the appropriate exception is thrown.
*
* @param propertyId The unique identifier (URI) of the property
* being set.
*
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
* it is <strong>really</strong>
* a critical error.
*/
protected PropertyState checkProperty(String propertyId)
throws XMLConfigurationException {
//
// Xerces Properties
//
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
propertyId.endsWith(Constants.DTD_SCANNER_PROPERTY)) {
return PropertyState.RECOGNIZED;
}
}
//
// Not recognized
//
return super.checkProperty(propertyId);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:DTDConfiguration.java
示例2: getPropertyState
import com.sun.org.apache.xerces.internal.util.PropertyState; //导入依赖的package包/类
public PropertyState getPropertyState(String propertyId)
throws XMLConfigurationException {
if (LOCALE.equals(propertyId)) {
return PropertyState.is(getLocale());
}
return super.getPropertyState(propertyId);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:DTDConfiguration.java
示例3: checkProperty
import com.sun.org.apache.xerces.internal.util.PropertyState; //导入依赖的package包/类
/**
* Check a property. If the property is known and supported, this method
* simply returns. Otherwise, the appropriate exception is thrown.
*
* @param propertyId The unique identifier (URI) of the property
* being set.
* @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
* requested feature is not known or supported.
*/
protected PropertyState checkProperty(String propertyId)
throws XMLConfigurationException {
// special cases
if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.SAX_PROPERTY_PREFIX.length();
//
// http://xml.org/sax/properties/xml-string
// Value type: String
// Access: read-only
// Get the literal string of characters associated with the
// current event. If the parser recognises and supports this
// property but is not currently parsing text, it should return
// null (this is a good way to check for availability before the
// parse begins).
//
if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
propertyId.endsWith(Constants.XML_STRING_PROPERTY)) {
// REVISIT - we should probably ask xml-dev for a precise
// definition of what this is actually supposed to return, and
// in exactly which circumstances.
return PropertyState.NOT_SUPPORTED;
}
}
// check property
return super.checkProperty(propertyId);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:BasicParserConfiguration.java
示例4: getPropertyState
import com.sun.org.apache.xerces.internal.util.PropertyState; //导入依赖的package包/类
/**
* Returns the value of a property.
*
* @param propertyId The property identifier.
* @return the value of the property
*
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
* it is <strong>really</strong>
* a critical error.
*/
public PropertyState getPropertyState(String propertyId)
throws XMLConfigurationException {
if (LOCALE.equals(propertyId)) {
return PropertyState.is(getLocale());
}
final Object component = fComponents.get(propertyId);
if (component != null) {
return PropertyState.is(component);
}
else if (fComponents.containsKey(propertyId)) {
return PropertyState.is(null);
}
return super.getPropertyState(propertyId);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:XMLSchemaValidatorComponentManager.java
示例5: getPropertyState
import com.sun.org.apache.xerces.internal.util.PropertyState; //导入依赖的package包/类
public PropertyState getPropertyState(String propertyId) {
if (XMLGRAMMAR_POOL.equals(propertyId)) {
return PropertyState.is(fGrammarPool);
}
else if (VALIDATION_MANAGER.equals(propertyId)) {
return PropertyState.is(fValidationManager);
}
return fParentComponentManager.getPropertyState(propertyId);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:SchemaValidatorConfiguration.java
示例6: getProperty
import com.sun.org.apache.xerces.internal.util.PropertyState; //导入依赖的package包/类
public Object getProperty(String propertyId, Object defaultValue) {
PropertyState state = getPropertyState(propertyId);
if (state.isExceptional()) {
return defaultValue;
}
return state.state;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:SchemaValidatorConfiguration.java
注:本文中的com.sun.org.apache.xerces.internal.util.PropertyState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论