org.jsurveylib.io
Class XMLSurveyReader

java.lang.Object
  extended by org.jsurveylib.io.XMLSurveyReader
All Implemented Interfaces:
SurveyReader

public class XMLSurveyReader
extends java.lang.Object
implements SurveyReader

FOR INTERNAL USE ONLY.

Copyright (c)2007, Daniel Kaplan

Since:
7.10.4
Author:
Daniel Kaplan

Field Summary
static java.lang.String XSD_LOCATION
           
 
Constructor Summary
XMLSurveyReader(java.io.File configFile)
           
XMLSurveyReader(java.io.Reader configReader)
           
 
Method Summary
 java.lang.String getInitScript()
           
 Menu getMenu()
           
 java.lang.String getOnAnswerChanged()
           
 java.util.List<Page> getPages()
          The return value of this method may be modified.
 Strings getStrings()
           
 java.util.Map<java.lang.String,Template> getTemplateMap()
           
 java.lang.String getTitle()
           
 java.lang.String i18nString(java.lang.String attributeName, java.lang.String defaultValue)
           
 boolean saveToFileOnFinish()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_LOCATION

public static final java.lang.String XSD_LOCATION
See Also:
Constant Field Values
Constructor Detail

XMLSurveyReader

public XMLSurveyReader(java.io.File configFile)
                throws java.lang.Exception
Throws:
java.lang.Exception

XMLSurveyReader

public XMLSurveyReader(java.io.Reader configReader)
                throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface SurveyReader

i18nString

public java.lang.String i18nString(java.lang.String attributeName,
                                   java.lang.String defaultValue)

getStrings

public Strings getStrings()
Specified by:
getStrings in interface SurveyReader

getInitScript

public java.lang.String getInitScript()
Specified by:
getInitScript in interface SurveyReader

getOnAnswerChanged

public java.lang.String getOnAnswerChanged()
Specified by:
getOnAnswerChanged in interface SurveyReader

getPages

public java.util.List<Page> getPages()
Description copied from interface: SurveyReader
The return value of this method may be modified. Yet, when the Survey gets reset, it needs to get the original values from the pages. Therefore, this method must return the configuration's original version of the Survey each time it is called.

Specified by:
getPages in interface SurveyReader
Returns:
The list of pages

getTemplateMap

public java.util.Map<java.lang.String,Template> getTemplateMap()
Specified by:
getTemplateMap in interface SurveyReader

getMenu

public Menu getMenu()
Specified by:
getMenu in interface SurveyReader

saveToFileOnFinish

public boolean saveToFileOnFinish()
Specified by:
saveToFileOnFinish in interface SurveyReader