Package org.eclipse.emf.ecore.resource

Examples of org.eclipse.emf.ecore.resource.Resource.load()


          try {
            Map options = new HashMap(GMFResourceFactory
                .getDefaultLoadOptions());
            // @see 171060
            // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
            resource.load(options);
          } catch (IOException e) {
            resource.unload();
            throw e;
          }
        }
View Full Code Here


          try {
            Map options = new HashMap(GMFResourceFactory
                .getDefaultLoadOptions());
            // @see 171060
            // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
            resource.load(options);
          } catch (IOException e) {
            resource.unload();
            throw e;
          }
        }
View Full Code Here

          try {
            Map options = new HashMap(
                GMFResourceFactory.getDefaultLoadOptions());
            // @see 171060
            // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
            resource.load(options);
          } catch (IOException e) {
            resource.unload();
            throw e;
          }
        }
View Full Code Here

   */
  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 i = changedResources.iterator(); i.hasNext(); ) {
        Resource resource = (Resource)i.next();
        if (resource.isLoaded()) {
          resource.unload();
          try {
            resource.load(Collections.EMPTY_MAP);
          }
          catch (IOException exception) {
            if (!resourceToDiagnosticMap.containsKey(resource)) {
              resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
            }
View Full Code Here

      for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
        Resource resource = (Resource)i.next();
        if (resource.isLoaded()) {
          resource.unload();
          try {
            resource.load(Collections.EMPTY_MAP);
          }
          catch (IOException exception) {
            if (!resourceToDiagnosticMap.containsKey(resource)) {
              resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
            }
View Full Code Here

            throw new RuntimeException("Missing serialized package: " + packageFilename);
        }
        URI uri = URI.createURI(url.toString());
        Resource resource = new EcoreResourceFactoryImpl().createResource(uri);
        try {
            resource.load(null);
        } catch (IOException exception) {
            throw new WrappedException(exception);
        }
        initializeFromLoadedEPackage(this, (EPackage) resource.getContents().get(0));
        createResource(eNS_URI);
View Full Code Here

      if (!filePath.startsWith("jar")) {
        ddddResource = resourceSet.createResource(URI.createFileURI(fixflowFilePath));
      } else {
        ddddResource = resourceSet.createResource(URI.createURI(filePath));
      }
      ddddResource.load(input, null);
    } catch (Exception e) {
      throw new FixFlowException(ExceptionCode.EXCEPTION_DEFAULT,e);
    }
    DefinitionsBehavior definitions = (DefinitionsBehavior) ddddResource.getContents().get(0).eContents().get(0);
    definitions.setProcessId(processKey);
View Full Code Here

        {
          if (!resource.isLoaded())
          {
            try
            {
              resource.load(resourceSet.getLoadOptions());
            }
            catch (IOException exception)
            {
              // Continue with a different approach.
            }
View Full Code Here

            {
              inputStream.close();
            }
            else
            {
              resource.load(inputStream, resourceSet.getLoadOptions());
            }
          }
          catch (IOException exception)
          {
            // Continue with a different approach.
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.