/** * Create a new instance of a SchemaReaderImpl. * @throws SchemaException */ @Override public SchemaReader newSchemaReader() throws SchemaException { return new org.ow2.easywsdl.schema.impl.SchemaReaderImpl(); }
protected Schema readSchema(final InputSource source, Map<URI, AbsItfSchema> imports) throws SchemaException, MalformedURLException, URISyntaxException { return readSchema(source, imports, true); }
/** * Create a new instance of a SchemaReaderImpl. * @throws SchemaException */ @Override public SchemaReader newSchemaReader(final Map<FeatureConstants, Object> features) throws SchemaException { final SchemaReader reader = this.newSchemaReader(); ((SchemaReaderImpl) reader).setFeatures(features); return reader; }
if (systemId != null ) { systemIdURI = new URI(systemId); this.setDocumentBaseURI(systemIdURI); } else { systemIdURI = new File(".").toURI(); SchemaImpl schema = new org.ow2.easywsdl.schema.impl.SchemaImpl(systemIdURI, def, filter.getNamespaceMapper(), filter.getSchemaLocator(), this.getFeatures(), imports, this); if (init) ((SchemaImpl) schema).initialize(); return schema;
/** * {@inheritDoc} */ public Schema read(final URL schemaURL) throws SchemaException, URISyntaxException, IOException { InputStream stream = schemaURL.openStream(); try { final InputSource inputSource = new InputSource(stream); inputSource.setSystemId(schemaURL.toString()); Schema schema = this.read(inputSource); return schema; } catch (final MalformedURLException e) { throw new SchemaException("The provided well-formed URL has been detected as malformed !!", e); } finally { if (stream != null) stream.close(); } }
documentInputSource.setSystemId(doc.getBaseURI()); return this.read(documentInputSource); } catch (final TransformerException e) { throw new SchemaException(e);
public AbstractWSDLReaderImpl() throws WSDLException { try { this.schemaReader = new SchemaReaderImpl(); this.features.put(FeatureConstants.VERBOSE, false); this.features.put(FeatureConstants.IMPORT_DOCUMENTS, true); } catch (SchemaException e) { throw new WSDLException(e); } }
/** * {@inheritDoc} */ public Schema read(final InputSource inputSource) throws SchemaException, URISyntaxException, MalformedURLException { if(inputSource.getSystemId() != null) { this.documentBaseURI = new URI(inputSource.getSystemId()); } else { this.documentBaseURI = new URI("."); } return this.readSchema(inputSource, new HashMap<URI, AbsItfSchema>()); }
public SchemaImpl() throws SchemaException { super("./"); this.reader = new SchemaReaderImpl(); this.model = new org.ow2.easywsdl.schema.org.w3._2001.xmlschema.Schema(); this.getAllNamespaces().addNamespace("xsd", Constants.SCHEMA_NAMESPACE); }
/** * {@inheritDoc} */ @Override protected Schema readExternalPart(final URI schemaLocationURI, final URI baseURI, Map<URI, AbsItfSchema> imports) throws SchemaException, MalformedURLException, URISyntaxException { InputStream is = null; try { is = this.schemaLocationResolver.resolve(baseURI, schemaLocationURI).openStream(); InputSource inputSource = new InputSource(is); inputSource.setSystemId(this.schemaLocationResolver.resolve(baseURI, schemaLocationURI).toString()); Schema schema = this.readSchema(inputSource, imports, false); return schema; } catch (IOException e) { throw new SchemaException(e); } finally { try { if (is != null) is.close(); } catch (IOException ioe) { throw new RuntimeException(ioe); } } }