insensa.XMLProperties
Class CXmlRasterFileInformation

java.lang.Object
  extended by insensa.XMLProperties.CXmlRasterFileInformation

public class CXmlRasterFileInformation
extends java.lang.Object


Nested Class Summary
 class CXmlRasterFileInformation.CXmlRasterFileInformationOpenFailedException
           
 
Field Summary
private  org.jdom.Document doc
           
private  CRasterFileInformation file
           
private  java.lang.String filename
           
private  java.lang.String fullFilename
           
private  boolean inUse
           
(package private)  java.util.concurrent.locks.Lock lock
           
(package private)  java.util.concurrent.locks.Lock openLock
           
private  java.lang.String path
           
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
CXmlRasterFileInformation(CRasterFileInformation file)
           
CXmlRasterFileInformation(CXmlRasterFileInformation oldXmlFile, CRasterFileInformation newRasterFile)
          Creates a new xml File for file newRasterFile with the information from oldXmlFile.
CXmlRasterFileInformation(java.io.File file)
           
 
Method Summary
 org.jdom.Element addConnectionFileChanger(ConnectionFileChanger con)
           
 void addDescription(java.lang.String sDescription)
          Adds a Description as Element to a raster Element.
 org.jdom.Element addInfoReader(InfoReader info)
           
 org.jdom.Element addOptionFileChanger(OptionFileChanger option)
           
 void changeXmlFileSourcePath()
           
private  void close()
           
 void closeGlobal()
           
 boolean delete()
           
 java.util.List<org.jdom.Element> getConnectionElements()
           
 java.lang.String getDescription()
           
 org.jdom.Document getDoc()
           
 org.jdom.Element getInfoReaderElement(java.lang.String infoName)
           
 java.util.List<org.jdom.Element> getInfoReaderElements()
           
 java.util.List<org.jdom.Element> getOptionFileChangerElement()
           
 org.jdom.Element getRootDoc()
           
 java.io.File getXmlFile()
           
private  void open()
           
 void openGlobal()
           
 org.jdom.Element refreshConnectionFileChanger(ConnectionFileChanger connection)
           
 org.jdom.Element refreshInfoReader(InfoReader info)
           
 org.jdom.Element refreshOptionFileChanger(OptionFileChanger option)
           
 void removeConnection(ConnectionFileChanger conn)
           
 void removeInfoReader(InfoReader iReader)
           
 void removeInfoReaders()
           
 void removeOptionFileChanger(OptionFileChanger option)
           
 void removeOptionFileChangers()
           
 boolean renameTo(CRasterFileInformation file, java.lang.String newPath)
           
 void setDoc(org.jdom.Document doc)
           
 void setRootDoc(org.jdom.Element rootDoc)
           
 void writeConfig()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlFile

private java.io.File xmlFile

separator

private java.lang.String separator

filename

private java.lang.String filename

path

private java.lang.String path

fullFilename

private java.lang.String fullFilename

inUse

private boolean inUse

lock

final java.util.concurrent.locks.Lock lock

openLock

final java.util.concurrent.locks.Lock openLock

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

file

private CRasterFileInformation file
Constructor Detail

CXmlRasterFileInformation

public CXmlRasterFileInformation(CRasterFileInformation file)
                          throws java.io.IOException
Parameters:
file -
Throws:
java.io.IOException

CXmlRasterFileInformation

public CXmlRasterFileInformation(CXmlRasterFileInformation oldXmlFile,
                                 CRasterFileInformation newRasterFile)
                          throws java.io.IOException
Creates a new xml File for file newRasterFile with the information from oldXmlFile.

Parameters:
oldXmlFile -
newRasterFile -
Throws:
java.io.IOException

CXmlRasterFileInformation

public CXmlRasterFileInformation(java.io.File file)
                          throws java.io.IOException
Parameters:
file -
Throws:
java.io.IOException
Method Detail

addConnectionFileChanger

public org.jdom.Element addConnectionFileChanger(ConnectionFileChanger con)
                                          throws java.io.IOException
Parameters:
con -
Returns:
Throws:
java.io.IOException

addDescription

public void addDescription(java.lang.String sDescription)
                    throws java.io.IOException
Adds a Description as Element to a raster Element.

Parameters:
sDescription -
Throws:
java.io.IOException

addInfoReader

public org.jdom.Element addInfoReader(InfoReader info)
                               throws java.io.IOException
Parameters:
info -
Returns:
The new generated info Element or the existing one
Throws:
java.io.IOException

addOptionFileChanger

public org.jdom.Element addOptionFileChanger(OptionFileChanger option)
                                      throws java.io.IOException
Parameters:
option -
Returns:
Throws:
java.io.IOException

changeXmlFileSourcePath

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

close

private void close()

closeGlobal

public void closeGlobal()

delete

public boolean delete()
Returns:

getConnectionElements

public java.util.List<org.jdom.Element> getConnectionElements()
                                                       throws java.io.IOException
Returns:
Throws:
java.io.IOException

getDescription

public java.lang.String getDescription()
                                throws java.io.IOException
Returns:
Throws:
java.io.IOException

getDoc

public org.jdom.Document getDoc()
Returns:

getInfoReaderElement

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

getInfoReaderElements

public java.util.List<org.jdom.Element> getInfoReaderElements()
                                                       throws java.io.IOException
Returns:
Throws:
java.io.IOException

getOptionFileChangerElement

public java.util.List<org.jdom.Element> getOptionFileChangerElement()
                                                             throws java.io.IOException
Returns:
Throws:
java.io.IOException

getRootDoc

public org.jdom.Element getRootDoc()
                            throws java.io.IOException
Returns:
Throws:
java.io.IOException

getXmlFile

public java.io.File getXmlFile()
Returns:

open

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

openGlobal

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

refreshConnectionFileChanger

public org.jdom.Element refreshConnectionFileChanger(ConnectionFileChanger connection)
                                              throws java.io.IOException
Parameters:
connection -
Returns:
Throws:
java.io.IOException

refreshInfoReader

public org.jdom.Element refreshInfoReader(InfoReader info)
                                   throws java.io.IOException
Parameters:
info -
Returns:
The new generated info Element or the existing one
Throws:
java.io.IOException

refreshOptionFileChanger

public org.jdom.Element refreshOptionFileChanger(OptionFileChanger option)
                                          throws java.io.IOException
Parameters:
option -
Returns:
Throws:
java.io.IOException

removeConnection

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

removeInfoReader

public void removeInfoReader(InfoReader iReader)
                      throws java.io.IOException
Parameters:
iReader -
Throws:
java.io.IOException

removeInfoReaders

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

removeOptionFileChanger

public void removeOptionFileChanger(OptionFileChanger option)
                             throws java.io.IOException
Parameters:
option -
Throws:
java.io.IOException

removeOptionFileChangers

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

renameTo

public boolean renameTo(CRasterFileInformation file,
                        java.lang.String newPath)
                 throws java.io.IOException
Parameters:
file -
newPath -
Returns:
Throws:
java.io.IOException

setDoc

public void setDoc(org.jdom.Document doc)
Parameters:
doc -

setRootDoc

public void setRootDoc(org.jdom.Element rootDoc)
Parameters:
rootDoc -

writeConfig

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