Java Code Examples for com.sun.xml.internal.xsom.parser.XSOMParser#getResult()
The following examples show how to use
com.sun.xml.internal.xsom.parser.XSOMParser#getResult() .
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: ModelLoader.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Parses a {@link DOMForest} into a {@link XSSchemaSet}. * * @return * null if the parsing failed. */ public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException { // set up other parameters to XSOMParser XSOMParser reader = createXSOMParser(forest); // re-parse the transformed schemas for (String systemId : forest.getRootDocuments()) { errorReceiver.pollAbort(); Document dom = forest.get(systemId); if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) { reader.parse(systemId); } } XSSchemaSet result = reader.getResult(); if(result!=null) scdBasedBindingSet.apply(result,errorReceiver); return result; }
Example 2
Source File: ModelLoader.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Parses a {@link DOMForest} into a {@link XSSchemaSet}. * * @return * null if the parsing failed. */ public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException { // set up other parameters to XSOMParser XSOMParser reader = createXSOMParser(forest); // re-parse the transformed schemas for (String systemId : forest.getRootDocuments()) { errorReceiver.pollAbort(); Document dom = forest.get(systemId); if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) { reader.parse(systemId); } } XSSchemaSet result = reader.getResult(); if(result!=null) scdBasedBindingSet.apply(result,errorReceiver); return result; }
Example 3
Source File: ModelLoader.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Parses a {@link DOMForest} into a {@link XSSchemaSet}. * * @return * null if the parsing failed. */ public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException { // set up other parameters to XSOMParser XSOMParser reader = createXSOMParser(forest); // re-parse the transformed schemas for (String systemId : forest.getRootDocuments()) { errorReceiver.pollAbort(); Document dom = forest.get(systemId); if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) { reader.parse(systemId); } } XSSchemaSet result = reader.getResult(); if(result!=null) scdBasedBindingSet.apply(result,errorReceiver); return result; }
Example 4
Source File: ModelLoader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Parses a {@link DOMForest} into a {@link XSSchemaSet}. * * @return * null if the parsing failed. */ public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException { // set up other parameters to XSOMParser XSOMParser reader = createXSOMParser(forest); // re-parse the transformed schemas for (String systemId : forest.getRootDocuments()) { errorReceiver.pollAbort(); Document dom = forest.get(systemId); if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) { reader.parse(systemId); } } XSSchemaSet result = reader.getResult(); if(result!=null) scdBasedBindingSet.apply(result,errorReceiver); return result; }
Example 5
Source File: ModelLoader.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Parses a {@link DOMForest} into a {@link XSSchemaSet}. * * @return * null if the parsing failed. */ public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException { // set up other parameters to XSOMParser XSOMParser reader = createXSOMParser(forest); // re-parse the transformed schemas for (String systemId : forest.getRootDocuments()) { errorReceiver.pollAbort(); Document dom = forest.get(systemId); if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) { reader.parse(systemId); } } XSSchemaSet result = reader.getResult(); if(result!=null) scdBasedBindingSet.apply(result,errorReceiver); return result; }
Example 6
Source File: ModelLoader.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Parses a {@link DOMForest} into a {@link XSSchemaSet}. * * @return * null if the parsing failed. */ public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException { // set up other parameters to XSOMParser XSOMParser reader = createXSOMParser(forest); // re-parse the transformed schemas for (String systemId : forest.getRootDocuments()) { errorReceiver.pollAbort(); Document dom = forest.get(systemId); if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) { reader.parse(systemId); } } XSSchemaSet result = reader.getResult(); if(result!=null) scdBasedBindingSet.apply(result,errorReceiver); return result; }
Example 7
Source File: ModelLoader.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Parses a {@link DOMForest} into a {@link XSSchemaSet}. * * @return * null if the parsing failed. */ public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException { // set up other parameters to XSOMParser XSOMParser reader = createXSOMParser(forest); // re-parse the transformed schemas for (String systemId : forest.getRootDocuments()) { errorReceiver.pollAbort(); Document dom = forest.get(systemId); if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) { reader.parse(systemId); } } XSSchemaSet result = reader.getResult(); if(result!=null) scdBasedBindingSet.apply(result,errorReceiver); return result; }
Example 8
Source File: ModelLoader.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Parses a {@link DOMForest} into a {@link XSSchemaSet}. * * @return * null if the parsing failed. */ public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException { // set up other parameters to XSOMParser XSOMParser reader = createXSOMParser(forest); // re-parse the transformed schemas for (String systemId : forest.getRootDocuments()) { errorReceiver.pollAbort(); Document dom = forest.get(systemId); if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) { reader.parse(systemId); } } XSSchemaSet result = reader.getResult(); if(result!=null) scdBasedBindingSet.apply(result,errorReceiver); return result; }
Example 9
Source File: ModelLoader.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Parses a set of schemas inside a WSDL file. * * A WSDL file may contain multiple <xsd:schema> elements. */ private XSSchemaSet loadWSDL() throws SAXException { // build DOMForest just like we handle XML Schema DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() ); DOMForestScanner scanner = new DOMForestScanner(forest); XSOMParser xsomParser = createXSOMParser( forest ); // find <xsd:schema>s and parse them individually for( InputSource grammar : opt.getGrammars() ) { Document wsdlDom = forest.get( grammar.getSystemId() ); if (wsdlDom == null) { String systemId = Options.normalizeSystemId(grammar.getSystemId()); if (forest.get(systemId) != null) { grammar.setSystemId(systemId); wsdlDom = forest.get( grammar.getSystemId() ); } } NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema"); for( int i=0; i<schemas.getLength(); i++ ) scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() ); } return xsomParser.getResult(); }
Example 10
Source File: ModelLoader.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Parses a set of schemas inside a WSDL file. * * A WSDL file may contain multiple <xsd:schema> elements. */ private XSSchemaSet loadWSDL() throws SAXException { // build DOMForest just like we handle XML Schema DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() ); DOMForestScanner scanner = new DOMForestScanner(forest); XSOMParser xsomParser = createXSOMParser( forest ); // find <xsd:schema>s and parse them individually for( InputSource grammar : opt.getGrammars() ) { Document wsdlDom = forest.get( grammar.getSystemId() ); if (wsdlDom == null) { String systemId = Options.normalizeSystemId(grammar.getSystemId()); if (forest.get(systemId) != null) { grammar.setSystemId(systemId); wsdlDom = forest.get( grammar.getSystemId() ); } } NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema"); for( int i=0; i<schemas.getLength(); i++ ) scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() ); } return xsomParser.getResult(); }
Example 11
Source File: ModelLoader.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Parses a set of schemas inside a WSDL file. * * A WSDL file may contain multiple <xsd:schema> elements. */ private XSSchemaSet loadWSDL() throws SAXException { // build DOMForest just like we handle XML Schema DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() ); DOMForestScanner scanner = new DOMForestScanner(forest); XSOMParser xsomParser = createXSOMParser( forest ); // find <xsd:schema>s and parse them individually for( InputSource grammar : opt.getGrammars() ) { Document wsdlDom = forest.get( grammar.getSystemId() ); if (wsdlDom == null) { String systemId = Options.normalizeSystemId(grammar.getSystemId()); if (forest.get(systemId) != null) { grammar.setSystemId(systemId); wsdlDom = forest.get( grammar.getSystemId() ); } } NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema"); for( int i=0; i<schemas.getLength(); i++ ) scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() ); } return xsomParser.getResult(); }
Example 12
Source File: ModelLoader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Parses a set of schemas inside a WSDL file. * * A WSDL file may contain multiple <xsd:schema> elements. */ private XSSchemaSet loadWSDL() throws SAXException { // build DOMForest just like we handle XML Schema DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() ); DOMForestScanner scanner = new DOMForestScanner(forest); XSOMParser xsomParser = createXSOMParser( forest ); // find <xsd:schema>s and parse them individually for( InputSource grammar : opt.getGrammars() ) { Document wsdlDom = forest.get( grammar.getSystemId() ); if (wsdlDom == null) { String systemId = Options.normalizeSystemId(grammar.getSystemId()); if (forest.get(systemId) != null) { grammar.setSystemId(systemId); wsdlDom = forest.get( grammar.getSystemId() ); } } NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema"); for( int i=0; i<schemas.getLength(); i++ ) scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() ); } return xsomParser.getResult(); }
Example 13
Source File: ModelLoader.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Parses a set of schemas inside a WSDL file. * * A WSDL file may contain multiple {@code <xsd:schema>} elements. */ private XSSchemaSet loadWSDL() throws SAXException { // build DOMForest just like we handle XML Schema DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() ); DOMForestScanner scanner = new DOMForestScanner(forest); XSOMParser xsomParser = createXSOMParser( forest ); // find <xsd:schema>s and parse them individually for( InputSource grammar : opt.getGrammars() ) { Document wsdlDom = forest.get( grammar.getSystemId() ); if (wsdlDom == null) { String systemId = Options.normalizeSystemId(grammar.getSystemId()); if (forest.get(systemId) != null) { grammar.setSystemId(systemId); wsdlDom = forest.get( grammar.getSystemId() ); } } NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema"); for( int i=0; i<schemas.getLength(); i++ ) scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() ); } return xsomParser.getResult(); }
Example 14
Source File: ModelLoader.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Parses a set of schemas inside a WSDL file. * * A WSDL file may contain multiple <xsd:schema> elements. */ private XSSchemaSet loadWSDL() throws SAXException { // build DOMForest just like we handle XML Schema DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() ); DOMForestScanner scanner = new DOMForestScanner(forest); XSOMParser xsomParser = createXSOMParser( forest ); // find <xsd:schema>s and parse them individually for( InputSource grammar : opt.getGrammars() ) { Document wsdlDom = forest.get( grammar.getSystemId() ); if (wsdlDom == null) { String systemId = Options.normalizeSystemId(grammar.getSystemId()); if (forest.get(systemId) != null) { grammar.setSystemId(systemId); wsdlDom = forest.get( grammar.getSystemId() ); } } NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema"); for( int i=0; i<schemas.getLength(); i++ ) scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() ); } return xsomParser.getResult(); }
Example 15
Source File: ModelLoader.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Parses a set of schemas inside a WSDL file. * * A WSDL file may contain multiple <xsd:schema> elements. */ private XSSchemaSet loadWSDL() throws SAXException { // build DOMForest just like we handle XML Schema DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() ); DOMForestScanner scanner = new DOMForestScanner(forest); XSOMParser xsomParser = createXSOMParser( forest ); // find <xsd:schema>s and parse them individually for( InputSource grammar : opt.getGrammars() ) { Document wsdlDom = forest.get( grammar.getSystemId() ); if (wsdlDom == null) { String systemId = Options.normalizeSystemId(grammar.getSystemId()); if (forest.get(systemId) != null) { grammar.setSystemId(systemId); wsdlDom = forest.get( grammar.getSystemId() ); } } NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema"); for( int i=0; i<schemas.getLength(); i++ ) scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() ); } return xsomParser.getResult(); }
Example 16
Source File: ModelLoader.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Parses a set of schemas inside a WSDL file. * * A WSDL file may contain multiple <xsd:schema> elements. */ private XSSchemaSet loadWSDL() throws SAXException { // build DOMForest just like we handle XML Schema DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() ); DOMForestScanner scanner = new DOMForestScanner(forest); XSOMParser xsomParser = createXSOMParser( forest ); // find <xsd:schema>s and parse them individually for( InputSource grammar : opt.getGrammars() ) { Document wsdlDom = forest.get( grammar.getSystemId() ); if (wsdlDom == null) { String systemId = Options.normalizeSystemId(grammar.getSystemId()); if (forest.get(systemId) != null) { grammar.setSystemId(systemId); wsdlDom = forest.get( grammar.getSystemId() ); } } NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema"); for( int i=0; i<schemas.getLength(); i++ ) scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() ); } return xsomParser.getResult(); }