|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bibalex.daf.handlers.statusdatahandler.FileLevelInfoHandler
public class FileLevelInfoHandler
Contains methods to read and write FileLevelInfo to and from file, String and Nodes.
Field Summary | |
---|---|
java.util.ArrayList<FileLevelInfo> |
information
Holds the elements defined within this section |
Constructor Summary | |
---|---|
FileLevelInfoHandler()
Creates a new instance of FileLevelInfoHandler. |
Method Summary | |
---|---|
void |
add(FileLevelInfo info)
Adds the given to the set of information. |
private void |
createElementFromNode(org.w3c.dom.Node node,
boolean append)
Fills in the FileLevelInfo information by supplying its XmlNode represenation. |
FileLevelInfo |
get(int index)
Gets the FileLevelInfo at the given entry. |
int |
getPhaseWithMinimumSequence(int jobTypeID,
boolean includeDoneEntries)
Gets the phase with the minimum sequence. Note: 1) FileLevelInfo of type information are ignored. |
void |
read(java.io.File file,
boolean append)
Parses the given xml file and reads the FileLevelInfo stored in the file. |
void |
read(org.w3c.dom.Node node,
boolean append)
Reads the FileLevelInfo within the given node. The node is assumed to be on the following from: <> <Info From="" To"" Phase="" Reason="" User="" Done="" /> . |
void |
read(java.lang.String nodeRep,
boolean append)
Parses the given String and reads the FileLevelInfo from it. |
void |
remove(int index)
Remove the element specified by the given entry. |
java.lang.String |
toString()
Returns the String representation of this instance. |
java.lang.String |
toXmlString()
Converts this instance to a valid XML string. |
boolean |
write(java.lang.String filePath)
Writes the set of FileLevelInfo to te given file. Note: 1) The file is written as an XML file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.util.ArrayList<FileLevelInfo> information
Constructor Detail |
---|
public FileLevelInfoHandler()
Method Detail |
---|
public void read(java.lang.String nodeRep, boolean append) throws FileLevelInfoException
nodeRep
- The Xml String representing this element.append
- Whether to append to the current information or not.
FileLevelInfoException
- if the given String could not be parsed.public void read(java.io.File file, boolean append) throws FileLevelInfoException
file
- the XML file to read the data from.append
- Whether to append to the current information or not.
FileLevelInfoException
- if the given file could not be parsed.public void read(org.w3c.dom.Node node, boolean append) throws FileLevelInfoException
node
- The node to parse.append
- Whether to append to the current information or not.
FileLevelInfoException
- If the elments couldn't be created.private void createElementFromNode(org.w3c.dom.Node node, boolean append) throws FileLevelInfoException
node
- The Xml Node representing this element.append
- Whether to append to the current information or not.
FileLevelInfoException
- If a child couldn't be added.public void add(FileLevelInfo info)
info
- The FileLevelInfo to add.public void remove(int index)
index
- The index of the entry to removepublic FileLevelInfo get(int index)
index
- The ondex of the entry to get.
public boolean write(java.lang.String filePath)
filePath
- The path of the file to write the information to.
public int getPhaseWithMinimumSequence(int jobTypeID, boolean includeDoneEntries)
jobTypeID
- The ID of the job type. Used to create a Phase
object.includeDoneEntries
- Whether to include the entries that have 'Done' = true or not.
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toXmlString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |