private void addBindingFiles(List<String> bindingFiles, SchemaCompiler compiler) { if (bindingFiles != null) { for (String s : bindingFiles) { URL url = composeUrl(s); try { InputStream ins = url.openStream(); InputSource is = new InputSource(ins); is.setSystemId(url.toString()); is.setPublicId(url.toString()); compiler.getOptions().addBindFile(is); } catch (IOException e) { throw new RuntimeException(e); } } } }
is.setSystemId(key); is.setPublicId(key); compiler.getOptions().addGrammar(is); compiler.parseSchema(key, schema.getElement());
opts.addGrammar(is); schemaCompiler.parseSchema(key, ele); reader = new LocationFilterReader(reader, catalog); InputSource is = new InputSource(key); opts.addGrammar(is); schemaCompiler.parseSchema(key, reader); reader.close(); opts.addGrammar(is); schemaCompiler.parseSchema(key, StaxUtils.createXMLStreamReader(ele, key)); opts.addGrammar(is); schemaCompiler.parseSchema(el.getKey(), StaxUtils.createXMLStreamReader(el.getValue(),
opts.addGrammar(is); schemaCompiler.parseSchema(key, ele); reader = new LocationFilterReader(reader, catalog); InputSource is = new InputSource(key); opts.addGrammar(is); schemaCompiler.parseSchema(key, reader); reader.close(); opts.addGrammar(is); schemaCompiler.parseSchema(key, StaxUtils.createXMLStreamReader(ele, key)); opts.addGrammar(is); schemaCompiler.parseSchema(el.getKey(), StaxUtils.createXMLStreamReader(el.getValue(),
private JCodeModel createCodeModel(List<SchemaInfo> schemaElements, Set<String> type) { SchemaCompiler compiler = createCompiler(type); Object elForRun = ReflectionInvokationHandler .createProxyWrapper(new InnerErrorListener(), JAXBUtils.getParamClass(compiler, "setErrorListener")); compiler.setErrorListener(elForRun); compiler.setEntityResolver(OASISCatalogManager.getCatalogManager(bus) .getEntityResolver()); if (!compilerArgs.isEmpty()) { compiler.getOptions().addGrammar(new InputSource("null")); compiler.getOptions().parseArguments(compilerArgs.toArray(new String[0])); } addSchemas(schemaElements, compiler); for (InputSource is : bindingFiles) { compiler.getOptions().addBindFile(is); } S2JJAXBModel intermediateModel = compiler.bind(); JCodeModel codeModel = intermediateModel.generateCode(null, elForRun); JAXBUtils.logGeneratedClassNames(LOG, codeModel); return codeModel; }
private void addBindingFiles(List<String> bindingFiles, SchemaCompiler compiler) { if (bindingFiles != null) { for (String s : bindingFiles) { URL url = composeUrl(s); try { InputStream ins = url.openStream(); InputSource is = new InputSource(ins); is.setSystemId(url.toString()); is.setPublicId(url.toString()); compiler.getOptions().addBindFile(is); } catch (IOException e) { throw new RuntimeException(e); } } } }
protected SchemaCompiler createSchemaCompiler() { SchemaCompiler compiler = JAXBUtils.createSchemaCompilerWithDefaultAllocator(new HashSet<>()); if (schemaCompilerOptions != null && schemaCompilerOptions.length > 0) { compiler.getOptions().parseArguments(schemaCompilerOptions); } return compiler; }
protected SchemaCompiler createSchemaCompiler() { SchemaCompiler compiler = JAXBUtils.createSchemaCompilerWithDefaultAllocator(new HashSet<String>()); if (schemaCompilerOptions != null && schemaCompilerOptions.length > 0) { compiler.getOptions().parseArguments(schemaCompilerOptions); } return compiler; }
protected SchemaCompiler createSchemaCompiler() { SchemaCompiler compiler = JAXBUtils.createSchemaCompilerWithDefaultAllocator(new HashSet<String>()); if (schemaCompilerOptions != null && schemaCompilerOptions.length > 0) { compiler.getOptions().parseArguments(schemaCompilerOptions); } return compiler; }
protected SchemaCompiler createSchemaCompiler() { SchemaCompiler compiler = JAXBUtils.createSchemaCompilerWithDefaultAllocator(new HashSet<>()); if (schemaCompilerOptions != null && schemaCompilerOptions.length > 0) { compiler.getOptions().parseArguments(schemaCompilerOptions); } return compiler; }