de.unikoblenz.comicsii.ui.simulation.ctrl
Class SimulationSessionImpl

java.lang.Object
  extended by de.unikoblenz.comicsii.ui.simulation.ctrl.SimulationSessionImpl
All Implemented Interfaces:
SimulationManipulator, SimulationProjectStructure, SimulationSession

public class SimulationSessionImpl
extends java.lang.Object
implements SimulationSession

Author:
cbu Realisiert alle GUI-Gestützen Prozesse

Field Summary
 
Fields inherited from interface de.unikoblenz.comicsii.ui.simulation.ctrl.SimulationProjectStructure
PACKAGE_JSIM_CUSTOM, PACKAGE_JSIM_DOMAIN, PACKAGE_JSIM_EVENTS, PACKAGE_JSIM_RANDOM, PACKAGE_JSIM_SIMULATION, PACKAGE_JSIM_START, PACKAGE_JSIM_TABLES
 
Constructor Summary
SimulationSessionImpl(java.lang.String aProjectName)
           
 
Method Summary
 org.eclipse.jdt.core.ICompilationUnit createEventClass(java.lang.String aName, java.lang.String aSubjectClass, java.util.List<RoleDescriptor> aRoleDescriptorList)
          Erzeugt ein SimEvent
 org.eclipse.jdt.core.ICompilationUnit createSimpleClass(java.lang.String className)
          Erzeugt eine einfache Java-Klasse
 org.eclipse.jdt.core.ICompilationUnit createTableClass(java.lang.String aTableClassName, boolean aCSVImportFlag, boolean aXMLImportFlag)
          Erzeugt eine statistische Klasse
 org.eclipse.jdt.core.IPackageFragment getCustomPackageFragment()
          Liefert das Package mit allen für den Benutzer generierten Klassen (auch Unter-Packages)
 DatabaseManager getDatabaseManager()
          Liefert die Anbindung zur Datenbank in Form eines DatabaseManagers
 org.eclipse.jdt.core.IPackageFragment getDomainPackageFragment()
          Liefert das Domain-Package (Hibernate-Klassen)
 org.eclipse.jdt.core.IPackageFragment getEventPackageFragment()
          Liefert das SimEvent-Package
 org.eclipse.jdt.core.IJavaProject getJavaProject()
          Liefert das JavaProject
 java.lang.String getLibraryPath()
          Liefert den Pfad zu den Bibliotheken
 java.lang.String getName()
          Liefert den Namen des Simulationsprojektes
 ProjectDescriptor getProjectDescriptor()
          Liefert die Projekt-Beschreibung
 org.eclipse.jdt.core.IPackageFragmentRoot getRootPackage()
          Liefert das Wurzelverzeichnis
 org.eclipse.jdt.core.IType getSimulationExecuter()
          Liefert die Startklasse für die Simulation
 org.eclipse.jdt.core.IPackageFragment getSimulationPackageFragment()
          Liefert das Simulations-Package
 org.eclipse.jdt.core.IPackageFragment getTablesPackageFragment()
          Liefert das Tables-Package (statistische Objekte)
 void initialise()
          Initialisiert die SimulationSession
 void reBuildProject()
          Kompiliert das Projekt neu
 void removeJavaClass(org.eclipse.jdt.core.IJavaElement currentElement)
          Löscht eine Klasse
 void removeTableClass(org.eclipse.jdt.core.IJavaElement currentElement)
          Löscht eine statistische Klasse
 void startImportData(boolean aSchemaUpdateFlag)
          Startet den Import-Vorgang von Daten aus einer Datei in die Datenbank
 void startSimulation()
          Startet die Simulation
 void storeProjectInformation(org.eclipse.core.resources.IProject aProject, ProjectDescriptor aDescr, boolean aGenerateProjectStructure)
          Speichert die Projektbeschreibung als Datei ab
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulationSessionImpl

public SimulationSessionImpl(java.lang.String aProjectName)
Parameters:
aProjectName: - != null Initialiserung mit Projektname = Projektordner
Method Detail

getName

public java.lang.String getName()
Description copied from interface: SimulationSession
Liefert den Namen des Simulationsprojektes

Specified by:
getName in interface SimulationSession
Returns:
String: != null

getLibraryPath

public java.lang.String getLibraryPath()
Description copied from interface: SimulationSession
Liefert den Pfad zu den Bibliotheken

Specified by:
getLibraryPath in interface SimulationSession
Returns:
String: != null

initialise

public void initialise()
                throws SimulationException
Description copied from interface: SimulationSession
Initialisiert die SimulationSession

Specified by:
initialise in interface SimulationSession
Throws:
SimulationException

getJavaProject

public org.eclipse.jdt.core.IJavaProject getJavaProject()
Description copied from interface: SimulationProjectStructure
Liefert das JavaProject

Specified by:
getJavaProject in interface SimulationProjectStructure
Returns:
IJavaProject: != null

getDatabaseManager

public DatabaseManager getDatabaseManager()
Description copied from interface: SimulationSession
Liefert die Anbindung zur Datenbank in Form eines DatabaseManagers

Specified by:
getDatabaseManager in interface SimulationSession
Returns:
DatabaseManager: != null

getCustomPackageFragment

public org.eclipse.jdt.core.IPackageFragment getCustomPackageFragment()
Description copied from interface: SimulationProjectStructure
Liefert das Package mit allen für den Benutzer generierten Klassen (auch Unter-Packages)

Specified by:
getCustomPackageFragment in interface SimulationProjectStructure
Returns:
IPackageFragment:->null

getEventPackageFragment

public org.eclipse.jdt.core.IPackageFragment getEventPackageFragment()
Description copied from interface: SimulationProjectStructure
Liefert das SimEvent-Package

Specified by:
getEventPackageFragment in interface SimulationProjectStructure
Returns:
IPackageFragment:->null

getDomainPackageFragment

public org.eclipse.jdt.core.IPackageFragment getDomainPackageFragment()
Description copied from interface: SimulationProjectStructure
Liefert das Domain-Package (Hibernate-Klassen)

Specified by:
getDomainPackageFragment in interface SimulationProjectStructure
Returns:
IPackageFragment:->null

getSimulationPackageFragment

public org.eclipse.jdt.core.IPackageFragment getSimulationPackageFragment()
Description copied from interface: SimulationProjectStructure
Liefert das Simulations-Package

Specified by:
getSimulationPackageFragment in interface SimulationProjectStructure
Returns:
IPackageFragment:->null

getTablesPackageFragment

public org.eclipse.jdt.core.IPackageFragment getTablesPackageFragment()
Description copied from interface: SimulationProjectStructure
Liefert das Tables-Package (statistische Objekte)

Specified by:
getTablesPackageFragment in interface SimulationProjectStructure
Returns:
IPackageFragment:->null

getRootPackage

public org.eclipse.jdt.core.IPackageFragmentRoot getRootPackage()
                                                         throws org.eclipse.jdt.core.JavaModelException
Description copied from interface: SimulationProjectStructure
Liefert das Wurzelverzeichnis

Specified by:
getRootPackage in interface SimulationProjectStructure
Returns:
IPackageFragmentRoot: != null
Throws:
org.eclipse.jdt.core.JavaModelException

reBuildProject

public void reBuildProject()
                    throws SimulationException
Description copied from interface: SimulationSession
Kompiliert das Projekt neu

Specified by:
reBuildProject in interface SimulationSession
Throws:
SimulationException

startImportData

public void startImportData(boolean aSchemaUpdateFlag)
                     throws SimulationException
Description copied from interface: SimulationSession
Startet den Import-Vorgang von Daten aus einer Datei in die Datenbank

Specified by:
startImportData in interface SimulationSession
Throws:
SimulationException

startSimulation

public void startSimulation()
                     throws SimulationException
Description copied from interface: SimulationSession
Startet die Simulation

Specified by:
startSimulation in interface SimulationSession
Throws:
SimulationException

getSimulationExecuter

public org.eclipse.jdt.core.IType getSimulationExecuter()
Description copied from interface: SimulationProjectStructure
Liefert die Startklasse für die Simulation

Specified by:
getSimulationExecuter in interface SimulationProjectStructure
Returns:
IType: -> null

createEventClass

public org.eclipse.jdt.core.ICompilationUnit createEventClass(java.lang.String aName,
                                                              java.lang.String aSubjectClass,
                                                              java.util.List<RoleDescriptor> aRoleDescriptorList)
Description copied from interface: SimulationManipulator
Erzeugt ein SimEvent

Specified by:
createEventClass in interface SimulationManipulator
Returns:
ICompilationUnit: != null

createTableClass

public org.eclipse.jdt.core.ICompilationUnit createTableClass(java.lang.String aTableClassName,
                                                              boolean aCSVImportFlag,
                                                              boolean aXMLImportFlag)
Description copied from interface: SimulationManipulator
Erzeugt eine statistische Klasse

Specified by:
createTableClass in interface SimulationManipulator
Returns:
ICompilationUnit: != null

getProjectDescriptor

public ProjectDescriptor getProjectDescriptor()
Description copied from interface: SimulationSession
Liefert die Projekt-Beschreibung

Specified by:
getProjectDescriptor in interface SimulationSession
Returns:
ProjectDescriptor: != null

removeTableClass

public void removeTableClass(org.eclipse.jdt.core.IJavaElement currentElement)
Description copied from interface: SimulationManipulator
Löscht eine statistische Klasse

Specified by:
removeTableClass in interface SimulationManipulator

createSimpleClass

public org.eclipse.jdt.core.ICompilationUnit createSimpleClass(java.lang.String className)
Description copied from interface: SimulationManipulator
Erzeugt eine einfache Java-Klasse

Specified by:
createSimpleClass in interface SimulationManipulator
Returns:
ICompilationUnit: != null

removeJavaClass

public void removeJavaClass(org.eclipse.jdt.core.IJavaElement currentElement)
Description copied from interface: SimulationManipulator
Löscht eine Klasse

Specified by:
removeJavaClass in interface SimulationManipulator

storeProjectInformation

public void storeProjectInformation(org.eclipse.core.resources.IProject aProject,
                                    ProjectDescriptor aDescr,
                                    boolean aGenerateProjectStructure)
                             throws SimulationException
Description copied from interface: SimulationManipulator
Speichert die Projektbeschreibung als Datei ab

Specified by:
storeProjectInformation in interface SimulationManipulator
Throws:
SimulationException