public T getTypes() { T types = null; if(typesImpl != null) { try { final Constructor c = typesImpl.getConstructors()[0]; types = (T) c.newInstance(this.wsdl.getTypes()); } catch (IllegalArgumentException e) { // do nothing e.printStackTrace(); } catch (InstantiationException e) { // do nothing e.printStackTrace(); } catch (IllegalAccessException e) { // do nothing e.printStackTrace(); } catch (InvocationTargetException e) { // do nothing e.printStackTrace(); } } else { types = this.wsdl.getTypes(); } return types; }
private Collection<? extends org.ow2.easywsdl.schema.api.Element> findElementsInAllSchema( final AbsItfDescription desc, final QName element) { final List<org.ow2.easywsdl.schema.api.Element> res = new ArrayList<org.ow2.easywsdl.schema.api.Element>(); if(desc.getTypes() != null) { for(final AbsItfSchema schema: (List<AbsItfSchema>)desc.getTypes().getSchemas()) { res.addAll(schema.findElementsInAllSchema(element)); } } for(final org.ow2.easywsdl.wsdl.api.Import impt: (List<org.ow2.easywsdl.wsdl.api.Import>)desc.getImports()) { if(impt.getDescription() != null) { res.addAll(this.findElementsInAllSchema(impt.getDescription(), element)); } } return res; }
protected void addImportElementsInAllList() { for (final Impt impt : this.imports) { if (impt.getDescription() != null) { this.services.addAll(impt.getDescription().getServices()); this.bindings.addAll(impt.getDescription().getBindings()); this.interfaces.addAll(impt.getDescription().getInterfaces()); if (this.types != null) { if (impt.getDescription().getTypes() != null) { this.types.getSchemas().addAll(impt.getDescription().getTypes().getSchemas()); } } else { this.types = (T) impt.getDescription().getTypes(); } } } }
protected void addIncludeElementsInAllList() { for (final Incl incl : this.includes) { if (incl.getDescription() != null) { this.services.addAll(incl.getDescription().getServices()); this.bindings.addAll(incl.getDescription().getBindings()); this.interfaces.addAll(incl.getDescription().getInterfaces()); if (this.types != null) { this.types.getSchemas().addAll(incl.getDescription().getTypes().getSchemas()); } else { this.types = (T) incl.getDescription().getTypes(); } } } }
@SuppressWarnings("unchecked") public Element getElement() { Element res = null; final Types types = (Types) ((AbstractInterfaceTypeImpl) ((AbstractOperationImpl) this.operation) .getInterface()).getDescription().getTypes(); if (this.elementName != null) { for (final Schema schema : types.getSchemas()) { res = schema.getElement(this.elementName); if (res != null) { break; } } } return res; }
newDesc.setTypes(this.convertTypes(odlDesc.getTypes(), timpl)); for (final AbsItfSchema s : (List<AbsItfSchema>) odlDesc.getTypes().getSchemas()) { newSchemas.add(this.schemaConverter.convertSchema(s)); newDesc.getTypes().getSchemas().clear(); newDesc.getTypes().getSchemas().addAll(newSchemas); .getTypes().getImportedSchemas()) { newImportedSchemas.add(this.schemaConverter.convertImport(impt)); newDesc.getTypes().getImportedSchemas().clear(); newDesc.getTypes().getImportedSchemas().addAll(newImportedSchemas); } else { throw new WSDLException("the schema converter is not setted");
@SuppressWarnings("unchecked") public Element getElement() { Element res = null; Element item = null; AbsItfDescription desc = null; if(parent instanceof AbstractParamImpl) { desc = ((AbstractInterfaceTypeImpl) ((AbstractOperationImpl) ((AbstractParamImpl) this.parent) .getOperation()).getInterface()).getDescription(); } if(parent instanceof MessageImpl) { desc = ((MessageImpl)parent).getDescription(); } final Types types = (Types) desc.getTypes(); if (this.elementName != null) { for (final Schema schema : types.getSchemas()) { item = schema.getElement(this.elementName); if (item != null) { res = item; break; } } } return res; }
desc = ((MessageImpl)parent).getDescription(); final Types types = (Types) desc.getTypes(); if (this.typeName != null) { if ((types != null) && (types.getSchemas() != null)) {