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

The following examples show how to use com.sun.xml.internal.org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler. 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 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 #2
Source File: SAXDocumentParser.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
    return _primitiveHandler;
}
 
Example #3
Source File: SAXDocumentParser.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
    _primitiveHandler = handler;
}
 
Example #4
Source File: SAXDocumentParser.java    From openjdk-8 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 #5
Source File: SAXDocumentParser.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
    return _primitiveHandler;
}
 
Example #6
Source File: SAXDocumentParser.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
    _primitiveHandler = handler;
}
 
Example #7
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 #8
Source File: SAXDocumentParser.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
    return _primitiveHandler;
}
 
Example #9
Source File: SAXDocumentParser.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
    _primitiveHandler = handler;
}
 
Example #10
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 #11
Source File: SAXDocumentParser.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
    return _primitiveHandler;
}
 
Example #12
Source File: SAXDocumentParser.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
    _primitiveHandler = handler;
}
 
Example #13
Source File: SAXDocumentParser.java    From TencentKona-8 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 #14
Source File: SAXDocumentParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
    return _primitiveHandler;
}
 
Example #15
Source File: SAXDocumentParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
    _primitiveHandler = handler;
}
 
Example #16
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 #17
Source File: SAXDocumentParser.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
    return _primitiveHandler;
}
 
Example #18
Source File: SAXDocumentParser.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
    _primitiveHandler = handler;
}
 
Example #19
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 #20
Source File: SAXDocumentParser.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
    return _primitiveHandler;
}
 
Example #21
Source File: SAXDocumentParser.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
    _primitiveHandler = handler;
}
 
Example #22
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}));
    }
}
 
Example #23
Source File: SAXDocumentParser.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
    return _primitiveHandler;
}
 
Example #24
Source File: SAXDocumentParser.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
    _primitiveHandler = handler;
}