university
Class BuildPersonFromXML

java.lang.Object
  extended by university.BuildPersonFromXML

public class BuildPersonFromXML
extends java.lang.Object

Creates the Objects from the values that were parsed from the XML document.


Constructor Summary
BuildPersonFromXML()
          Creates a new instance of BuildPersonFromXML
 
Method Summary
 Address createAddress(java.util.HashMap<java.lang.String,java.lang.String> map)
          Creates an Address object from the values read in from the xml document.
 Graduate createGraduate(java.util.HashMap<java.lang.String,java.lang.String> graduateMap)
          Create a new Graduate student from the values read in from the xml document.
 Person createPerson(java.util.HashMap<java.lang.String,java.lang.String> personMap)
          Creates a new Person from the values read in from the xml document.
 Undergraduate createUndergraduate(java.util.HashMap<java.lang.String,java.lang.String> undergraduateMap)
          Create a new Undergraduate student from the values read in from the xml document.
 Sex getGender(java.lang.String gender)
          getGender return a Sex object for the String supplied
 GraduateLevel getGraduateLevel(java.lang.String level)
          getGraduateLevel returns a GraduateLevel object for the String.
 UndergraduateLevel getUndergraduateLevel(java.lang.String level)
          getUndergraduateLevel returns a UndergraduateLevel object for the String.
 Unit getUnit(java.lang.String unitName)
          Returns a Unit object from the value read in from the xml document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildPersonFromXML

public BuildPersonFromXML()
Creates a new instance of BuildPersonFromXML

Method Detail

createAddress

public Address createAddress(java.util.HashMap<java.lang.String,java.lang.String> map)
Creates an Address object from the values read in from the xml document.

Parameters:
map - A map containing all of the values need to create a new Address object.
Returns:
Address The new Address that was created.

createPerson

public Person createPerson(java.util.HashMap<java.lang.String,java.lang.String> personMap)
Creates a new Person from the values read in from the xml document.

Parameters:
personMap - A map contain all of the values read in from the xml document. The map contains the
Returns:
Person The Person that was created.

createUndergraduate

public Undergraduate createUndergraduate(java.util.HashMap<java.lang.String,java.lang.String> undergraduateMap)
Create a new Undergraduate student from the values read in from the xml document.

Parameters:
undergraduateMap - A HashMap containing all of the values to construct a new Undergraduate.
Returns:
Undergraduate The Undergraduate student that was created.

createGraduate

public Graduate createGraduate(java.util.HashMap<java.lang.String,java.lang.String> graduateMap)
Create a new Graduate student from the values read in from the xml document.

Parameters:
graduateMap - A HashMap containing all of the values needed to construct a Graduate student.
Returns:
Graduate The new Graduate student that was created.

getUnit

public Unit getUnit(java.lang.String unitName)
Returns a Unit object from the value read in from the xml document.

Parameters:
unitName - The name of the Unit object to get a reference to.
Returns:
Unit The unit belonged to.

getGender

public Sex getGender(java.lang.String gender)
getGender return a Sex object for the String supplied

Parameters:
gender - A String contain the value "male" or "female"
Returns:
Sex the enum value of the person gender.

getGraduateLevel

public GraduateLevel getGraduateLevel(java.lang.String level)
getGraduateLevel returns a GraduateLevel object for the String.

Parameters:
level - A String for the graduate level can contain the value "masters" or "phd"
Returns:
GraduateLevel The Graduate student grade level.

getUndergraduateLevel

public UndergraduateLevel getUndergraduateLevel(java.lang.String level)
getUndergraduateLevel returns a UndergraduateLevel object for the String.

Parameters:
level - A String for the undergraduate level can contain the value "freshman", "sophmore", "junior" or "senior"
Returns:
UndergraduateLevel The Undergraduate students grade level.