Java Code Examples for com.sun.tools.internal.xjc.reader.internalizer.DOMForestScanner#scan()
The following examples show how to use
com.sun.tools.internal.xjc.reader.internalizer.DOMForestScanner#scan() .
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 | 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 2
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 3
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 4
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 5
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 6
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 7
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 8
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(); }