Java Code Examples for com.sun.org.apache.xerces.internal.xni.parser.XMLComponent#getPropertyDefault()
The following examples show how to use
com.sun.org.apache.xerces.internal.xni.parser.XMLComponent#getPropertyDefault() .
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 |
/** Sets property defaults for the given component on this configuration. */ private void setPropertyDefaults(final XMLComponent component, final String [] recognizedProperties) { if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 2
Source File: XMLSchemaValidatorComponentManager.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** Sets property defaults for the given component on this configuration. */ private void setPropertyDefaults(final XMLComponent component, final String [] recognizedProperties) { if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 3
Source File: XMLSchemaValidatorComponentManager.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** Sets property defaults for the given component on this configuration. */ private void setPropertyDefaults(final XMLComponent component, final String [] recognizedProperties) { if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 4
Source File: XMLSchemaValidatorComponentManager.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** Sets property defaults for the given component on this configuration. */ private void setPropertyDefaults(final XMLComponent component, final String [] recognizedProperties) { if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 5
Source File: XMLSchemaValidatorComponentManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** Sets property defaults for the given component on this configuration. */ private void setPropertyDefaults(final XMLComponent component, final String [] recognizedProperties) { if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 6
Source File: BasicParserConfiguration.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Adds a component to the parser configuration. This method will * also add all of the component's recognized features and properties * to the list of default recognized features and properties. * * @param component The component to add. */ protected void addComponent(XMLComponent component) { // don't add a component more than once if (fComponents.contains(component)) { return; } fComponents.add(component); // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; i++) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { super.setFeature(featureId, state.booleanValue()); } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; i++) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { super.setProperty(propertyId, value); } } } }
Example 7
Source File: BasicParserConfiguration.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Adds a component to the parser configuration. This method will * also add all of the component's recognized features and properties * to the list of default recognized features and properties. * * @param component The component to add. */ protected void addComponent(XMLComponent component) { // don't add a component more than once if (fComponents.contains(component)) { return; } fComponents.add(component); // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; i++) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { super.setFeature(featureId, state.booleanValue()); } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; i++) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { super.setProperty(propertyId, value); } } } }
Example 8
Source File: BasicParserConfiguration.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Adds a component to the parser configuration. This method will * also add all of the component's recognized features and properties * to the list of default recognized features and properties. * * @param component The component to add. */ protected void addComponent(XMLComponent component) { // don't add a component more than once if (fComponents.contains(component)) { return; } fComponents.add(component); // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; i++) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { super.setFeature(featureId, state.booleanValue()); } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; i++) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { super.setProperty(propertyId, value); } } } }
Example 9
Source File: BasicParserConfiguration.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Adds a component to the parser configuration. This method will * also add all of the component's recognized features and properties * to the list of default recognized features and properties. * * @param component The component to add. */ protected void addComponent(XMLComponent component) { // don't add a component more than once if (fComponents.contains(component)) { return; } fComponents.add(component); // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; i++) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { super.setFeature(featureId, state.booleanValue()); } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; i++) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { super.setProperty(propertyId, value); } } } }
Example 10
Source File: XML11NonValidatingConfiguration.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ protected void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 11
Source File: XML11Configuration.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ protected void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 12
Source File: XML11Configuration.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ protected void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 13
Source File: XML11NonValidatingConfiguration.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ protected void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 14
Source File: XML11DTDConfiguration.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ protected void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 15
Source File: XML11Configuration.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ protected void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 16
Source File: SchemaParsingConfig.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ private void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 17
Source File: XML11DTDConfiguration.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ protected void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 18
Source File: SchemaParsingConfig.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ private void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 19
Source File: XML11Configuration.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ protected void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }
Example 20
Source File: SchemaParsingConfig.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * Adds all of the component's recognized features and properties * to the list of default recognized features and properties, and * sets default values on the configuration for features and * properties which were previously absent from the configuration. * * @param component The component whose recognized features * and properties will be added to the configuration */ private void addRecognizedParamsAndSetDefaults(XMLComponent component) { // register component's recognized features String[] recognizedFeatures = component.getRecognizedFeatures(); addRecognizedFeatures(recognizedFeatures); // register component's recognized properties String[] recognizedProperties = component.getRecognizedProperties(); addRecognizedProperties(recognizedProperties); // set default values if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; Boolean state = component.getFeatureDefault(featureId); if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { fFeatures.put(featureId, state); // For newly added components who recognize this feature // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } if (recognizedProperties != null) { for (int i = 0; i < recognizedProperties.length; ++i) { String propertyId = recognizedProperties[i]; Object value = component.getPropertyDefault(propertyId); if (value != null) { // Do not overwrite values already set on the configuration. if (!fProperties.containsKey(propertyId)) { fProperties.put(propertyId, value); // For newly added components who recognize this property // but did not offer a default value, we need to make // sure these components will get an opportunity to read // the value before parsing begins. fConfigUpdated = true; } } } } }