Examples of BPELResource


Examples of org.eclipse.bpel.model.resource.BPELResource

   * @return the prefix map.
   */
  @SuppressWarnings("unchecked")
  public static Map getAllNamespacesForContext(EObject eObject) {
    Map nsMap = new HashMap();
    BPELResource resource = (BPELResource)eObject.eResource();
    EObject context = eObject;
   
    while (context != null) {
      Map localNSMap = resource.getPrefixToNamespaceMap(context);
      if (!localNSMap.isEmpty()) {
        for (Iterator i=localNSMap.entrySet().iterator(); i.hasNext(); ) {
          Map.Entry entry = (Map.Entry)i.next();
          if (!nsMap.containsKey(entry.getKey()))
            nsMap.put(entry.getKey(), entry.getValue());
View Full Code Here

Examples of org.eclipse.bpel.model.resource.BPELResource

        //javax.xml.transform.Result result = bpelOutputResolver.createBpelOutput(process.getTargetNamespace(), fileName);
        javax.xml.transform.Result result = createBpelOutput(process.getTargetNamespace(), fileName);
        if(result instanceof StreamResult) {           
          final OutputStream outstream = ((StreamResult)result).getOutputStream();         
          URI uri = URI.createPlatformResourceURI(fileName);
          BPELResource resource =  (org.eclipse.bpel.model.resource.BPELResource)brsf.createResource(uri);
          fixPartnerLinkPrefixes(resource,process,namespacePrefix);
          resource.getContents().add(process);
          HashSet<XSDSchema> schemaDeps = processSchemaDeps.get(process);
          for (XSDSchema schema : schemaDeps){
            resource.getPrefixToNamespaceMap().put(schemaNsPrefixMap.get(schema.getTargetNamespace()), schema.getTargetNamespace());
          }
          resource.getPrefixToNamespaceMap().put("bpel", BPELConstants.NAMESPACE);
          resource.getPrefixToNamespaceMap().put(XML_SCHEMA_NAMESPACE_PREFIX,XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
          resource.getPrefixToNamespaceMap().put(WSDL_PREFIX,WSDL_NAMESPACE);
         
          process.updateElement();
          //write(process.getElement(),outstream);
         
          resource.save(outstream,Collections.EMPTY_MAP);         
          //if (outputToConsole)
          //  resource.save(System.out, Collections.EMPTY_MAP);
         
        }
      } catch (Exception e){       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.