Java Code Examples for com.sun.org.apache.xerces.internal.util.FeatureState#is()

The following examples show how to use com.sun.org.apache.xerces.internal.util.FeatureState#is() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XMLSchemaValidatorComponentManager.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
    if (PARSER_SETTINGS.equals(featureId)) {
        return FeatureState.is(fConfigUpdated);
    }
    else if (VALIDATION.equals(featureId) || SCHEMA_VALIDATION.equals(featureId)) {
        return FeatureState.is(true);
    }
    else if (USE_GRAMMAR_POOL_ONLY.equals(featureId)) {
        return FeatureState.is(fUseGrammarPoolOnly);
    }
    else if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) {
        return FeatureState.is(fInitSecurityManager.isSecureProcessing());
    }
    else if (SCHEMA_ELEMENT_DEFAULT.equals(featureId)) {
        return FeatureState.is(true); //pre-condition: VALIDATION and SCHEMA_VALIDATION are always true
    }
    return super.getFeatureState(featureId);
}
 
Example 2
Source File: XMLSchemaValidatorComponentManager.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
    if (PARSER_SETTINGS.equals(featureId)) {
        return FeatureState.is(fConfigUpdated);
    }
    else if (VALIDATION.equals(featureId) || SCHEMA_VALIDATION.equals(featureId)) {
        return FeatureState.is(true);
    }
    else if (USE_GRAMMAR_POOL_ONLY.equals(featureId)) {
        return FeatureState.is(fUseGrammarPoolOnly);
    }
    else if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) {
        return FeatureState.is(fInitSecurityManager.isSecureProcessing());
    }
    else if (SCHEMA_ELEMENT_DEFAULT.equals(featureId)) {
        return FeatureState.is(true); //pre-condition: VALIDATION and SCHEMA_VALIDATION are always true
    }
    return super.getFeatureState(featureId);
}
 
Example 3
Source File: XMLSchemaValidatorComponentManager.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
    if (PARSER_SETTINGS.equals(featureId)) {
        return FeatureState.is(fConfigUpdated);
    }
    else if (VALIDATION.equals(featureId) || SCHEMA_VALIDATION.equals(featureId)) {
        return FeatureState.is(true);
    }
    else if (USE_GRAMMAR_POOL_ONLY.equals(featureId)) {
        return FeatureState.is(fUseGrammarPoolOnly);
    }
    else if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) {
        return FeatureState.is(fInitSecurityManager.isSecureProcessing());
    }
    else if (SCHEMA_ELEMENT_DEFAULT.equals(featureId)) {
        return FeatureState.is(true); //pre-condition: VALIDATION and SCHEMA_VALIDATION are always true
    }
    return super.getFeatureState(featureId);
}
 
Example 4
Source File: XIncludeAwareParserConfiguration.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public FeatureState getFeatureState(String featureId)
    throws XMLConfigurationException {
    if (featureId.equals(PARSER_SETTINGS)) {
        return FeatureState.is(fConfigUpdated);
    }
    else if (featureId.equals(XINCLUDE_FEATURE)) {
        return FeatureState.is(fXIncludeEnabled);
    }
    return super.getFeatureState0(featureId);

}
 
Example 5
Source File: SchemaValidatorConfiguration.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public FeatureState getFeatureState(String featureId) {
    if (PARSER_SETTINGS.equals(featureId)) {
        return fParentComponentManager.getFeatureState(featureId);
    }
    else if (VALIDATION.equals(featureId) || SCHEMA_VALIDATION.equals(featureId)) {
        return FeatureState.is(true);
    }
    else if (USE_GRAMMAR_POOL_ONLY.equals(featureId)) {
        return FeatureState.is(fUseGrammarPoolOnly);
    }
    return fParentComponentManager.getFeatureState(featureId);
}
 
Example 6
Source File: SchemaValidatorConfiguration.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public FeatureState getFeatureState(String featureId) {
    if (PARSER_SETTINGS.equals(featureId)) {
        return fParentComponentManager.getFeatureState(featureId);
    }
    else if (VALIDATION.equals(featureId) || SCHEMA_VALIDATION.equals(featureId)) {
        return FeatureState.is(true);
    }
    else if (USE_GRAMMAR_POOL_ONLY.equals(featureId)) {
        return FeatureState.is(fUseGrammarPoolOnly);
    }
    return fParentComponentManager.getFeatureState(featureId);
}
 
Example 7
Source File: NonValidatingConfiguration.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
        if (featureId.equals(PARSER_SETTINGS)){
                return FeatureState.is(fConfigUpdated);
        }
        return super.getFeatureState(featureId);

}
 
Example 8
Source File: NonValidatingConfiguration.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
        if (featureId.equals(PARSER_SETTINGS)){
                return FeatureState.is(fConfigUpdated);
        }
        return super.getFeatureState(featureId);

}
 
Example 9
Source File: XIncludeAwareParserConfiguration.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public FeatureState getFeatureState(String featureId)
    throws XMLConfigurationException {
    if (featureId.equals(PARSER_SETTINGS)) {
        return FeatureState.is(fConfigUpdated);
    }
    else if (featureId.equals(XINCLUDE_FEATURE)) {
        return FeatureState.is(fXIncludeEnabled);
    }
    return super.getFeatureState0(featureId);

}
 
Example 10
Source File: XIncludeAwareParserConfiguration.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public FeatureState getFeatureState(String featureId)
    throws XMLConfigurationException {
    if (featureId.equals(PARSER_SETTINGS)) {
        return FeatureState.is(fConfigUpdated);
    }
    else if (featureId.equals(XINCLUDE_FEATURE)) {
        return FeatureState.is(fXIncludeEnabled);
    }
    return super.getFeatureState0(featureId);

}
 
Example 11
Source File: XML11NonValidatingConfiguration.java    From openjdk-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
        return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);

}
 
Example 12
Source File: XML11Configuration.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
        return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);

}
 
Example 13
Source File: XML11NonValidatingConfiguration.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
        return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);

}
 
Example 14
Source File: XML11Configuration.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
        return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);

}
 
Example 15
Source File: XML11DTDConfiguration.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
        return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);

}
 
Example 16
Source File: SchemaParsingConfig.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
    throws XMLConfigurationException {
    // make this feature special
    if (featureId.equals(PARSER_SETTINGS)) {
        return FeatureState.is(fConfigUpdated);
    }
    return super.getFeatureState(featureId);

}
 
Example 17
Source File: XML11DTDConfiguration.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
        return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);

}
 
Example 18
Source File: SchemaParsingConfig.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
    throws XMLConfigurationException {
    // make this feature special
    if (featureId.equals(PARSER_SETTINGS)) {
        return FeatureState.is(fConfigUpdated);
    }
    return super.getFeatureState(featureId);

}
 
Example 19
Source File: XML11Configuration.java    From JDKSourceCode1.8 with MIT License 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
        throws XMLConfigurationException {
                // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
        return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);

}
 
Example 20
Source File: SchemaParsingConfig.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * 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 FeatureState getFeatureState(String featureId)
    throws XMLConfigurationException {
    // make this feature special
    if (featureId.equals(PARSER_SETTINGS)) {
        return FeatureState.is(fConfigUpdated);
    }
    return super.getFeatureState(featureId);

}