insensa.XMLProperties
Class CXmlProjectProperties

java.lang.Object
  extended by insensa.XMLProperties.CXmlProjectProperties
All Implemented Interfaces:
IProjectListener

public class CXmlProjectProperties
extends java.lang.Object
implements IProjectListener


Field Summary
static java.lang.String C_OUTPUT_FILE_NAME
           
static java.lang.String C_OUTPUT_FILE_PATH
           
static java.lang.String C_USED
           
private  org.jdom.Document doc
           
private  java.lang.String filename
           
private  org.jdom.Element rootDoc
           
private  java.lang.String separator
           
private  java.io.FileOutputStream streamOut
           
private  java.io.File xmlFile
           
private  org.jdom.output.XMLOutputter xmlOut
           
 
Constructor Summary
CXmlProjectProperties(java.lang.String path)
           
 
Method Summary
 org.jdom.Element addFileSet(java.lang.String setName)
           
 org.jdom.Element addRasterFileList(java.util.List<CRasterFileInformation> rasterFileList, java.lang.String fileSet)
           
 org.jdom.Element addRasterFileToFileSet(CRasterFileInformation rasterFile, java.lang.String fileSet)
           
 void changeFileSetName(CRasterFileSet fileSet, java.lang.String newName)
           
 void changeFileSetName(java.lang.String oldName, java.lang.String newName)
           
 void childFileSetRenamed(CRasterFileSet fileSet, java.lang.String oldName, java.lang.String newName)
           
private  org.jdom.Element createFileElement(CRasterFileInformation file)
           
 void fileSetRenamed(CRasterFileSet fileSet, java.lang.String oldName, java.lang.String newName)
           
 org.jdom.Element getRasterFileInFileSet(java.lang.String fileSetName, java.lang.String fileName)
           
 org.jdom.Element getRasterFileSet(java.lang.String name)
           
 java.util.List<?> getRasterFileSets()
           
 java.lang.String getVersion()
           
 void projectClosed(java.lang.String projectName)
           
 void projectOpened(java.lang.String projectName)
           
 void removeFileFromFileSet(CRasterFileInformation file, CRasterFileSet fileSet)
           
 void removeRasterFileSet(java.lang.String name)
           
 void setVersion(java.lang.String version)
           
 void startClosingProject(java.lang.String projectName)
           
 void writeConfig()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

private java.lang.String filename

doc

private org.jdom.Document doc

rootDoc

private org.jdom.Element rootDoc

xmlOut

private org.jdom.output.XMLOutputter xmlOut

streamOut

private java.io.FileOutputStream streamOut

xmlFile

private java.io.File xmlFile

separator

private java.lang.String separator

C_OUTPUT_FILE_NAME

public static final java.lang.String C_OUTPUT_FILE_NAME
See Also:
Constant Field Values

C_OUTPUT_FILE_PATH

public static final java.lang.String C_OUTPUT_FILE_PATH
See Also:
Constant Field Values

C_USED

public static final java.lang.String C_USED
See Also:
Constant Field Values
Constructor Detail

CXmlProjectProperties

public CXmlProjectProperties(java.lang.String path)
                      throws java.io.IOException
Parameters:
path -
Throws:
java.io.IOException
Method Detail

addFileSet

public org.jdom.Element addFileSet(java.lang.String setName)
                            throws java.io.IOException
Parameters:
setName -
Returns:
Throws:
java.io.IOException

addRasterFileList

public org.jdom.Element addRasterFileList(java.util.List<CRasterFileInformation> rasterFileList,
                                          java.lang.String fileSet)
                                   throws org.jdom.JDOMException,
                                          java.io.IOException
Parameters:
rasterFileList -
fileSet -
Returns:
Throws:
org.jdom.JDOMException
java.io.IOException

addRasterFileToFileSet

public org.jdom.Element addRasterFileToFileSet(CRasterFileInformation rasterFile,
                                               java.lang.String fileSet)
                                        throws java.io.IOException
Parameters:
rasterFile -
fileSet -
Returns:
Throws:
java.io.IOException

changeFileSetName

public void changeFileSetName(CRasterFileSet fileSet,
                              java.lang.String newName)
                       throws java.io.IOException
Parameters:
fileSet -
newName -
Throws:
java.io.IOException

changeFileSetName

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

childFileSetRenamed

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

createFileElement

private org.jdom.Element createFileElement(CRasterFileInformation file)
Parameters:
file -
Returns:

fileSetRenamed

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

getRasterFileInFileSet

public org.jdom.Element getRasterFileInFileSet(java.lang.String fileSetName,
                                               java.lang.String fileName)
Parameters:
fileSetName -
fileName -
Returns:

getRasterFileSet

public org.jdom.Element getRasterFileSet(java.lang.String name)
Parameters:
name -
Returns:

getRasterFileSets

public java.util.List<?> getRasterFileSets()
Returns:

getVersion

public java.lang.String getVersion()
Returns:

projectClosed

public void projectClosed(java.lang.String projectName)
Specified by:
projectClosed in interface IProjectListener
See Also:
IProjectListener.projectClosed(java.lang.String)

projectOpened

public void projectOpened(java.lang.String projectName)
Specified by:
projectOpened in interface IProjectListener
See Also:
IProjectListener.projectOpened(java.lang.String)

removeFileFromFileSet

public void removeFileFromFileSet(CRasterFileInformation file,
                                  CRasterFileSet fileSet)
                           throws java.io.IOException
Parameters:
file -
fileSet -
Throws:
java.io.IOException

removeRasterFileSet

public void removeRasterFileSet(java.lang.String name)
                         throws java.io.IOException
Parameters:
name -
Throws:
java.io.IOException

setVersion

public void setVersion(java.lang.String version)
                throws java.io.IOException
Parameters:
version -
Throws:
java.io.IOException

startClosingProject

public void startClosingProject(java.lang.String projectName)
Specified by:
startClosingProject in interface IProjectListener
See Also:
IProjectListener.startClosingProject(java.lang.String)

writeConfig

public void writeConfig()
                 throws java.io.IOException
Throws:
java.io.IOException