com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader Java Examples

The following examples show how to use com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader. 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: SAXDocumentParser.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        if (value == false) {
            throw new SAXNotSupportedException(name + ":" + value);
        }
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        _namespacePrefixesFeature = value;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        setStringInterning(value);
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #2
Source File: SAXDocumentParser.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        return getLexicalHandler();
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        return getDeclHandler();
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        return getExternalVocabularies();
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        return getRegisteredEncodingAlgorithms();
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        return getEncodingAlgorithmContentHandler();
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        return getPrimitiveTypeContentHandler();
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #3
Source File: SAXDocumentParser.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        if (value == false) {
            throw new SAXNotSupportedException(name + ":" + value);
        }
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        _namespacePrefixesFeature = value;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        setStringInterning(value);
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #4
Source File: SAXDocumentParser.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        if (value == false) {
            throw new SAXNotSupportedException(name + ":" + value);
        }
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        _namespacePrefixesFeature = value;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        setStringInterning(value);
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #5
Source File: SAXDocumentParser.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        return getLexicalHandler();
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        return getDeclHandler();
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        return getExternalVocabularies();
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        return getRegisteredEncodingAlgorithms();
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        return getEncodingAlgorithmContentHandler();
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        return getPrimitiveTypeContentHandler();
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #6
Source File: SAXDocumentParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        return getLexicalHandler();
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        return getDeclHandler();
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        return getExternalVocabularies();
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        return getRegisteredEncodingAlgorithms();
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        return getEncodingAlgorithmContentHandler();
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        return getPrimitiveTypeContentHandler();
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #7
Source File: SAXDocumentParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        if (value == false) {
            throw new SAXNotSupportedException(name + ":" + value);
        }
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        _namespacePrefixesFeature = value;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        setStringInterning(value);
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #8
Source File: SAXDocumentParser.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        if (value == false) {
            throw new SAXNotSupportedException(name + ":" + value);
        }
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        _namespacePrefixesFeature = value;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        setStringInterning(value);
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #9
Source File: SAXDocumentParser.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        return getLexicalHandler();
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        return getDeclHandler();
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        return getExternalVocabularies();
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        return getRegisteredEncodingAlgorithms();
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        return getEncodingAlgorithmContentHandler();
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        return getPrimitiveTypeContentHandler();
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #10
Source File: SAXDocumentParser.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        if (value == false) {
            throw new SAXNotSupportedException(name + ":" + value);
        }
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        _namespacePrefixesFeature = value;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        setStringInterning(value);
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #11
Source File: SAXDocumentParser.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        return getLexicalHandler();
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        return getDeclHandler();
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        return getExternalVocabularies();
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        return getRegisteredEncodingAlgorithms();
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        return getEncodingAlgorithmContentHandler();
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        return getPrimitiveTypeContentHandler();
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #12
Source File: SAXDocumentParser.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        return getLexicalHandler();
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        return getDeclHandler();
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        return getExternalVocabularies();
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        return getRegisteredEncodingAlgorithms();
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        return getEncodingAlgorithmContentHandler();
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        return getPrimitiveTypeContentHandler();
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #13
Source File: SAXDocumentParser.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        if (value == false) {
            throw new SAXNotSupportedException(name + ":" + value);
        }
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        _namespacePrefixesFeature = value;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        setStringInterning(value);
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #14
Source File: SAXDocumentParser.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        if (value == false) {
            throw new SAXNotSupportedException(name + ":" + value);
        }
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        _namespacePrefixesFeature = value;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        setStringInterning(value);
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #15
Source File: SAXDocumentParser.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        return getLexicalHandler();
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        return getDeclHandler();
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        return getExternalVocabularies();
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        return getRegisteredEncodingAlgorithms();
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        return getEncodingAlgorithmContentHandler();
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        return getPrimitiveTypeContentHandler();
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #16
Source File: SAXDocumentParser.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        return getLexicalHandler();
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        return getDeclHandler();
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        return getExternalVocabularies();
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        return getRegisteredEncodingAlgorithms();
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        return getEncodingAlgorithmContentHandler();
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        return getPrimitiveTypeContentHandler();
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #17
Source File: SAXDocumentParser.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        return true;
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        return _namespacePrefixesFeature;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        return getStringInterning();
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #18
Source File: SAXDocumentParser.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        return true;
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        return _namespacePrefixesFeature;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        return getStringInterning();
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #19
Source File: SAXDocumentParser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        return true;
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        return _namespacePrefixesFeature;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        return getStringInterning();
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #20
Source File: SAXDocumentParser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        return true;
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        return _namespacePrefixesFeature;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        return getStringInterning();
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #21
Source File: SAXDocumentParser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        return true;
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        return _namespacePrefixesFeature;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        return getStringInterning();
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #22
Source File: SAXDocumentParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        return true;
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        return _namespacePrefixesFeature;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        return getStringInterning();
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #23
Source File: SAXDocumentParser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        return true;
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        return _namespacePrefixesFeature;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        return getStringInterning();
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #24
Source File: SAXDocumentParser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Features.NAMESPACES_FEATURE)) {
        return true;
    } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
        return _namespacePrefixesFeature;
    } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
            name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
        return getStringInterning();
    } else {
        throw new SAXNotRecognizedException(
                CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
    }
}
 
Example #25
Source File: SAXDocumentParser.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        if (value instanceof LexicalHandler) {
            setLexicalHandler((LexicalHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        if (value instanceof DeclHandler) {
            setDeclHandler((DeclHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        if (value instanceof Map) {
            setExternalVocabularies((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        if (value instanceof Map) {
            setRegisteredEncodingAlgorithms((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof EncodingAlgorithmContentHandler) {
            setEncodingAlgorithmContentHandler((EncodingAlgorithmContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof PrimitiveTypeContentHandler) {
            setPrimitiveTypeContentHandler((PrimitiveTypeContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.BUFFER_SIZE_PROPERTY)) {
        if (value instanceof Integer) {
            setBufferSize(((Integer)value).intValue());
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.BUFFER_SIZE_PROPERTY);
        }
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #26
Source File: SAXDocumentParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        if (value instanceof LexicalHandler) {
            setLexicalHandler((LexicalHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        if (value instanceof DeclHandler) {
            setDeclHandler((DeclHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        if (value instanceof Map) {
            setExternalVocabularies((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        if (value instanceof Map) {
            setRegisteredEncodingAlgorithms((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof EncodingAlgorithmContentHandler) {
            setEncodingAlgorithmContentHandler((EncodingAlgorithmContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof PrimitiveTypeContentHandler) {
            setPrimitiveTypeContentHandler((PrimitiveTypeContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.BUFFER_SIZE_PROPERTY)) {
        if (value instanceof Integer) {
            setBufferSize(((Integer)value).intValue());
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.BUFFER_SIZE_PROPERTY);
        }
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #27
Source File: SAXDocumentParser.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        if (value instanceof LexicalHandler) {
            setLexicalHandler((LexicalHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        if (value instanceof DeclHandler) {
            setDeclHandler((DeclHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        if (value instanceof Map) {
            setExternalVocabularies((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        if (value instanceof Map) {
            setRegisteredEncodingAlgorithms((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof EncodingAlgorithmContentHandler) {
            setEncodingAlgorithmContentHandler((EncodingAlgorithmContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof PrimitiveTypeContentHandler) {
            setPrimitiveTypeContentHandler((PrimitiveTypeContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.BUFFER_SIZE_PROPERTY)) {
        if (value instanceof Integer) {
            setBufferSize(((Integer)value).intValue());
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.BUFFER_SIZE_PROPERTY);
        }
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #28
Source File: SAXDocumentParser.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        if (value instanceof LexicalHandler) {
            setLexicalHandler((LexicalHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        if (value instanceof DeclHandler) {
            setDeclHandler((DeclHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        if (value instanceof Map) {
            setExternalVocabularies((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        if (value instanceof Map) {
            setRegisteredEncodingAlgorithms((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof EncodingAlgorithmContentHandler) {
            setEncodingAlgorithmContentHandler((EncodingAlgorithmContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof PrimitiveTypeContentHandler) {
            setPrimitiveTypeContentHandler((PrimitiveTypeContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.BUFFER_SIZE_PROPERTY)) {
        if (value instanceof Integer) {
            setBufferSize(((Integer)value).intValue());
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.BUFFER_SIZE_PROPERTY);
        }
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #29
Source File: SAXDocumentParser.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        if (value instanceof LexicalHandler) {
            setLexicalHandler((LexicalHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        if (value instanceof DeclHandler) {
            setDeclHandler((DeclHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        if (value instanceof Map) {
            setExternalVocabularies((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        if (value instanceof Map) {
            setRegisteredEncodingAlgorithms((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof EncodingAlgorithmContentHandler) {
            setEncodingAlgorithmContentHandler((EncodingAlgorithmContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof PrimitiveTypeContentHandler) {
            setPrimitiveTypeContentHandler((PrimitiveTypeContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.BUFFER_SIZE_PROPERTY)) {
        if (value instanceof Integer) {
            setBufferSize(((Integer)value).intValue());
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.BUFFER_SIZE_PROPERTY);
        }
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}
 
Example #30
Source File: SAXDocumentParser.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException {
    if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
        if (value instanceof LexicalHandler) {
            setLexicalHandler((LexicalHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
        if (value instanceof DeclHandler) {
            setDeclHandler((DeclHandler)value);
        } else {
            throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
        if (value instanceof Map) {
            setExternalVocabularies((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
        if (value instanceof Map) {
            setRegisteredEncodingAlgorithms((Map)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof EncodingAlgorithmContentHandler) {
            setEncodingAlgorithmContentHandler((EncodingAlgorithmContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
        if (value instanceof PrimitiveTypeContentHandler) {
            setPrimitiveTypeContentHandler((PrimitiveTypeContentHandler)value);
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY);
        }
    } else if (name.equals(FastInfosetReader.BUFFER_SIZE_PROPERTY)) {
        if (value instanceof Integer) {
            setBufferSize(((Integer)value).intValue());
        } else {
            throw new SAXNotSupportedException(FastInfosetReader.BUFFER_SIZE_PROPERTY);
        }
    } else {
        throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
                getString("message.propertyNotRecognized", new Object[]{name}));
    }
}