Package org.eclipse.emf.ecore.resource.impl

Examples of org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.createResource()


              //
              URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);

              // Create a resource for this file.
              //
              Resource resource = resourceSet.createResource(fileURI);

              // Add the initial model object to the contents.
              //
              EObject rootObject = createInitialModel();
              if (rootObject != null)
View Full Code Here


              //
              URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);

              // Create a resource for this file.
              //
              Resource resource = resourceSet.createResource(fileURI);

              // Add the initial model object to the contents.
              //
              EObject rootObject = createInitialModel();
              if (rootObject != null) {
View Full Code Here

              //
              URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);

              // Create a resource for this file.
              //
              Resource resource = resourceSet.createResource(fileURI);

              // Add the initial model object to the contents.
              //
              EObject rootObject = createInitialModel();
              if (rootObject != null) {
View Full Code Here

              //
              URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);

              // Create a resource for this file.
              //
              Resource resource = resourceSet.createResource(fileURI);

              // Add the initial model object to the contents.
              //
              EObject rootObject = createInitialModel();
              if (rootObject != null) {
View Full Code Here

              //
              URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);

              // Create a resource for this file.
              //
              Resource resource = resourceSet.createResource(fileURI);

              // Add the initial model object to the contents.
              //
              EObject rootObject = createInitialModel();
              if (rootObject != null) {
View Full Code Here

        .put("*", new XMLResourceFactoryImpl());

    /*
     * Create empty resource with the given URI
     */
    Resource resource = resourceSet.createResource(URI
        .createURI(eCodeOutputFile));

    /*
     * Add bookStoreObject to contents list of the resource
     */
 
View Full Code Here

        .put("*", new XMLResourceFactoryImpl());

    /*
     * Create empty resource with the given URI
     */
    Resource resource = resourceSet.createResource(URI
        .createURI(eCodeOutputFile));

    /*
     * Add bookStoreObject to contents list of the resource
     */
 
View Full Code Here

        try {
            parser.nextToken(); // open the object
            ResourceSet rSet = new ResourceSetImpl();
            rSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("bpmn2",
                    new Bpmn2ResourceFactoryImpl());
            Resource bpmn2 = rSet.createResource(URI.createURI("virtual.bpmn2"));
            rSet.getResources().add(bpmn2);
            _currentResource = bpmn2;
            // do the unmarshalling now:
            Definitions def = (Definitions) unmarshallItem(parser);
            reconnectFlows();
View Full Code Here

     */
    public static final XSDImport importSchema( XSDSchema schema, final XSDSchema importee ) throws IOException {
        Resource resource = schema.eResource();
        if ( resource == null ) {
            final ResourceSet resourceSet = new ResourceSetImpl();
            resource = (XSDResourceImpl) resourceSet.createResource(URI.createURI(".xsd"));
            resource.getContents().add( schema );
        }
       
        XSDImport imprt = XSDFactory.eINSTANCE.createXSDImport();
        imprt.setNamespace( importee.getTargetNamespace() );
View Full Code Here

        // If there are no arguments, emit an appropriate usage message.
        //
        if (args.length == 0) {
            System.out.println("Enter a list of file paths or URIs that have content like this:"); //$NON-NLS-1$
            try {
                Resource resource = resourceSet.createResource(URI.createURI("http:///My.xmi")); //$NON-NLS-1$
                EFeatureData<?, ?> root = EFeatureTestsFactory.eINSTANCE.createEFeatureData();
                resource.getContents().add(root);
                resource.save(System.out, null);
            }
            catch (IOException exception) {
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.