jitas.xml.writer
Class StudentModelWriter

java.lang.Object
  extended by jitas.xml.writer.XMLWriter
      extended by jitas.xml.writer.StudentModelWriter

public class StudentModelWriter
extends XMLWriter

A class that provides functions for users to write to student-models.xml. Future enhancements could include bulk processing of persisting student models which would mean that the student models xml file wouldn't need to be opened and closed multiple times.

Version:
21 August 2007
Author:
DeathMarch (c314g2)

Constructor Summary
StudentModelWriter(StudentModel sm, java.lang.String pathName)
          Constructor.
 
Method Summary
 void addStudentModel()
          Add a student model to the student-model XML file.
 void persistStudentModel()
          Saves all the current information stored in the Student Model given to the constructor to the student models xml file.
 void removeStudentModel()
          Removes a student model from the student-model XML file.
 
Methods inherited from class jitas.xml.writer.XMLWriter
loadXML, writeToXML
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StudentModelWriter

public StudentModelWriter(StudentModel sm,
                          java.lang.String pathName)
Constructor. Pass the parameters to the superclass to load the XML file.

Method Detail

addStudentModel

public void addStudentModel()
Add a student model to the student-model XML file.


removeStudentModel

public void removeStudentModel()
                        throws UserNotFoundException
Removes a student model from the student-model XML file.

Throws:
UserNotFoundException

persistStudentModel

public void persistStudentModel()
                         throws UserNotFoundException
Saves all the current information stored in the Student Model given to the constructor to the student models xml file.

Throws:
UserNotFoundException - if there is no student model for the student