Package org.eclipse.emf.ecore.resource

Examples of org.eclipse.emf.ecore.resource.ResourceSet.createResource()


        ((DataGraphImpl)dataGraph).setERootObject((EObject)rootObject);
    }

    public static DataGraph loadDataGraph(InputStream inputStream, Map options) throws IOException {
        ResourceSet resourceSet = DataObjectUtil.createResourceSet();
        Resource resource = resourceSet.createResource(URI.createURI("all.datagraph"));
        resource.load(inputStream, options);
        return (DataGraph)resource.getContents().get(0);
    }

    static final Object LOADING_SCOPE = XMLResource.OPTION_EXTENDED_META_DATA;
View Full Code Here


        for (Iterator iterator = packages.iterator(); iterator.hasNext();) {
            EPackage typePackage = (EPackage)iterator.next();
            Resource resource = typePackage.eResource();
            if (resource == null) {
                resource = resourceSet.createResource(URI.createURI(".ecore"));
                resource.setURI(URI.createURI(typePackage.getNsURI()));
                resource.getContents().add(typePackage);
            } else if (resource.getResourceSet() != resourceSet)
                resourceSet.getResources().add(resource);
        }
View Full Code Here

    HashMap<String, Boolean> m_oOptions;
   
    // construction
    Configuration.defaultConfig();
    m_oResourceSet = new ResourceSetImpl();
    m_oResourceEcoreOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getEcoreOutput("ecore1")));
//    m_oResourceEcoreOut2= m_oResourceSet.createResource(
//        URI.createFileURI(
//            Configuration.getEcoreOutput("ecore2")));
View Full Code Here

        URI.createFileURI(
            Configuration.getEcoreOutput("ecore1")));
//    m_oResourceEcoreOut2= m_oResourceSet.createResource(
//        URI.createFileURI(
//            Configuration.getEcoreOutput("ecore2")));
    m_oResourceXMIOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getXMIOutput()));
    m_oOptions = new HashMap<String, Boolean>();
    m_oOptions.put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
View Full Code Here

    HashMap<String, Boolean> m_oOptions;
   
    // construction
    Configuration.defaultConfig();
    m_oResourceSet = new ResourceSetImpl();
    m_oResourceEcoreOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getEcoreOutput("ecore1")));
    m_oResourceXMIOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getXMIOutput()));
View Full Code Here

    Configuration.defaultConfig();
    m_oResourceSet = new ResourceSetImpl();
    m_oResourceEcoreOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getEcoreOutput("ecore1")));
    m_oResourceXMIOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getXMIOutput()));
    m_oOptions = new HashMap<String, Boolean>();
    m_oOptions.put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
View Full Code Here

    HashMap<String, Boolean> m_oOptions;

    // construction
    Configuration.defaultConfig();
    m_oResourceSet = new ResourceSetImpl();
    m_oResourceEcoreOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getEcoreOutput()));
    m_oResourceXMIOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getXMIOutput()));
View Full Code Here

    Configuration.defaultConfig();
    m_oResourceSet = new ResourceSetImpl();
    m_oResourceEcoreOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getEcoreOutput()));
    m_oResourceXMIOut= m_oResourceSet.createResource(
        URI.createFileURI(
            Configuration.getXMIOutput()));
    m_oOptions = new HashMap<String, Boolean>();
    m_oOptions.put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
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

        .setCharset(diagramFile);
    affectedFiles.add(diagramFile);
    URI diagramModelURI = URI.createPlatformResourceURI(diagramFile
        .getFullPath().toString(), true);
    ResourceSet resourceSet = myEditingDomain.getResourceSet();
    final Resource diagramResource = resourceSet
        .createResource(diagramModelURI);
    AbstractTransactionalCommand command = new AbstractTransactionalCommand(
        myEditingDomain,
        eu.admire.visual.pmml.neuralnetwork._40.diagram.part.Messages.PMMLNewDiagramFileWizard_InitDiagramCommand,
        affectedFiles) {
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.