insensa
Class CProject

java.lang.Object
  extended by insensa.CProject
All Implemented Interfaces:
ParentModule

public class CProject
extends java.lang.Object
implements ParentModule

TODO remove Sets

Author:
dennis

Field Summary
private  CRasterFileSet activeFileSet
           
private  int activeFileSetNumber
           
private  java.util.List<ConnectionFileChanger> connectionFileChanger
           
private  CConnectionThreadPool connectionThreadPool
           
private  java.util.Date date
           
private  int fileCount
           
private  java.util.List<CRasterFileSet> fileSetList
           
private  java.util.List<IProjectListener> listener
           
private  java.lang.String name
           
private  boolean open
           
private  java.lang.String owner
           
private  CXmlProjectProperties projectProperties
           
(package private)  java.lang.String separator
           
private  CUser user
           
private  java.lang.String version
           
 
Constructor Summary
CProject(java.lang.String name, java.lang.String owner, java.util.List<IProjectListener> listener)
          Empty Projekt.
 
Method Summary
 void addConnection(ConnectionFileChanger conn)
           
 void addFileSet(CRasterFileSet file_set)
           
 void addFileSet(java.lang.String name)
           
 void addProjectListener(IProjectListener listener)
           
 void close()
           
 boolean create()
           
private  boolean createProjectDirs()
           
 void executeAllConnections(WorkerStatusList workerList)
           
 boolean exists()
           
 void fireChildFileSetRenamed(CRasterFileSet fileSet, java.lang.String oldName, java.lang.String newName)
           
 CRasterFileSet getActiveFileSetRoot()
           
 int getActiveFileSetRootNumber()
           
 CConnectionThreadPool getConnectionThreadPool()
           
 java.util.Date getDate()
           
 CRasterFileInformation getFileByRelativePath(java.lang.String relativefilePath)
           
 CRasterFileInformation getFileByRelativePath(java.lang.String fileSetPath, java.lang.String fileName)
           
 int getFileCount()
           
 CRasterFileSet getFileSet(int index)
           
 CRasterFileSet getFileSetByPath(CRasterFileSet parentSet, java.lang.String relativePath)
           
 java.util.List<CRasterFileSet> getFileSetList()
           
 java.lang.String getFullPath()
           
 CRasterFileSet getLastActiveFileSet()
           
 java.lang.String getName()
           
 java.lang.String getOwner()
           
 java.lang.String getPathRelativeToProject(java.lang.String absolutePath)
           
 CProject getProject()
           
 java.lang.String getProjectPath()
           
 CXmlProjectProperties getProjectProperties()
           
 java.lang.String getRelativePath()
           
 CUser getUser()
           
 java.lang.String getWorkspacePath()
           
 boolean importProject(WorkerStatus wStatus)
           
 boolean isRelativeToProject(java.lang.String absolutePath)
           
 boolean open(WorkerStatus wStatus)
           
 void removeConnection(ConnectionFileChanger conn)
           
 void removeFileSet(CRasterFileSet fileSet)
           
 void setActiveFileSet(CRasterFileSet fileSet)
           
 void setActiveFileSet(int m_index)
           
 void setDate(java.util.Date date)
           
 void setFileCount(int fileCount)
           
 void setProjectProperties(CXmlProjectProperties projectProperties)
           
 void setUser(CUser user)
           
private  void solveConnectionDependencies()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name

owner

private java.lang.String owner

date

private java.util.Date date

projectProperties

private CXmlProjectProperties projectProperties

fileSetList

private java.util.List<CRasterFileSet> fileSetList

activeFileSet

private CRasterFileSet activeFileSet

activeFileSetNumber

private int activeFileSetNumber

connectionThreadPool

private CConnectionThreadPool connectionThreadPool

connectionFileChanger

private java.util.List<ConnectionFileChanger> connectionFileChanger

listener

private java.util.List<IProjectListener> listener

open

private boolean open

fileCount

private int fileCount

user

private CUser user

version

private java.lang.String version

separator

java.lang.String separator
Constructor Detail

CProject

public CProject(java.lang.String name,
                java.lang.String owner,
                java.util.List<IProjectListener> listener)
         throws java.io.IOException
Empty Projekt.

Parameters:
name -
owner -
listener -
Throws:
java.io.IOException
Method Detail

addConnection

public void addConnection(ConnectionFileChanger conn)
                   throws java.io.IOException
Parameters:
conn -
Throws:
java.io.IOException

addFileSet

public void addFileSet(CRasterFileSet file_set)
                throws java.io.IOException
Parameters:
file_set -
Throws:
java.io.IOException

addFileSet

public void addFileSet(java.lang.String name)
                throws java.io.IOException,
                       org.jdom.JDOMException,
                       CRasterFileException
Parameters:
name -
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

addProjectListener

public void addProjectListener(IProjectListener listener)
Parameters:
listener -

close

public void close()

create

public boolean create()
               throws java.io.IOException
Returns:
Throws:
java.io.IOException

createProjectDirs

private boolean createProjectDirs()
                           throws java.io.IOException
Returns:
Throws:
java.io.IOException

executeAllConnections

public void executeAllConnections(WorkerStatusList workerList)
                           throws java.io.IOException
Parameters:
workerList -
Throws:
java.io.IOException

exists

public boolean exists()
Returns:

fireChildFileSetRenamed

public void fireChildFileSetRenamed(CRasterFileSet fileSet,
                                    java.lang.String oldName,
                                    java.lang.String newName)
                             throws java.io.IOException
Specified by:
fireChildFileSetRenamed in interface ParentModule
Parameters:
fileSet -
oldName -
newName -
Throws:
java.io.IOException
See Also:
ParentModule.fireChildFileSetRenamed(insensa.CRasterFileSet, java.lang.String, java.lang.String)

getActiveFileSetRoot

public CRasterFileSet getActiveFileSetRoot()
Returns:

getActiveFileSetRootNumber

public int getActiveFileSetRootNumber()
Returns:

getConnectionThreadPool

public CConnectionThreadPool getConnectionThreadPool()
Returns:

getDate

public java.util.Date getDate()
Returns:

getFileByRelativePath

public CRasterFileInformation getFileByRelativePath(java.lang.String relativefilePath)
Parameters:
fileSetPath -
fileName -
Returns:

getFileByRelativePath

public CRasterFileInformation getFileByRelativePath(java.lang.String fileSetPath,
                                                    java.lang.String fileName)
Parameters:
fileSetPath -
fileName -
Returns:

getFileCount

public int getFileCount()
Returns:

getFileSet

public CRasterFileSet getFileSet(int index)
Parameters:
index -
Returns:

getFileSetByPath

public CRasterFileSet getFileSetByPath(CRasterFileSet parentSet,
                                       java.lang.String relativePath)
Parameters:
parentSet -
relativePath -
Returns:

getFileSetList

public java.util.List<CRasterFileSet> getFileSetList()
Returns:

getFullPath

public java.lang.String getFullPath()
Specified by:
getFullPath in interface ParentModule
Returns:
See Also:
ParentModule.getFullPath()

getPathRelativeToProject

public java.lang.String getPathRelativeToProject(java.lang.String absolutePath)

isRelativeToProject

public boolean isRelativeToProject(java.lang.String absolutePath)

getLastActiveFileSet

public CRasterFileSet getLastActiveFileSet()
Parameters:
name -
Throws:
java.io.IOException
java.io.IOException

getName

public java.lang.String getName()
Returns:

getOwner

public java.lang.String getOwner()
Returns:

getProject

public CProject getProject()
Specified by:
getProject in interface ParentModule
Returns:
See Also:
ParentModule.getProject()

getProjectPath

public java.lang.String getProjectPath()
Specified by:
getProjectPath in interface ParentModule
Returns:

getProjectProperties

public CXmlProjectProperties getProjectProperties()
Returns:

getRelativePath

public java.lang.String getRelativePath()
Specified by:
getRelativePath in interface ParentModule
Returns:
See Also:
ParentModule.getRelativePath()

getUser

public CUser getUser()
Returns:

getWorkspacePath

public java.lang.String getWorkspacePath()
Specified by:
getWorkspacePath in interface ParentModule
Returns:
See Also:
ParentModule.getWorkspacePath()

importProject

public boolean importProject(WorkerStatus wStatus)
                      throws java.io.IOException,
                             org.jdom.JDOMException,
                             CRasterFileException
Parameters:
wStatus -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

open

public boolean open(WorkerStatus wStatus)
             throws java.io.IOException,
                    org.jdom.JDOMException,
                    CRasterFileException
Parameters:
wStatus -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

removeConnection

public void removeConnection(ConnectionFileChanger conn)
                      throws java.io.IOException
Parameters:
conn -
Throws:
java.io.IOException

removeFileSet

public void removeFileSet(CRasterFileSet fileSet)
                   throws java.io.IOException
Parameters:
fileSet -
Throws:
java.io.IOException

setActiveFileSet

public void setActiveFileSet(CRasterFileSet fileSet)
Parameters:
fileSet -

setActiveFileSet

public void setActiveFileSet(int m_index)
Parameters:
m_index -

setDate

public void setDate(java.util.Date date)
Parameters:
date -

setFileCount

public void setFileCount(int fileCount)
Parameters:
fileCount -

setProjectProperties

public void setProjectProperties(CXmlProjectProperties projectProperties)
Parameters:
projectProperties -

setUser

public void setUser(CUser user)
Parameters:
user -

solveConnectionDependencies

private void solveConnectionDependencies()
                                  throws java.io.IOException
Throws:
java.io.IOException