Class Survey
- java.lang.Object
-
- org.openstreetmap.atlas.checks.maproulette.data.Challenge
-
- org.openstreetmap.atlas.checks.maproulette.data.Survey
-
- All Implemented Interfaces:
java.io.Serializable
public class Survey extends Challenge
A survey is very similar to a challenge with only one minor difference in that the instruction is really a question and it contains answers for that question for the user to respond too. The idea is to collect data rather than to edit data.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringKEY_ANSWERSstatic java.lang.StringKEY_CHALLENGE-
Fields inherited from class org.openstreetmap.atlas.checks.maproulette.data.Challenge
DEFAULT_CHECKIN_COMMENT, DISCOVERABLE, KEY_ACTIVE, KEY_DEFAULT_PRIORITY, KEY_DEFAULT_PRIORITY_VALUE, KEY_HIGH_PRIORITY, KEY_LOW_PRIORITY, KEY_MEDIUM_PRIORITY, KEY_NAME, KEY_PRIORITY_RULES, KEY_RULE_FIELD, KEY_RULE_ID, KEY_RULE_OPERATOR, KEY_RULE_TYPE, KEY_RULE_VALUE, KEY_TAGS, KEY_UPDATE_TASKS, VALUE_RULE_FIELD, VALUE_RULE_ID, VALUE_RULE_OPERATOR, VALUE_RULE_TYPE
-
-
Constructor Summary
Constructors Constructor Description Survey(java.lang.String name, java.lang.String description, java.lang.String blurb, java.lang.String instruction, ChallengeDifficulty difficulty, java.util.List<java.lang.String> answers, java.lang.String tags, boolean enabled)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChallengefromResource(java.lang.String checkName)Creates a Challenge based on a JSON resource filejava.util.List<java.lang.String>getAnswers()com.google.gson.JsonObjecttoJson(java.lang.String challengeName)-
Methods inherited from class org.openstreetmap.atlas.checks.maproulette.data.Challenge
getBlurb, getCheckinComment, getCheckName, getDefaultPriority, getDescription, getDifficulty, getEnabled, getHighPriorityRule, getId, getInstruction, getLowPriorityRule, getMediumPriorityRule, getName, getParentIdentifier, getStatus, getTags, isEnabled, isUpdateTasks, setCheckinComment, setCheckName, setEnabled, setId, setName, setParentIdentifier, setStatus, setUpdateTasks
-
-
-
-
Field Detail
-
KEY_ANSWERS
public static final java.lang.String KEY_ANSWERS
- See Also:
- Constant Field Values
-
KEY_CHALLENGE
public static final java.lang.String KEY_CHALLENGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Survey
public Survey(java.lang.String name, java.lang.String description, java.lang.String blurb, java.lang.String instruction, ChallengeDifficulty difficulty, java.util.List<java.lang.String> answers, java.lang.String tags, boolean enabled)
-
-
Method Detail
-
fromResource
public static Challenge fromResource(java.lang.String checkName)
Creates a Challenge based on a JSON resource file- Parameters:
checkName- The name of the check that will look for the json challenge info- Returns:
- The challenge based from the resource json file
-
getAnswers
public java.util.List<java.lang.String> getAnswers()
-
-