first commit for the rewrite of rosafactory...
added a standard rosaexception.
added an initial implementation of rosafactory which does not yet support select and select1 and will also probably crash upon inserting data of an incorrect type.
still kind of unstable, but it's able to programmatically process questions, serialise, unserialise and then pick up where it left off.
added overloaded version of #setUp for convenience while unserialising.
altered #setUp to accept a string instead of a bytearrayinputstream.
rosafactory now has a string field for the xmlform it is processing.removed the main method.
null check in rosafactory. added unit test for rosafactory.
updated tests.
altered the overloaded #setUp method - no longer need to specify a boolean parameter (kinda redundant since it'll only be used after unserialising).
removed #resetCursor() - not used anywhere.
reordered some of the class members for consistency.
made #persist() static with one rosafactory parameter to be consistent with #rebuild() (also static)
added usage of org.javarosa.core.model.data classes for handling the appending of correctly typed data to forms.
added serialversionuid
added a more thorough test for unserialising rosafactory.
now using xformanswerdataparser to handle casting of answer to correct types (much safer, it seems)
added overloaded methods to support reattempting of questions.
updated tests
fixed #answerQuestion():
if the number of completed questions equalled the total amount of questions in a form, then specifying a question to answer as an argument to the method would have no effect.
removed the overloaded variant of #castAnswer() and instead moved any input validation/sanitisation into the original method.
updated #answerQuestion() to throw exceptions in special circumstances.
updated .travis.yml to not build on jdk6, as javarosa doesn't support it.
updated tests.
added javadocs for the meaty methods of rosafactory.
added null checks to serialisation and unserialisation methods.
added an overload for #setUp().
altered fields of the class: made two instance fields non-transient to reduce the amount of computation performed during initialisation and unserialisation.
removed unused instance field questionEvents.
altered #castAnswer() as per hodgestar's suggestions. optimised this method by removing the redundant int question parameter as the method can't be called unless the answer being casted is for a valid question.
removed questionType instance field as question types can be determined dynamically.
fixed off by one error in #setQuestionMetadata()
added new hash methods for setting byte[] values in redis. added new unit test cases for these methods.
added private static final byte[] field to jedis client class that represents a hash field 'object' for use with all serialised objects in hashes.
also removed s.out messages in test cases.
added method for outputting a completed xform instance.
updated tests: added a case for #getCompletedXForm()