insensa
Class CRasterFileSet

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

public class CRasterFileSet
extends java.lang.Object
implements ParentModule

Author:
dennis

Nested Class Summary
 class CRasterFileSet.RenameErrorException
           
 
Field Summary
private  CRasterFileSet activeFileSet
           
private  int activeFileSetNum
           
private  int activeNumRasterFile
           
private  CRasterFileInformation activeRasterFile
           
private  java.util.List<CRasterFileSet> childSets
           
private  java.lang.String description
           
private  java.util.List<CRasterFileInformation> fileList
           
private  java.util.List<FileSetListener> fileSetListener
           
private  CXmlFileSetProperties fileSetProperties
           
private  java.lang.String name
           
private  ParentModule parent
           
(package private)  java.lang.String separator
           
 
Constructor Summary
CRasterFileSet(ParentModule parent, java.lang.String name, ConnectionDependencies conDep, WorkerStatus wStatus)
           
 
Method Summary
 CRasterFileSet addChildSet(java.lang.String parentSetPath, java.lang.String name, boolean serialize, ConnectionDependencies conDep, WorkerStatus wStatus)
           
 void addFileSetListener(FileSetListener listener)
           
 void addRasterFile(CRasterFileInformation file, boolean serialize)
           
 void addRasterFile(java.lang.String fullName, java.lang.String outputFileName, boolean serialize, ConnectionDependencies conDep, WorkerStatus wStatus)
           
 void addRasterFile(java.lang.String fullName, java.lang.String outputFileName, OptionFileChanger option, boolean serialize)
           
 void addRasterFileAt(CRasterFileInformation file, boolean serialize, int index)
           
 void addRasterFileNameList(java.util.List<java.lang.String> fullNameList, java.util.List<java.lang.String> outputNameList, EOption option, boolean serialize)
           
 void addRasterFileNameList(java.lang.String name_list, OptionFileChanger option)
           
 void closeIter()
          TODO should be dine with listener.
private  boolean createChildFileSetDir(java.lang.String path)
           
private  void createFileSetDir()
          Creates the File Set- and Info Folder
 void delete()
           
 boolean exists()
           
 void fireChildFileSetRenamed(CRasterFileSet fileSet, java.lang.String oldName, java.lang.String newName)
           
 void fireChildRasterFileOutputNameChanged(CRasterFileInformation file, java.lang.String oldOutputFile, java.lang.String newNameTmp)
           
 void fireChildRasterFileRenamed(CRasterFileInformation file, java.lang.String oldName, java.lang.String newNameTmp)
           
 CRasterFileSet getActiveFileSet()
           
 int getActiveFileSetNum()
           
 int getActiveNumRasterFile()
           
 CRasterFileInformation getActiveRasterFile()
           
 CRasterFileSet getChildSetByName(java.lang.String name)
           
 java.util.List<CRasterFileSet> getChildSets()
           
 java.lang.String getDescription()
           
 CRasterFileInformation getFile(int m_index)
           
 java.util.List<CRasterFileInformation> getFileList()
           
 CXmlFileSetProperties getFileSetProperties()
           
 java.lang.String getFullPath()
           
 CRasterFileSet getLastActiveFileSet()
           
 java.lang.String getName()
           
 ParentModule getParent()
           
 java.lang.String getPath()
           
 CProject getProject()
           
 java.lang.String getProjectPath()
           
 java.lang.String getRelativePath()
           
 java.lang.String getWorkspacePath()
           
 int indexOfIter(CRasterFileSet fileSet)
           
 void removeChildFileSet(CRasterFileSet fileSet)
           
 int removeRasterFile(CRasterFileInformation rasterFile)
           
 void renameTo(java.lang.String newName)
           
 boolean replaceRasterFileWithTarget(CRasterFileInformation oldRasterFile, OptionFileChanger option)
           
 void setActiveFileSet(CRasterFileSet fileSet)
           
 void setActiveFileSet(int fileSetIndex)
           
 void setActiveParentFileSetIter()
           
 void setActiveRasterFile(int m_index)
           
 void setDescription(java.lang.String description)
           
 void setName(java.lang.String name)
           
 void setParentModule(ParentModule parent)
           
 java.lang.String toString()
           
 void unsetActiveFileSet()
           
 void unsetActiveSetsIter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name

description

private java.lang.String description

activeRasterFile

private CRasterFileInformation activeRasterFile

fileSetProperties

private CXmlFileSetProperties fileSetProperties

activeNumRasterFile

private int activeNumRasterFile

fileList

private java.util.List<CRasterFileInformation> fileList

childSets

private java.util.List<CRasterFileSet> childSets

fileSetListener

private java.util.List<FileSetListener> fileSetListener

activeFileSet

private CRasterFileSet activeFileSet

activeFileSetNum

private int activeFileSetNum

parent

private ParentModule parent

separator

java.lang.String separator
Constructor Detail

CRasterFileSet

public CRasterFileSet(ParentModule parent,
                      java.lang.String name,
                      ConnectionDependencies conDep,
                      WorkerStatus wStatus)
               throws java.io.IOException,
                      org.jdom.JDOMException,
                      CRasterFileException
Parameters:
parent -
name -
conDep -
wStatus -
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException
Method Detail

addChildSet

public CRasterFileSet addChildSet(java.lang.String parentSetPath,
                                  java.lang.String name,
                                  boolean serialize,
                                  ConnectionDependencies conDep,
                                  WorkerStatus wStatus)
                           throws java.io.IOException,
                                  org.jdom.JDOMException,
                                  CRasterFileException
Parameters:
parentSetPath -
name -
serialize -
conDep -
wStatus -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

addFileSetListener

public void addFileSetListener(FileSetListener listener)
Parameters:
listener -

addRasterFile

public void addRasterFile(CRasterFileInformation file,
                          boolean serialize)
                   throws java.io.IOException
Parameters:
file -
serialize -
Throws:
java.io.IOException

addRasterFile

public void addRasterFile(java.lang.String fullName,
                          java.lang.String outputFileName,
                          boolean serialize,
                          ConnectionDependencies conDep,
                          WorkerStatus wStatus)
                   throws java.io.IOException,
                          org.jdom.JDOMException,
                          CRasterFileException
Parameters:
fullName -
outputFileName -
serialize -
conDep -
wStatus -
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

addRasterFile

public void addRasterFile(java.lang.String fullName,
                          java.lang.String outputFileName,
                          OptionFileChanger option,
                          boolean serialize)
                   throws java.io.IOException,
                          CRasterFileException
Parameters:
fullName -
outputFileName -
option -
serialize - If true, the new file will be saved in the xml properties
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException

addRasterFileAt

public void addRasterFileAt(CRasterFileInformation file,
                            boolean serialize,
                            int index)
                     throws java.io.IOException
Parameters:
file -
serialize -
index -
Throws:
java.io.IOException

addRasterFileNameList

public void addRasterFileNameList(java.util.List<java.lang.String> fullNameList,
                                  java.util.List<java.lang.String> outputNameList,
                                  EOption option,
                                  boolean serialize)
                           throws org.jdom.JDOMException,
                                  java.io.IOException
Parameters:
fullNameList -
outputNameList -
option -
serialize -
Throws:
org.jdom.JDOMException
java.io.IOException

addRasterFileNameList

public void addRasterFileNameList(java.lang.String name_list,
                                  OptionFileChanger option)
Parameters:
name_list -
option -

closeIter

public void closeIter()
TODO should be dine with listener.


createChildFileSetDir

private boolean createChildFileSetDir(java.lang.String path)
                               throws java.io.IOException
Parameters:
path -
Returns:
Throws:
java.io.IOException

createFileSetDir

private void createFileSetDir()
                       throws java.io.IOException
Creates the File Set- and Info Folder

Throws:
java.io.IOException

delete

public void delete()
            throws java.io.IOException
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)

fireChildRasterFileOutputNameChanged

public void fireChildRasterFileOutputNameChanged(CRasterFileInformation file,
                                                 java.lang.String oldOutputFile,
                                                 java.lang.String newNameTmp)
                                          throws java.io.IOException
Parameters:
file -
oldOutputFile -
newNameTmp -
Throws:
java.io.IOException

fireChildRasterFileRenamed

public void fireChildRasterFileRenamed(CRasterFileInformation file,
                                       java.lang.String oldName,
                                       java.lang.String newNameTmp)
                                throws java.io.IOException
Parameters:
file -
oldName -
newNameTmp -
Throws:
java.io.IOException

getActiveFileSet

public CRasterFileSet getActiveFileSet()
Returns:

getActiveFileSetNum

public int getActiveFileSetNum()
Returns:

getActiveNumRasterFile

public int getActiveNumRasterFile()
Returns:

getActiveRasterFile

public CRasterFileInformation getActiveRasterFile()
Returns:

getChildSetByName

public CRasterFileSet getChildSetByName(java.lang.String name)
Parameters:
name -
Returns:

getChildSets

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

getDescription

public java.lang.String getDescription()
Returns:

getFile

public CRasterFileInformation getFile(int m_index)
Parameters:
m_index -
Returns:

getFileList

public java.util.List<CRasterFileInformation> getFileList()
Returns:

getFileSetProperties

public CXmlFileSetProperties getFileSetProperties()
Returns:

getFullPath

public java.lang.String getFullPath()
Specified by:
getFullPath in interface ParentModule
Returns:
The absolute path to this fileset, including the FileSets subdirectory, the name and the seperators

getLastActiveFileSet

public CRasterFileSet getLastActiveFileSet()
Returns:

getName

public java.lang.String getName()
Returns:

getParent

public ParentModule getParent()
Returns:

getPath

public java.lang.String getPath()
Returns:
The path where this file set is located.

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:
See Also:
ParentModule.getProjectPath()

getRelativePath

public java.lang.String getRelativePath()
Specified by:
getRelativePath in interface ParentModule
Returns:
relative path of parent + "FileSets"+name+sep

getWorkspacePath

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

indexOfIter

public int indexOfIter(CRasterFileSet fileSet)
Parameters:
fileSet -
Returns:

removeChildFileSet

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

removeRasterFile

public int removeRasterFile(CRasterFileInformation rasterFile)
                     throws java.io.IOException
Parameters:
rasterFile -
Returns:
Throws:
java.io.IOException

renameTo

public void renameTo(java.lang.String newName)
              throws java.io.IOException
Parameters:
newName -
Throws:
java.io.IOException

replaceRasterFileWithTarget

public boolean replaceRasterFileWithTarget(CRasterFileInformation oldRasterFile,
                                           OptionFileChanger option)
                                    throws java.io.IOException
Parameters:
oldRasterFile -
option -
Returns:
Throws:
java.io.IOException

setActiveFileSet

public void setActiveFileSet(CRasterFileSet fileSet)
Parameters:
fileSet -

setActiveFileSet

public void setActiveFileSet(int fileSetIndex)
Parameters:
fileSetIndex -

setActiveParentFileSetIter

public void setActiveParentFileSetIter()

setActiveRasterFile

public void setActiveRasterFile(int m_index)
Parameters:
m_index -

setDescription

public void setDescription(java.lang.String description)
Parameters:
description -

setName

public void setName(java.lang.String name)
Parameters:
name -

setParentModule

public void setParentModule(ParentModule parent)
Parameters:
parent -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
See Also:
Object.toString()

unsetActiveFileSet

public void unsetActiveFileSet()

unsetActiveSetsIter

public void unsetActiveSetsIter()