com.sun.org.apache.xerces.internal.util.FeatureState

Here are the examples of the java api class com.sun.org.apache.xerces.internal.util.FeatureState taken from open source projects.

1. SchemaValidatorConfiguration#getFeature()

View license
/**
     * Returns the state of a feature.
     *
     * @param featureId The feature identifier.
     * @return true if the feature is supported
     *
     * @throws XMLConfigurationException Thrown for configuration error.
     *                                   In general, components should
     *                                   only throw this exception if
     *                                   it is <strong>really</strong>
     *                                   a critical error.
     */
public boolean getFeature(String featureId) throws XMLConfigurationException {
    FeatureState state = getFeatureState(featureId);
    if (state.isExceptional()) {
        throw new XMLConfigurationException(state.status, featureId);
    }
    return state.state;
}

2. SchemaValidatorConfiguration#getFeature()

View license
public boolean getFeature(String featureId, boolean defaultValue) {
    FeatureState state = getFeatureState(featureId);
    if (state.isExceptional()) {
        return defaultValue;
    }
    return state.state;
}