当前位置: 首页>>代码示例>>Java>>正文


Java FeatureState.NOT_SUPPORTED属性代码示例

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


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

示例1: checkFeature

/**
 * Check a feature. If feature is know and supported, this method simply
 * returns. Otherwise, the appropriate exception is thrown.
 *
 * @param featureId The unique identifier (URI) of the feature.
 *
 * @throws XMLConfigurationException Thrown for configuration error.
 *                                   In general, components should
 *                                   only throw this exception if
 *                                   it is <strong>really</strong>
 *                                   a critical error.
 */
protected FeatureState checkFeature(String featureId)
    throws XMLConfigurationException {

    //
    // Xerces Features
    //
    if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
        final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();

        //
        // special performance feature: no one by component manager is allowed to set it
        //
        if (suffixLength == Constants.PARSER_SETTINGS.length() &&
            featureId.endsWith(Constants.PARSER_SETTINGS)) {
            return FeatureState.NOT_SUPPORTED;
        }
    }

    return super.checkFeature(featureId);
 }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:BasicParserConfiguration.java

示例2: checkFeature

/**
 * Check a feature. If feature is know and supported, this method simply
 * returns. Otherwise, the appropriate exception is thrown.
 *
 * @param featureId The unique identifier (URI) of the feature.
 *
 * @throws XMLConfigurationException Thrown for configuration error.
 *                                   In general, components should
 *                                   only throw this exception if
 *                                   it is <strong>really</strong>
 *                                   a critical error.
 */
protected FeatureState checkFeature(String featureId)
    throws XMLConfigurationException {

    //
    // Xerces Features
    //

    if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
        final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();

        //
        // http://apache.org/xml/features/validation/dynamic
        //   Allows the parser to validate a document only when it
        //   contains a grammar. Validation is turned on/off based
        //   on each document instance, automatically.
        //
        if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
            featureId.endsWith(Constants.DYNAMIC_VALIDATION_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }

        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE.length() &&
            featureId.endsWith(Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE)) {
            // REVISIT
            return FeatureState.NOT_SUPPORTED;
        }
        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
            featureId.endsWith(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
            // REVISIT
            return FeatureState.NOT_SUPPORTED;
        }
        //
        // http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
        //
        if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
            featureId.endsWith(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }
        //
        // http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
        //
        if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
            featureId.endsWith(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }

        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
            featureId.endsWith(Constants.VALIDATE_DATATYPES_FEATURE)) {
            return FeatureState.NOT_SUPPORTED;
        }
    }

    //
    // Not recognized
    //

    return super.checkFeature(featureId);

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

示例3: checkFeature

/**
 * Check a feature. If feature is know and supported, this method simply
 * returns. Otherwise, the appropriate exception is thrown.
 *
 * @param featureId The unique identifier (URI) of the feature.
 *
 * @throws XMLConfigurationException Thrown for configuration error.
 *                                   In general, components should
 *                                   only throw this exception if
 *                                   it is <strong>really</strong>
 *                                   a critical error.
 */
protected FeatureState checkFeature(String featureId)
    throws XMLConfigurationException {

    //
    // Xerces Features
    //

    if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
        final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();

        //
        // http://apache.org/xml/features/validation/dynamic
        //   Allows the parser to validate a document only when it
        //   contains a grammar. Validation is turned on/off based
        //   on each document instance, automatically.
        //
        if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
            featureId.endsWith(Constants.DYNAMIC_VALIDATION_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }
        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE.length() &&
            featureId.endsWith(Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE)) {
            // REVISIT
            return FeatureState.NOT_SUPPORTED;
        }
        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
            featureId.endsWith(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
            // REVISIT
            return FeatureState.NOT_SUPPORTED;
        }
        //
        // http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
        //
        if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
            featureId.endsWith(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }
        //
        // http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
        //
        if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
            featureId.endsWith(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }

        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
            featureId.endsWith(Constants.VALIDATE_DATATYPES_FEATURE)) {
            return FeatureState.NOT_SUPPORTED;
        }
    }

    //
    // Not recognized
    //

    return super.checkFeature(featureId);

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

示例4: checkFeature

/**
 * Check a feature. If feature is know and supported, this method simply
 * returns. Otherwise, the appropriate exception is thrown.
 *
 * @param featureId The unique identifier (URI) of the feature.
 *
 * @throws XMLConfigurationException Thrown for configuration error.
 *                                   In general, components should
 *                                   only throw this exception if
 *                                   it is <strong>really</strong>
 *                                   a critical error.
 */
protected FeatureState checkFeature(String featureId)
    throws XMLConfigurationException {

    //
    // Xerces Features
    //

    if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
        final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();

        //
        // http://apache.org/xml/features/validation/dynamic
        //   Allows the parser to validate a document only when it
        //   contains a grammar. Validation is turned on/off based
        //   on each document instance, automatically.
        //
        if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
                featureId.endsWith(Constants.DYNAMIC_VALIDATION_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }
        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE.length() &&
                featureId.endsWith(Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE)) {
            // REVISIT
            return FeatureState.NOT_SUPPORTED;
        }
        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
                featureId.endsWith(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
            // REVISIT
            return FeatureState.NOT_SUPPORTED;
        }
        //
        // http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
        //
        if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
                featureId.endsWith(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }
        //
        // http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
        //
        if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
                featureId.endsWith(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
            return FeatureState.RECOGNIZED;
        }

        //
        // http://apache.org/xml/features/validation/default-attribute-values
        //
        if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
                featureId.endsWith(Constants.VALIDATE_DATATYPES_FEATURE)) {
            return FeatureState.NOT_SUPPORTED;
        }
    }

    //
    // Not recognized
    //

    return super.checkFeature(featureId);

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


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