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

Examples of org.eclipse.emf.ecore.resource.impl.ResourceSetImpl


   

  public static String toPMML(String dott) throws IOException {
    // Create a resource set to hold the resources.
    //
    ResourceSet resourceSet = new ResourceSetImpl();

    // Register the appropriate resource factory to handle all file
    // extensions.
    //
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
        .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
            new _40ResourceFactoryImpl());
   
   
    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put(_40Package.eNS_URI,
        _40Package.eINSTANCE);

    TreeBuild builder = new TreeBuild();     
    Node nodeOfWeka = builder.create(new StringReader(dott));

    Resource resource = resourceSet.createResource(URI.createURI("http://www.admire-project.eu/PMML-4_0"));
   
    DocumentRoot documentRoot = _40Factory.eINSTANCE.createDocumentRoot();
   
    PMMLType pmml = _40Factory.eINSTANCE.createPMMLType();
    pmml.setVersion("4.0");
View Full Code Here


 
  public static DispelResource read(String regFile) {
   
    DispelResourceFactory factory = new DispelResourceFactory();           
   
    ResourceSet rs = new ResourceSetImpl();
     
    rs.getResourceFactoryRegistry().getExtensionToFactoryMap().put(
        "dispel", factory);                       
   
    DispelResource resource = null;

    try {

      resource = (DispelResource) rs.getResource(
          URI.createFileURI(regFile), true);

      for (Diagnostic d: resource.getErrors()) {
        Activator.logWarning(("Error reading " + d.getLocation() + " " +
            d.getLine() + ":" + d.getColumn() + " " +
View Full Code Here

          @Override
          protected void execute(IProgressMonitor progressMonitor) {
            try {
              // Create a resource set
              //
              ResourceSet resourceSet = new ResourceSetImpl();

              // Get the URI of the model file.
              //
              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

          @Override
          protected void execute(IProgressMonitor progressMonitor) {
            try {
              // Create a resource set
              //
              ResourceSet resourceSet = new ResourceSetImpl();

              // Get the URI of the model file.
              //
              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

          @Override
          protected void execute(IProgressMonitor progressMonitor) {
            try {
              // Create a resource set
              //
              ResourceSet resourceSet = new ResourceSetImpl();

              // Get the URI of the model file.
              //
              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

  /**
   * @generated
   */
  public void run(IAction action) {

    ResourceSet rs = new ResourceSetImpl();

    Resource resource = rs.getResource(fileURI, true);

    try {

      resource.load(Collections.EMPTY_MAP);

View Full Code Here

   
    System.out.println("SS " + file);
   
    fileURI = URI.createFileURI(file); //  .createPlatformResourceURI(file,true);
   
    ResourceSet rs = new ResourceSetImpl();

    Resource resource = rs.getResource(fileURI, true);

    try {

      resource.load(Collections.EMPTY_MAP);
View Full Code Here

          @Override
          protected void execute(IProgressMonitor progressMonitor) {
            try {
              // Create a resource set
              //
              ResourceSet resourceSet = new ResourceSetImpl();

              // Get the URI of the model file.
              //
              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

          @Override
          protected void execute(IProgressMonitor progressMonitor) {
            try {
              // Create a resource set
              //
              ResourceSet resourceSet = new ResourceSetImpl();

              // Get the URI of the model file.
              //
              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

          @Override
          protected void execute(IProgressMonitor progressMonitor) {
            try {
              // Create a resource set
              //
              ResourceSet resourceSet = new ResourceSetImpl();

              // Get the URI of the model file.
              //
              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

TOP

Related Classes of org.eclipse.emf.ecore.resource.impl.ResourceSetImpl

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.