/**
 * Copyright 2017 University of Victoria
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
import com.rigiresearch.examgen.model.ClosedEnded;
import com.rigiresearch.examgen.model.CompoundQuestion;
import com.rigiresearch.examgen.model.CompoundText;
import com.rigiresearch.examgen.model.Examination;
import com.rigiresearch.examgen.model.OpenEnded;
import com.rigiresearch.examgen.model.TextSegment;
import java.util.Arrays;
import java.util.HashMap;

/**
 * Main program.
 * @author Miguel Jimenez (miguel@uvic.ca)
 * @date 2017-08-12
 * @version $Id$
 * @since 0.0.1
 */
public final class Application {

    @SuppressWarnings("serial")
    public static void main(final String[] args) {
        final long seed = 1234;
        final Examination exam01 = new Examination(
            new CompoundText(
                Arrays.asList(
                    new TextSegment.Simple("Quiz 1"),
                    new TextSegment.Simple("CSC 111"),
                    new TextSegment.Simple("Fall 2017")
                )
            ),
            new TextSegment.Simple("Quiz 1"),
            new HashMap<String, String>(){{
                put("V Number", "");
                put("Name", "");
                put("Lab Section", "B01");
                put("Grade", "");
            }},
            Arrays.asList(
                new CompoundQuestion(
                    new TextSegment.Simple("This is a group of questions"),
                    Arrays.asList(
                        new ClosedEnded(
                            new TextSegment.Simple("This is a question with options"),
                            50,
                            Arrays.asList(
                                new ClosedEnded.Option(
                                    true,
                                    new TextSegment.Simple("This is an option")
                                ),
                                new ClosedEnded.Option(
                                    false,
                                    new TextSegment.Simple("This is another option")
                                )
                            )
                        ),
                        new OpenEnded(
                            new TextSegment.Simple("Is this an open question?"),
                            50
                        )
                    )
                )
            )
        );
        final Examination exam02 = exam01.scrambled(seed);
        final Examination exam03 = exam02.scrambled(seed);
    }

}

@@ -1231,60 +1231,8 @@
 on;%0A
-import com.rigiresearch.examgen.model.CompoundText;%0A
 impo
@@ -1378,16 +1378,51 @@
 egment;%0A
+import java.text.SimpleDateFormat;%0A
 import j
@@ -1438,16 +1438,39 @@
 Arrays;%0A
+import java.util.Date;%0A
 import j
@@ -1776,259 +1776,426 @@
 nal 
-Examination exam01 = new Examination(%0A            new CompoundText(%0A                Arrays.asList(%0A                    new TextSegment.Simple(%22Quiz 1%22),%0A                    new TextSegment.Simple(%22CSC 111%22),%0A                    new TextSegment.Simple(
+String today = new SimpleDateFormat(%22yyyy-MM-dd%22)%0A            .format(new Date());%0A        final Examination exam01 = new Examination(%0A            new HashMap%3CExamination.Parameter, String%3E()%7B%7B%0A                put(Examination.Parameter.CLASS, %22CSC 111%22);%0A                put(Examination.Parameter.DATE, today);%0A                put(Examination.Parameter.SECTION, %22B01%22);%0A                put(Examination.Parameter.TERM, 
 %22Fal
@@ -2202,16 +2202,17 @@
 l 2017%22)
+;
 %0A       
@@ -2224,69 +2224,131 @@
     
-)%0A            ),%0A            new TextSegment.Simple(%22Quiz 1%22)
+put(Examination.Parameter.TIME_LIMIT, %2220 min%22);%0A                put(Examination.Parameter.TITLE, %22Quiz 1%22);%0A            %7D%7D
 ,%0A  
@@ -2369,22 +2369,33 @@
 HashMap%3C
-String
+Examination.Field
 , String
@@ -2424,128 +2424,143 @@
 put(
-%22V Number%22, %22%22);%0A                put(%22Name%22, %22%22);%0A                put(%22Lab Section%22, %22B01%22);%0A                put(%22Grade%22
+Examination.Field.STUDENT_NAME, %22%22);%0A                put(Examination.Field.STUDENT_ID, %22%22);%0A                put(Examination.Field.GRADE
 , %22%22

Update sample code