insensa
Class CModel

java.lang.Object
  extended by insensa.CModel

public class CModel
extends java.lang.Object


Field Summary
private  CRasterFileSet activeFileSet
           
private  CRasterFileInformation activeRasterFile
           
private  CUser activeUser
           
private  CConnectionManager connectionManager
           
private  CInfoManager infoManager
           
private  COptionManager optionManager
           
private  CXmlProperties properties
           
(package private)  java.lang.String separator
           
private  java.util.List<CUser> userList
           
 
Constructor Summary
CModel()
           
 
Method Summary
 CRasterFileSet addChildFileSet(CRasterFileSet targetFileSet, java.lang.String outputFileSetName, boolean serialization)
           
 CRasterFileSet addConnection(java.util.List<CRasterFileInformation> sourceFileList, CRasterFileSet outputFileSet, ConnectionFileChanger eCon, java.lang.String outputFileSetName, java.lang.String outputFileName)
           
 ConnectionFileChanger addConnection(java.util.List<CRasterFileInformation> sourceFileList, CRasterFileSet outputFileSet, java.lang.String connectoinName, java.lang.String outputFileSetName, java.lang.String outputFileName)
           
 void addFolderToFileSetByActive(java.lang.String path, boolean serialize)
           
 void addInfoToFileByActive(java.lang.String info)
          Adds a new InfoReader Onject to the active Raster File and solves the Dependencies by iterating this method.
 void addInfoToFileByFile(CRasterFileInformation file, java.lang.String info)
           
 void addOptionToFileByActive(java.lang.String option)
           
 void addOptionToFileByFile(CRasterFileInformation file, java.lang.String option)
           
 CRasterFileSet addSensitivityAnalysis(CRasterFileSet outputFileSet, java.lang.String newFileSetName, java.lang.String outputFileName, CIndexation prioritization)
           
 void addUser(CUser user)
          Adds an empty User (without Projects) has has defined a name and a workspace
 CUser addUser(java.lang.String user, java.lang.String workspace)
           
 CRasterFileSet createNewChildFileSet(CRasterFileSet parentFileSet, java.lang.String newFileSetName, boolean serialize)
           
 CRasterFileSet createNewFileSet(java.lang.String name, boolean serialize)
           
 void executeAllConnection(WorkerStatusList workerStatus)
           
 void executeFileOptionsOnActiveFile(WorkerStatusList workerStatusList)
          Execute All File Options on Active File.
 void executeInfoReaderOnActiveFile(java.lang.String iReaderName, WorkerStatusList mWorkerStatusList)
           
 void executeInformationReadersOnActiveFile(WorkerStatusList mWorkerStatusList)
           
 CProject getActiveProject()
           
 CRasterFileInformation getActiveRasterFileInformation()
           
 CRasterFileSet getActiveRasterFileSet()
           
 CUser getActiveUser()
           
 CConnectionManager getConnectionManager()
           
 CInfoManager getInfoManager()
           
 COptionManager getOptionManager()
           
 CXmlProperties getProperties()
          TODO Das ist NUR fuer das speichern des PluginCache entstanden (wird in CViewStartScreen gemacht)...
 java.util.List<CUser> getUsers()
           
 boolean openProject(CUser user, CProject project, WorkerStatus wStatus, java.util.List<IProjectListener> projectListener)
           
 int resolveOptionDependenciesOnActiveFile()
          Adds required InfoReader for all Options to the active File This function should be used before the options are executed.
 void setActiveRasterFile()
           
 void setActiveRasterFile(CRasterFileInformation activeRasterFile)
           
 void setActiveRasterFileSet(CRasterFileSet fileSet)
           
 void setActiveUser(CUser user)
           
 void testMethod()
           
 void writeNewFile(CRasterFileInformation file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activeUser

private CUser activeUser

userList

private java.util.List<CUser> userList

optionManager

private COptionManager optionManager

infoManager

private CInfoManager infoManager

connectionManager

private CConnectionManager connectionManager

activeFileSet

private CRasterFileSet activeFileSet

activeRasterFile

private CRasterFileInformation activeRasterFile

properties

private CXmlProperties properties

separator

java.lang.String separator
Constructor Detail

CModel

public CModel()
       throws java.io.IOException,
              org.jdom.JDOMException
Throws:
java.io.IOException
org.jdom.JDOMException
Method Detail

getProperties

public CXmlProperties getProperties()
TODO Das ist NUR fuer das speichern des PluginCache entstanden (wird in CViewStartScreen gemacht)... besser waehre eine Loesung mit Listener (MVC Violation)

Returns:
the properties

addChildFileSet

public CRasterFileSet addChildFileSet(CRasterFileSet targetFileSet,
                                      java.lang.String outputFileSetName,
                                      boolean serialization)
                               throws java.io.IOException,
                                      org.jdom.JDOMException,
                                      CRasterFileException
Parameters:
targetFileSet -
outputFileSetName -
serialization -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

addConnection

public CRasterFileSet addConnection(java.util.List<CRasterFileInformation> sourceFileList,
                                    CRasterFileSet outputFileSet,
                                    ConnectionFileChanger eCon,
                                    java.lang.String outputFileSetName,
                                    java.lang.String outputFileName)
                             throws java.io.IOException,
                                    org.jdom.JDOMException,
                                    CRasterFileException
Parameters:
sourceFileList -
outputFileSet -
eCon -
outputFileSetName -
outputFileName -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

addConnection

public ConnectionFileChanger addConnection(java.util.List<CRasterFileInformation> sourceFileList,
                                           CRasterFileSet outputFileSet,
                                           java.lang.String connectoinName,
                                           java.lang.String outputFileSetName,
                                           java.lang.String outputFileName)
                                    throws java.io.IOException,
                                           org.jdom.JDOMException,
                                           CRasterFileException
Parameters:
sourceFileList -
outputFileSet -
connectoinName -
outputFileSetName -
outputFileName -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

addFolderToFileSetByActive

public void addFolderToFileSetByActive(java.lang.String path,
                                       boolean serialize)
                                throws java.io.IOException,
                                       org.jdom.JDOMException
Parameters:
path -
serialize -
Throws:
java.io.IOException
org.jdom.JDOMException

addInfoToFileByActive

public void addInfoToFileByActive(java.lang.String info)
                           throws java.io.IOException
Adds a new InfoReader Onject to the active Raster File and solves the Dependencies by iterating this method.

Parameters:
info -
Throws:
java.io.IOException

addInfoToFileByFile

public void addInfoToFileByFile(CRasterFileInformation file,
                                java.lang.String info)
                         throws java.io.IOException
Parameters:
file -
info -
Throws:
java.io.IOException

addOptionToFileByActive

public void addOptionToFileByActive(java.lang.String option)
                             throws java.io.IOException,
                                    org.jdom.JDOMException
Parameters:
option -
Throws:
java.io.IOException
org.jdom.JDOMException

addOptionToFileByFile

public void addOptionToFileByFile(CRasterFileInformation file,
                                  java.lang.String option)
                           throws java.io.IOException,
                                  org.jdom.JDOMException
Parameters:
file -
option -
Throws:
java.io.IOException
org.jdom.JDOMException

addSensitivityAnalysis

public CRasterFileSet addSensitivityAnalysis(CRasterFileSet outputFileSet,
                                             java.lang.String newFileSetName,
                                             java.lang.String outputFileName,
                                             CIndexation prioritization)
                                      throws java.io.IOException,
                                             org.jdom.JDOMException,
                                             CRasterFileException
Parameters:
outputFileSet -
newFileSetName -
outputFileName -
prioritization -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

addUser

public void addUser(CUser user)
             throws java.io.IOException
Adds an empty User (without Projects) has has defined a name and a workspace

Parameters:
user -
Throws:
java.io.IOException

addUser

public CUser addUser(java.lang.String user,
                     java.lang.String workspace)
              throws java.io.IOException
Parameters:
user -
workspace -
Returns:
Throws:
java.io.IOException

createNewChildFileSet

public CRasterFileSet createNewChildFileSet(CRasterFileSet parentFileSet,
                                            java.lang.String newFileSetName,
                                            boolean serialize)
                                     throws java.io.IOException,
                                            org.jdom.JDOMException,
                                            CRasterFileException
Parameters:
parentFileSet -
newFileSetName -
serialize -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

createNewFileSet

public CRasterFileSet createNewFileSet(java.lang.String name,
                                       boolean serialize)
                                throws java.io.IOException,
                                       org.jdom.JDOMException,
                                       CRasterFileException
Parameters:
name -
serialize -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

executeAllConnection

public void executeAllConnection(WorkerStatusList workerStatus)
                          throws java.io.IOException
Parameters:
path - Root Path Parameter
name - Name of the new Project
owner - Your name
Throws:
java.io.IOException

executeFileOptionsOnActiveFile

public void executeFileOptionsOnActiveFile(WorkerStatusList workerStatusList)
                                    throws java.io.IOException,
                                           org.jdom.JDOMException
Execute All File Options on Active File. WARNING, this function ignores the dependencies of options

Parameters:
workerStatusList -
Throws:
java.io.IOException
org.jdom.JDOMException

executeInfoReaderOnActiveFile

public void executeInfoReaderOnActiveFile(java.lang.String iReaderName,
                                          WorkerStatusList mWorkerStatusList)
                                   throws java.io.IOException
Parameters:
iReaderName -
mWorkerStatusList -
Throws:
java.io.IOException

executeInformationReadersOnActiveFile

public void executeInformationReadersOnActiveFile(WorkerStatusList mWorkerStatusList)
                                           throws java.io.IOException
Parameters:
mWorkerStatusList -
Throws:
java.io.IOException

getActiveProject

public CProject getActiveProject()
Returns:

getActiveRasterFileInformation

public CRasterFileInformation getActiveRasterFileInformation()
Returns:

getActiveRasterFileSet

public CRasterFileSet getActiveRasterFileSet()
Returns:

getActiveUser

public CUser getActiveUser()
Returns:

getConnectionManager

public CConnectionManager getConnectionManager()
Returns:

getInfoManager

public CInfoManager getInfoManager()
Returns:

getOptionManager

public COptionManager getOptionManager()
Returns:

getUsers

public java.util.List<CUser> getUsers()
                               throws java.io.IOException
Returns:
the existing users or an empty list if no user is defined
Throws:
java.io.IOException
org.jdom.JDOMException

openProject

public boolean openProject(CUser user,
                           CProject project,
                           WorkerStatus wStatus,
                           java.util.List<IProjectListener> projectListener)
                    throws java.io.IOException,
                           org.jdom.JDOMException,
                           CRasterFileException
Parameters:
user -
project -
wStatus -
projectListener -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

resolveOptionDependenciesOnActiveFile

public int resolveOptionDependenciesOnActiveFile()
                                          throws java.io.IOException
Adds required InfoReader for all Options to the active File This function should be used before the options are executed.

Returns:
number of newly added InfoReaders
Throws:
java.io.IOException

setActiveRasterFile

public void setActiveRasterFile()

setActiveRasterFile

public void setActiveRasterFile(CRasterFileInformation activeRasterFile)
Parameters:
activeRasterFile -

setActiveRasterFileSet

public void setActiveRasterFileSet(CRasterFileSet fileSet)
Parameters:
fileSet -

setActiveUser

public void setActiveUser(CUser user)
Parameters:
user -

testMethod

public void testMethod()

writeNewFile

public void writeNewFile(CRasterFileInformation file)
Parameters:
file -