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

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


    // create resource set and resource
    ResourceSet resourceSet = new ResourceSetImpl();

    // Register XML resource factory
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
        .put("xmi", new XMIResourceFactoryImpl());

    URI uri = URI.createFileURI(fileName);
    Resource resource = resourceSet.createResource(uri);

    try {
View Full Code Here


   */
  public static TypeSystemDescription ecore2UimaTypeSystem(String aEcoreFilePath, Map aOptions)
          throws URISyntaxException {
    // register default resource factory
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*",
            new XMIResourceFactoryImpl());
    // create resource set to hold the resource we're loading and its dependent resources
    ResourceSet resourceSet = new ResourceSetImpl();
    // convert file path to absolute path -- seems to be required for propery proxy resolution
    File inputFile = new File(aEcoreFilePath);
    URI absoluteInputURI = URI.createFileURI(inputFile.getAbsolutePath());
View Full Code Here

      if (writeEcoreTypeSystem && !isModelGenerated) {
        TypeSystemDescription tsDesc = TypeSystemUtil.typeSystem2TypeSystemDescription(aCas
                .getTypeSystem());
        // register default resource factory
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*",
                new XMIResourceFactoryImpl());
        ResourceSet resourceSet = new ResourceSetImpl();
        URI outputURI = URI.createFileURI(new File(mOutputDir, "typesystem.ecore")
                .getAbsolutePath());
        Resource outputResource = resourceSet.createResource(outputURI);
        schemaLocationMap = new HashMap();
View Full Code Here

   * filename of the Ecore/XMI file to generate.
   */
  public static void main(String[] args) throws Exception {
    // register default resource factory
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*",
            new XMIResourceFactoryImpl());

    ResourceSet resourceSet = new ResourceSetImpl();
    URI outputURI = URI.createFileURI(args[1]);
    Resource outputResource = resourceSet.createResource(outputURI);
    Map options = new HashMap();
View Full Code Here

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

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

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

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

  public void testPutModel() throws Exception {
    File secFile = new File("D:/home/gpirogov/work/jresearch/flexess/sum/1.0.0/com.jresearchsoft.uam.sum.app/src/main/java/com.jresearchsoft.uam.sum.uam");
    ResourceSet resourceSet = new ResourceSetImpl();

    // Register the default resource factory -- only needed for stand-alone!
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
    resourceSet.getPackageRegistry().put(UamPackage.eNS_URI, UamPackage.eINSTANCE);
    resourceSet.getPackageRegistry().put(ExpressionPackage.eNS_URI, ExpressionPackage.eINSTANCE);
    URI securityFileURI = URI.createFileURI(secFile.getAbsolutePath());

    Resource secResource = resourceSet.getResource(securityFileURI, true);
View Full Code Here

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

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

    this.model = model;
  }

  private static SecurityModel read(String modelString) throws IOException {
    ResourceSet resourceSet = new ResourceSetImpl();
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
    Resource xmlResource = resourceSet.createResource(URI.createURI("dummy.deploy")); //$NON-NLS-1$
    // Register the package -- only needed for stand-alone!
    resourceSet.getPackageRegistry().put(UamPackage.eNS_URI, UamPackage.eINSTANCE);
    resourceSet.getPackageRegistry().put(ExpressionPackage.eNS_URI, ExpressionPackage.eINSTANCE);
    resourceSet.getPackageRegistry().put(StdlibPackage.eNS_URI, StdlibPackage.eINSTANCE);
View Full Code Here

  private String write() throws IOException {
    ResourceSet resourceSet = new ResourceSetImpl();

    // Register the default resource factory -- only needed for stand-alone!
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());

    // Create a resource for this file.
    Resource resource = resourceSet.createResource(URI.createURI("dummy.deploy")); //$NON-NLS-1$

    // Add the book and writer objects to the contents.
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.