public class SVPlanParser extends BaseParser
Example: Ratsschule Melle
This parser can be accessed using "svplan" for SubstitutionScheduleData.setApi(String).
SubstitutionScheduleData.setData(JSONObject) to configure the parser:
urls (Array of Strings, required)encoding (String, required)classes (Array of Strings, required)classSeparator (String, optional, Default: ", ")excludeTeachers (Boolean, optional, Default: false)repeatClass (Boolean, optional, Default: true)LoginHandler for login-protected schedules.colorProvider, cookieProvider, cookieStore, credential, debuggingDataHandler, encodingDetector, executor, PARAM_CLASS_REGEX, scheduleData| Constructor and Description |
|---|
SVPlanParser(SubstitutionScheduleData scheduleData,
CookieProvider cookieProvider) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getAllClasses()
Get a list of all available classes.
|
java.util.List<java.lang.String> |
getAllTeachers()
Get a list of all available teachers.
|
SubstitutionSchedule |
getSubstitutionSchedule()
Downloads and parses the substitution schedule
|
contains, getClassesFromJson, getCredential, getInstance, getLastChange, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, isPersonal, recognizeType, setCredential, setDebuggingDataHandlerpublic SVPlanParser(SubstitutionScheduleData scheduleData, CookieProvider cookieProvider)
public SubstitutionSchedule getSubstitutionSchedule() throws java.io.IOException, org.json.JSONException, CredentialInvalidException
SubstitutionScheduleParsergetSubstitutionSchedule in interface SubstitutionScheduleParsergetSubstitutionSchedule in class BaseParserSubstitutionSchedulejava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidException - the supplied credential (BaseParser.setCredential(Credential) is
not correctpublic java.util.List<java.lang.String> getAllClasses()
throws org.json.JSONException
BaseParsergetAllClasses in class BaseParserorg.json.JSONException - Error with the JSON configurationpublic java.util.List<java.lang.String> getAllTeachers()
BaseParsernull.getAllTeachers in class BaseParser