Java Code Examples for com.sun.org.apache.xerces.internal.impl.Constants#XERCES_PROPERTY_PREFIX

The following examples show how to use com.sun.org.apache.xerces.internal.impl.Constants#XERCES_PROPERTY_PREFIX . 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: XMLGrammarCachingConfiguration.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 2
Source File: XMLGrammarCachingConfiguration.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 3
Source File: XMLGrammarCachingConfiguration.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 4
Source File: XMLGrammarCachingConfiguration.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 5
Source File: XMLGrammarCachingConfiguration.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 6
Source File: XMLGrammarCachingConfiguration.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 7
Source File: XMLGrammarCachingConfiguration.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 8
Source File: XMLGrammarCachingConfiguration.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 9
Source File: XMLGrammarCachingConfiguration.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 10
Source File: XMLGrammarCachingConfiguration.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 11
Source File: XMLGrammarCachingConfiguration.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
SchemaGrammar parseXMLSchema(XMLInputSource is)
            throws IOException {
    XMLEntityResolver resolver = getEntityResolver();
    if(resolver != null) {
        fSchemaLoader.setEntityResolver(resolver);
    }
    if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
        fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
    }
    fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);

    String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
    String propName = propPrefix + Constants.SCHEMA_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
    fSchemaLoader.setProperty(propName, getProperty(propName));
    fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));

    // Should check whether the grammar with this namespace is already in
    // the grammar resolver. But since we don't know the target namespace
    // of the document here, we leave such check to XSDHandler
    SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
    // by default, hand it off to the grammar pool
    if (grammar != null) {
        fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
                                  new Grammar[]{grammar});
    }

    return grammar;

}
 
Example 12
Source File: XPointerHandler.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}
 
Example 13
Source File: XPointerHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}
 
Example 14
Source File: XPointerHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}
 
Example 15
Source File: XPointerHandler.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}
 
Example 16
Source File: XPointerHandler.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}
 
Example 17
Source File: XPointerHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}
 
Example 18
Source File: XPointerHandler.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}
 
Example 19
Source File: XPointerHandler.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}
 
Example 20
Source File: XPointerHandler.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * <p>
 * Sets the value of a property. This method is called by the component
 * manager any time after reset when a property changes value.
 * </p>
 * <strong>Note:</strong> Components should silently ignore properties
 * that do not affect the operation of the component.
 *
 * @param propertyId The property identifier.
 * @param value      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 void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

    // Error reporter
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_REPORTER_PROPERTY) {
        if (value != null) {
            fXPointerErrorReporter = (XMLErrorReporter) value;
        } else {
            fXPointerErrorReporter = null;
        }
    }

    // Error handler
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.ERROR_HANDLER_PROPERTY) {
        if (value != null) {
            fErrorHandler = (XMLErrorHandler) value;
        } else {
            fErrorHandler = null;
        }
    }

    // xml:lang
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
        if (value != null) {
            fFixupLang = ((Boolean)value).booleanValue();
        } else {
            fFixupLang = false;
        }
    }

    // xml:base
    if (propertyId == Constants.XERCES_FEATURE_PREFIX
            + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
        if (value != null) {
            fFixupBase = ((Boolean)value).booleanValue();
        } else {
            fFixupBase = false;
        }
    }

    //
    if (propertyId == Constants.XERCES_PROPERTY_PREFIX
            + Constants.NAMESPACE_CONTEXT_PROPERTY) {
        fNamespaceContext = (XIncludeNamespaceSupport) value;
    }

    super.setProperty(propertyId, value);
}