insensa.XMLProperties
Class CXmlFileSetProperties
java.lang.Object
insensa.XMLProperties.CXmlFileSetProperties
- All Implemented Interfaces:
- FileSetListener
public class CXmlFileSetProperties
- extends java.lang.Object
- implements FileSetListener
Method Summary |
org.jdom.Element |
addChildSet(CRasterFileSet childSet)
|
org.jdom.Element |
addRasterFile(CRasterFileInformation rasterFile)
|
org.jdom.Element |
addRasterFileList(java.util.List<CRasterFileInformation> rasterFileList)
|
void |
changeChildFileSetName(CRasterFileSet fileSet,
java.lang.String newName)
|
void |
changeChildFileSetName(java.lang.String oldName,
java.lang.String newName)
|
private void |
changeFileName(java.lang.String oldFileName,
java.lang.String newFileName,
java.lang.String outputName)
|
private void |
changeFileOutputName(java.lang.String oldOutputName,
java.lang.String newOutputName,
java.lang.String fileName)
only for hard copies. |
private void |
changeXmlFileSourcePath(java.lang.String xmlFileSourcePath)
|
void |
childFileOutputNameChanged(CRasterFileSet fileSet,
CRasterFileInformation file,
java.lang.String oldName,
java.lang.String newName)
|
void |
childFileRenamed(CRasterFileSet fileSet,
CRasterFileInformation file,
java.lang.String oldName,
java.lang.String newName)
|
void |
childFileSetRenamed(CRasterFileSet fileSet,
java.lang.String oldName,
java.lang.String newName)
|
void |
close()
|
private org.jdom.Element |
createFileElement(CRasterFileInformation file)
|
boolean |
delete()
|
void |
fileSetRenamed(CRasterFileSet fileSet,
java.lang.String oldName,
java.lang.String newName)
|
org.jdom.Element |
getRasterFile(java.lang.String fileName,
java.lang.String outputFileName)
|
java.util.List<?> |
getRasterFileList()
|
org.jdom.Element |
getRasterFileSet(java.lang.String setName)
|
java.util.List<?> |
getRasterFileSetList()
|
void |
removeFile(CRasterFileInformation file)
|
void |
removeFileSet(CRasterFileSet fileSet)
|
org.jdom.Element |
replaceRasterFile(CRasterFileInformation oldFile,
CRasterFileInformation newFile)
|
void |
writeConfig()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
fileSet
private CRasterFileSet fileSet
lock
final java.util.concurrent.locks.Lock lock
CXmlFileSetProperties
public CXmlFileSetProperties(CRasterFileSet fileSet)
throws java.io.IOException
- Parameters:
fileSet
-
- Throws:
java.io.IOException
CXmlFileSetProperties
public CXmlFileSetProperties(java.lang.String filename)
throws java.io.IOException
- Parameters:
filename
-
- Throws:
java.io.IOException
addChildSet
public org.jdom.Element addChildSet(CRasterFileSet childSet)
throws java.io.IOException
- Parameters:
childSet
-
- Returns:
-
- Throws:
java.io.IOException
addRasterFile
public org.jdom.Element addRasterFile(CRasterFileInformation rasterFile)
throws java.io.IOException
- Parameters:
rasterFile
-
- Returns:
-
- Throws:
java.io.IOException
addRasterFileList
public org.jdom.Element addRasterFileList(java.util.List<CRasterFileInformation> rasterFileList)
throws org.jdom.JDOMException,
java.io.IOException
- Parameters:
rasterFileList
-
- Returns:
-
- Throws:
org.jdom.JDOMException
java.io.IOException
changeChildFileSetName
public void changeChildFileSetName(CRasterFileSet fileSet,
java.lang.String newName)
throws java.io.IOException
- Parameters:
fileSet
- newName
-
- Throws:
java.io.IOException
changeChildFileSetName
public void changeChildFileSetName(java.lang.String oldName,
java.lang.String newName)
throws java.io.IOException
- Parameters:
oldName
- newName
-
- Throws:
java.io.IOException
changeFileName
private void changeFileName(java.lang.String oldFileName,
java.lang.String newFileName,
java.lang.String outputName)
throws java.io.IOException
- Parameters:
oldFileName
- newFileName
- outputName
-
- Throws:
java.io.IOException
changeFileOutputName
private void changeFileOutputName(java.lang.String oldOutputName,
java.lang.String newOutputName,
java.lang.String fileName)
throws java.io.IOException
- only for hard copies.
- Parameters:
oldOutputName
- newOutputName
- fileName
-
- Throws:
java.io.IOException
changeXmlFileSourcePath
private void changeXmlFileSourcePath(java.lang.String xmlFileSourcePath)
throws java.io.IOException
- Parameters:
xmlFileSourcePath
-
- Throws:
java.io.IOException
childFileOutputNameChanged
public void childFileOutputNameChanged(CRasterFileSet fileSet,
CRasterFileInformation file,
java.lang.String oldName,
java.lang.String newName)
throws java.io.IOException
- Specified by:
childFileOutputNameChanged
in interface FileSetListener
- Throws:
java.io.IOException
- See Also:
FileSetListener.childFileOutputNameChanged(insensa.CRasterFileSet, insensa.CRasterFileInformation, java.lang.String, java.lang.String)
childFileRenamed
public void childFileRenamed(CRasterFileSet fileSet,
CRasterFileInformation file,
java.lang.String oldName,
java.lang.String newName)
throws java.io.IOException
- Specified by:
childFileRenamed
in interface FileSetListener
- Throws:
java.io.IOException
- See Also:
FileSetListener.childFileRenamed(insensa.CRasterFileSet, insensa.CRasterFileInformation, java.lang.String, java.lang.String)
childFileSetRenamed
public void childFileSetRenamed(CRasterFileSet fileSet,
java.lang.String oldName,
java.lang.String newName)
throws java.io.IOException
- Specified by:
childFileSetRenamed
in interface FileSetListener
- Throws:
java.io.IOException
- See Also:
FileSetListener.childFileSetRenamed(insensa.CRasterFileSet, java.lang.String, java.lang.String)
close
public void close()
createFileElement
private org.jdom.Element createFileElement(CRasterFileInformation file)
- Parameters:
file
-
- Returns:
delete
public boolean delete()
- Returns:
fileSetRenamed
public void fileSetRenamed(CRasterFileSet fileSet,
java.lang.String oldName,
java.lang.String newName)
- Specified by:
fileSetRenamed
in interface FileSetListener
- See Also:
FileSetListener.fileSetRenamed(insensa.CRasterFileSet, java.lang.String, java.lang.String)
getRasterFile
public org.jdom.Element getRasterFile(java.lang.String fileName,
java.lang.String outputFileName)
- Parameters:
fileName
- outputFileName
-
- Returns:
getRasterFileList
public java.util.List<?> getRasterFileList()
- Returns:
getRasterFileSet
public org.jdom.Element getRasterFileSet(java.lang.String setName)
- Parameters:
setName
-
- Returns:
getRasterFileSetList
public java.util.List<?> getRasterFileSetList()
- Returns:
removeFile
public void removeFile(CRasterFileInformation file)
throws java.io.IOException
- Parameters:
file
-
- Throws:
java.io.IOException
removeFileSet
public void removeFileSet(CRasterFileSet fileSet)
throws java.io.IOException
- Parameters:
fileSet
-
- Throws:
java.io.IOException
replaceRasterFile
public org.jdom.Element replaceRasterFile(CRasterFileInformation oldFile,
CRasterFileInformation newFile)
throws java.io.IOException
- Parameters:
oldFile
- newFile
-
- Returns:
-
- Throws:
java.io.IOException
writeConfig
public void writeConfig()
throws java.io.IOException
- Throws:
java.io.IOException