Package org.eclipse.emf.ecore.resource

Examples of org.eclipse.emf.ecore.resource.Resource.load()


    Resource resource = resourceSet.createResource(XML_URI);
    if (options != null)
    {
      Map<Object, Object> mergedOptions = new HashMap<Object, Object>(loadOptions);
      mergedOptions.putAll(options);
      resource.load(is, mergedOptions);
    }
    else
    {
      resource.load(is, loadOptions);
    }
View Full Code Here


      mergedOptions.putAll(options);
      resource.load(is, mergedOptions);
    }
    else
    {
      resource.load(is, loadOptions);
    }
    resourceSet.getPackageRegistry().putAll(registry);
    return resource;
  }
View Full Code Here

    } else {
      ddddResource = resourceSet.createResource(URI.createURI(filePath));
    }

    try {
      ddddResource.load(new ByteArrayInputStream(bytes), null);
    } catch (UnsupportedEncodingException e) {
      // TODO Auto-generated catch block
      throw new FixFlowException("定义文件加载失败!", e);
    } catch (IOException e) {
      // TODO Auto-generated catch block
View Full Code Here

            filePath = java.net.URLDecoder.decode(url.getFile(),"utf-8");
            ddddResource = resourceSet.createResource(URI.createFileURI(filePath));
          } else {
            ddddResource = resourceSet.createResource(URI.createURI(filePath));
          }
          ddddResource.load(new ByteArrayInputStream(bytes), null);
        } catch (Exception e) {
          throw new FixFlowClassLoadingException(ExceptionCode.CLASSLOAD_EXCEPTION, e);
        }
        DefinitionsBehavior definitions = (DefinitionsBehavior) ddddResource.getContents().get(0).eContents().get(0);
        definitions.setProcessId(processId);
View Full Code Here

    // TODO Auto-generated method stub
    Bpmn2ResourceFactoryImpl ddd = new Bpmn2ResourceFactoryImpl();
 
    Resource ddddResource = ddd.createResource(URI.createFileURI("/Users/jiangnan/Documents/MyCode/irondino/fixlogic/app/modules/lhl002/bpmn/testflow.bpmn"));

    ddddResource.load( null);
    Definitions myWeb = (Definitions) ddddResource.getContents().get(0).eContents().get(0);
    Object dddObject = myWeb;

    List<BPMNDiagram> BPMNDiagramList = myWeb.getDiagrams();
    float maxX=0;
View Full Code Here

      // register package in local resource registry
      resourceSet.getPackageRegistry().put(CoreconfigPackage.eINSTANCE.getNsURI(), CoreconfigPackage.eINSTANCE);
      // load resource
      try {
        resource.load(null);
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        throw new FixFlowException("流程配置文件加载失败", e);
      }
View Full Code Here

        resource = resourceSet.createResource(URI.createFileURI(filePath));
      } else {
        resource = resourceSet.createResource(URI.createURI(filePath));
      }
      resourceSet.getPackageRegistry().put(VariableconfigPackage.eINSTANCE.getNsURI(), VariableconfigPackage.eINSTANCE);
      resource.load(null);
    } catch (Exception e) {
      log.error("datavariableconfig.xml文件加载失败");
      throw new FixFlowException("datavariableconfig.xml文件加载失败", e);
    }
    dataVariableConfig = (DataVariableConfig) resource.getContents().get(0);
View Full Code Here

        resource = resourceSet.createResource(URI.createFileURI(filePath));
      } else {
        resource = resourceSet.createResource(URI.createURI(filePath));
      }
      resourceSet.getPackageRegistry().put(CoreconfigPackage.eINSTANCE.getNsURI(), CoreconfigPackage.eINSTANCE);
      resource.load(null);
    } catch (Exception e) {
      log.error("fixflowconfig.xml文件加载失败", e);
      throw new FixFlowClassLoadingException(ExceptionCode.CLASSLOAD_EXCEPTION,"fixflowconfig.xml", e);
    }
    fixFlowConfig = (FixFlowConfig) resource.getContents().get(0);
View Full Code Here

          try {
            Map options = new HashMap(
                GMFResourceFactory.getDefaultLoadOptions());
            // @see 171060
            // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
            resource.load(options);
          } catch (IOException e) {
            resource.unload();
            throw e;
          }
        }
View Full Code Here

          try {
            Map options = new HashMap(
                GMFResourceFactory.getDefaultLoadOptions());
            // @see 171060
            // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
            resource.load(options);
          } catch (IOException e) {
            resource.unload();
            throw 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.