Examples of EcoreResourceFactoryImpl


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

  }

  private EObject getDomainRootElement(URI uri) {
    ResourceSet resourceSet = new ResourceSetImpl();
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
        .put("*", new EcoreResourceFactoryImpl()); //$NON-NLS-1$

    Resource resource = resourceSet.getResource(uri, true);
    return resource.getContents().get(0);
  }
View Full Code Here

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

    ResourceSet resourceSet = new ResourceSetImpl();
    /*
     * Register XML Factory implementation using DEFAULT_EXTENSION
     */
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
        .put("ecore", new EcoreResourceFactoryImpl());
   
    Resource resource = resourceSet.createResource(URI.createURI("buildin.ecore"));
    resource.getContents().add(pkg);
    resource.save(new FileOutputStream(new File("./target/buildin.ecore")), null);
  }
View Full Code Here

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

  private static void initEMF() {
    EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE);
    EPackage.Registry.INSTANCE.put(JexPackage.eNS_URI, JexPackage.eINSTANCE);

    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
    //    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("jex", new JexResource.Factory());
  }
View Full Code Here

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

     
      Resource.Factory factory = Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.datagraph"));
      result.put("datagraph", factory instanceof DataGraphResourceFactoryImpl ? factory : new DataGraphResourceFactoryImpl());

      factory = Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.ecore"));
      result.put("ecore", factory instanceof EcoreResourceFactoryImpl ? factory : new EcoreResourceFactoryImpl());
     
      factory = Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.emof"));
      result.put("emof", factory instanceof EMOFResourceFactoryImpl ? factory : new EMOFResourceFactoryImpl());

      factory = Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.xsd"));
 
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.