transcript.data
Class Transformer

java.lang.Object
  extended by transcript.data.Transformer

public class Transformer
extends java.lang.Object

Transforms data from one format to another. Warning: it is more than meets the eye.


Constructor Summary
Transformer()
           
 
Method Summary
static TransformedEntry[] tidyData(TransformedEntry[] data)
          This tidies up the data by doing a few things: 1.
static TransformedEntry[] transform(Entry[] entries)
          Takes an array of Entry objects and transforms it so that each student takes up one line.
static Entry[] transform(TransformedEntry[] data)
          Converts an array of TransformedEntry objects and turns them into normal Entry objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transformer

public Transformer()
Method Detail

transform

public static TransformedEntry[] transform(Entry[] entries)
Takes an array of Entry objects and transforms it so that each student takes up one line.

Parameters:
entries -
Returns:

transform

public static Entry[] transform(TransformedEntry[] data)
Converts an array of TransformedEntry objects and turns them into normal Entry objects.

Parameters:
data - the TransformedEntry array
Returns:
an equivalent Entry array

tidyData

public static TransformedEntry[] tidyData(TransformedEntry[] data)
This tidies up the data by doing a few things: 1. Removes all single entries (useless) 2. Removes all entries with no rating 3. Makes sure the SIDs are all sequential with no gaps. 4. Removes all entries that are missing course info. 5. Combines courses when a person took a course multiple times

Parameters:
data - the data to tidy
Returns:
the tidied data