Package org.eclipse.emf.ecore.xmi.impl

Examples of org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl


   *            file to write the Model to
   */
  protected static void save(EList<? extends EObject> model, String fileName) {
    UMLResourcesUtil.init(RESOURCE_SET); // MDT/UML2 4.0.0 (Juno)
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
        "xmi", new XMIResourceFactoryImpl()); //$NON-NLS-1$
    Resource resource = RESOURCE_SET.createResource(URI
        .createFileURI(fileName));
    resource.getContents().addAll(model);

    try {
View Full Code Here


   
    // Register the appropriate resource factory to handle all file extensions.
    //
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
      (Resource.Factory.Registry.DEFAULT_EXTENSION,
       new XMIResourceFactoryImpl());

    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put
      (SmartGenPackage.eNS_URI,
View Full Code Here

   
    // Register the appropriate resource factory to handle all file extensions.
    //
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
      (Resource.Factory.Registry.DEFAULT_EXTENSION,
       new XMIResourceFactoryImpl());

    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put
      (MessagePackage.eNS_URI,
View Full Code Here

   
    // Register the appropriate resource factory to handle all file extensions.
    //
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
      (Resource.Factory.Registry.DEFAULT_EXTENSION,
       new XMIResourceFactoryImpl());

    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put
      (QvtAstPackage.eNS_URI,
View Full Code Here

    // Register the XMI resource factory for the .website extension

    Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
    Map<String, Object> m = reg.getExtensionToFactoryMap();
    m.put("xml", new XMIResourceFactoryImpl());

    // Obtain a new resource set
    FlowConnectorResourceImpl resource = new FlowConnectorResourceImpl(URI
        .createURI("website/My1.xml"));
View Full Code Here

   
    // Register the XMI resource factory for the .website extension

    Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
    Map<String, Object> m = reg.getExtensionToFactoryMap();
    m.put("xml", new XMIResourceFactoryImpl());

    // Obtain a new resource set
    ResourceSet resSet = new ResourceSetImpl();

    // Get the resource
View Full Code Here

    // Register the XMI resource factory for the .website extension

    Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
    Map<String, Object> m = reg.getExtensionToFactoryMap();
    m.put("xml", new XMIResourceFactoryImpl());

    // Obtain a new resource set
    FlowConnectorResourceImpl resource = new FlowConnectorResourceImpl(URI
        .createURI("website/My1.xml"));
View Full Code Here

   
    // Register the XMI resource factory for the .website extension

    Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
    Map<String, Object> m = reg.getExtensionToFactoryMap();
    m.put("xml", new XMIResourceFactoryImpl());

    // Obtain a new resource set
    ResourceSet resSet = new ResourceSetImpl();

    // Get the resource
View Full Code Here

    this.resourcePathConfig = getFixFlowConfig().getResourcePathConfig();
  }

  private void initDataVariableConfig() {
    ResourceSet resourceSet = new ResourceSetImpl();
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xml", new XMIResourceFactoryImpl());
    String classPath = getDataVariableConfigPath();
    URL url = this.getClass().getClassLoader().getResource(classPath);
    if(url == null){
      log.error("未能从{}目录下加载到datavariableconfig文件",classPath);
      throw new FixFlowClassLoadingException(ExceptionCode.CLASSLOAD_EXCEPTION_FILENOTFOUND, classPath);
View Full Code Here

    }
  }

  protected void initEmfFile() {
    ResourceSet resourceSet = new ResourceSetImpl();
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xml", new XMIResourceFactoryImpl());
    InputStream inputStream = null;
    String classPath = "config/fixflowconfig.xml";
    inputStream = ReflectUtil.getResourceAsStream("fixflowconfig.xml");
    if (inputStream != null) {
      classPath = "fixflowconfig.xml";
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl

Copyright © 2018 www.massapicom. 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.