org.eclipse.ocl.examples.standalone
Class StandaloneApplication

java.lang.Object
  extended by org.eclipse.ocl.examples.standalone.StandaloneApplication
All Implemented Interfaces:
org.eclipse.equinox.app.IApplication

public class StandaloneApplication
extends java.lang.Object
implements org.eclipse.equinox.app.IApplication

This class executes an OCL evaluation of a model with one or several OCL file(s). This class is intended to be used only in Standalone mode. The result may be saved in a XMI file or exported as a HTML report.

Noextend:
This class is not intended to be subclassed by clients.
Noinstantiate:
This class is not intended to be instantiated by clients.

Field Summary
 
Fields inherited from interface org.eclipse.equinox.app.IApplication
EXIT_OK, EXIT_RELAUNCH, EXIT_RESTART
 
Constructor Summary
StandaloneApplication()
           
 
Method Summary
 void doCompleteOCLSetup()
          Initializes all the needed resource factories to create ecore and ocl resources in the global registry.
 StandaloneResponse execute(java.lang.String[] args)
          This launch the application using the entered arguments.
 java.util.Collection<StandaloneCommand> getCommands()
           
 org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
           
 org.eclipse.emf.ecore.resource.Resource loadModelFile(org.eclipse.emf.common.util.URI fileUri)
          Loads a file and returns The loaded resource.
 org.eclipse.emf.ecore.resource.Resource loadOCLFile(org.eclipse.emf.common.util.URI oclUri)
          Loads a file and returns The loaded resource.
 java.lang.Object start(org.eclipse.equinox.app.IApplicationContext context)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandaloneApplication

public StandaloneApplication()
Method Detail

doCompleteOCLSetup

public void doCompleteOCLSetup()
Initializes all the needed resource factories to create ecore and ocl resources in the global registry.


execute

@NonNull
public StandaloneResponse execute(@NonNull
                                          java.lang.String[] args)
This launch the application using the entered arguments.

Parameters:
args - the application arguments.
Returns:
the application return code.

getCommands

@NonNull
public java.util.Collection<StandaloneCommand> getCommands()

getResourceSet

@NonNull
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()

loadModelFile

public org.eclipse.emf.ecore.resource.Resource loadModelFile(org.eclipse.emf.common.util.URI fileUri)
Loads a file and returns The loaded resource.


loadOCLFile

public org.eclipse.emf.ecore.resource.Resource loadOCLFile(org.eclipse.emf.common.util.URI oclUri)
Loads a file and returns The loaded resource.


start

public java.lang.Object start(org.eclipse.equinox.app.IApplicationContext context)
Specified by:
start in interface org.eclipse.equinox.app.IApplication

stop

public void stop()
Specified by:
stop in interface org.eclipse.equinox.app.IApplication