/** * Create a new instance of a Definition, with an instance of a * PopulatedExtensionRegistry as its ExtensionRegistry. * @throws SchemaException */ @Override public Schema newSchema() throws SchemaException { return new SchemaImpl(); }
public void writeSchema(final Schema schemaDef, OutputStream output) throws SchemaException { if ((schemaDef != null) && (schemaDef instanceof org.ow2.easywsdl.schema.impl.SchemaImpl)) { try { org.ow2.easywsdl.schema.org.w3._2001.xmlschema.Schema schemaDescriptor = ((org.ow2.easywsdl.schema.impl.SchemaImpl) schemaDef).getModel(); final JAXBElement element = new JAXBElement(new QName(Constants.SCHEMA_NAMESPACE, Constants.SCHEMA_ROOT_TAG), schemaDescriptor.getClass(), schemaDescriptor); Marshaller marshaller = SchemaJAXBContext.getInstance().getJaxbContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); // NamespaceMapperImpl namespaceMapper = schemaDef.getAllNamespaces(); // marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", // namespaceMapper); marshaller.marshal(element, output); } catch (final JAXBException e) { throw new SchemaException("Failed to build XML binding from Agreement descriptor Java classes", e); } } } }
public void initialize() { this.addImportElementsInAllList(); this.addIncludeElementsInAllList(); this.addRedefineElementsInAllList(); this.getTypes().add(st); this.getTypes().add(ct); this.getElements().add(e); this.getAttributes().add(a); for(Element elmt: this.getElements()) { ((ElementImpl)elmt).findReferencedElementIfExist(); for(Type type: this.getTypes()) { if(type instanceof ComplexType) { ((ComplexTypeImpl)type).findReferencedElementIfExist();
super(documentURI, schema, namespaceMapper, schemaLocator); this.setFeatures(features); this.model = schema; final Import impt = new org.ow2.easywsdl.schema.impl.ImportImpl((org.ow2.easywsdl.schema.org.w3._2001.xmlschema.Import) item, this, imports, this.getDocumentURI(), reader); this.getImports().add(impt); final Include incl = new org.ow2.easywsdl.schema.impl.IncludeImpl((org.ow2.easywsdl.schema.org.w3._2001.xmlschema.Include) item, this, imports, this.getDocumentURI(), reader); this.getIncludes().add(incl); final Redefine red = new org.ow2.easywsdl.schema.impl.RedefineImpl((org.ow2.easywsdl.schema.org.w3._2001.xmlschema.Redefine) item, this, imports, this.getDocumentURI(), reader); this.getRedefines().add(red);
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; } catch (SAXException e) {
public Redefine createRedefine() throws SchemaException { try { return new RedefineImpl(new org.ow2.easywsdl.schema.org.w3._2001.xmlschema.Redefine(), this, null, this.getDocumentURI(), this.reader); } catch (final URISyntaxException e) { // No URI is already set, so this exception cannot occur throw new SchemaException(e); } }
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); }
public Include createInclude() throws SchemaException { try { return new IncludeImpl(new org.ow2.easywsdl.schema.org.w3._2001.xmlschema.Include(), this, null, this.getDocumentURI(), this.reader); } catch (final URISyntaxException e) { // No URI is already set, so this exception cannot occur throw new SchemaException(e); } }
this.schemas.add(new org.ow2.easywsdl.schema.impl.SchemaImpl(this.desc.getDocumentURI(), schema, this.desc.getNamespaces(), ((AbstractDescriptionImpl) this.desc).getSchemaLocator(), features, imports, (SchemaReaderImpl) reader.getSchemaReader()));
public Document getDocument(final Schema schemaDef) throws SchemaException { Document doc = null; if ((schemaDef != null) && (schemaDef instanceof org.ow2.easywsdl.schema.impl.SchemaImpl)) { try { doc = this.convertSchema2DOMElement(((org.ow2.easywsdl.schema.impl.SchemaImpl) schemaDef).getModel(), schemaDef.getAllNamespaces()); if (schemaDef.getDocumentURI() != null) { doc.setDocumentURI(schemaDef.getDocumentURI().toString()); } } catch (final SchemaException e) { throw new SchemaException("Can not write wsdl description", e); } } return doc; }
public Import createImport() throws SchemaException { try { return new ImportImpl(new org.ow2.easywsdl.schema.org.w3._2001.xmlschema.Import(), this, null, this.getDocumentURI(), this.reader); } catch (final URISyntaxException e) { // No URI is already set, so this exception cannot occur throw new SchemaException(e); } }
this.schemas.add(new org.ow2.easywsdl.schema.impl.SchemaImpl(this.desc.getDocumentURI(), schema, this.desc.getNamespaces(), ((AbstractDescriptionImpl) this.desc).getSchemaLocator(), features, imports, (SchemaReaderImpl) reader.getSchemaReader()));