com.sun.org.apache.xerces.internal.dom.DOMInputImpl Java Examples
The following examples show how to use
com.sun.org.apache.xerces.internal.dom.DOMInputImpl.
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: JAXPValidatorComponent.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #2
Source File: JAXPValidatorComponent.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #3
Source File: JAXPValidatorComponent.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #4
Source File: JAXPValidatorComponent.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #5
Source File: JAXPValidatorComponent.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #6
Source File: JAXPValidatorComponent.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #7
Source File: JAXPValidatorComponent.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #8
Source File: JAXPValidatorComponent.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #9
Source File: JAXPValidatorComponent.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #10
Source File: JAXPValidatorComponent.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }
Example #11
Source File: JAXPValidatorComponent.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * @param validatorHandler may not be null. */ public JAXPValidatorComponent( ValidatorHandler validatorHandler ) { this.validator = validatorHandler; TypeInfoProvider tip = validatorHandler.getTypeInfoProvider(); if(tip==null) tip = noInfoProvider; this.typeInfoProvider = tip; // configure wiring between internal components. xni2sax.setContentHandler(validator); validator.setContentHandler(sax2xni); this.setSide(xni2sax); // configure validator with proper EntityResolver/ErrorHandler. validator.setErrorHandler(new ErrorHandlerProxy() { protected XMLErrorHandler getErrorHandler() { XMLErrorHandler handler = fErrorReporter.getErrorHandler(); if(handler!=null) return handler; return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()); } }); validator.setResourceResolver(new LSResourceResolver() { public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } }); }