public class UntisInfoParser extends UntisCommonParser
Example: AKG Bensheim
This parser can be accessed using "untis-info" for SubstitutionScheduleData.setApi(String).
SubstitutionScheduleData.setData(JSONObject) to configure the parser:
baseurl (String, required)default.htm) are located, wthout a slash at
the end.encoding (String, required)classes (Array of Strings, optional)frames/navbar.htm page.classSelectRegex (String, optional)getAllClasses(). The RegEx is matched against
the class using Matcher.find(). If the RegEx contains groups, the concatenation of all group results
Matcher.group(int) is used as the resulting class. Otherwise, Matcher.group() is used.
removeNonMatchingClasses (Boolean, optional)true, classes parsed from JavaScript in getAllClasses() where
classSelectRegex is not found (Matcher.find() returns false) are discarded from
the list. Default: false
singleClasses (Boolean, optional)true if there is no common substitution schedule for all classes, but separate ones
for each class selectable in a dropdown instead. This of course drastically increases the number of HTTP
requests needed to load the schedule. Default: "false"
wAfterNumber (Boolean, optional)true if the URL of the actual schedules (displayed in a frame) end with
36/w/w00000.htm instead of w/36/w00000.htm. Default: "false"
letter (String, optional, Default: w)w. Teacher schedules use a v.LoginHandler for login-protected schedules
and those specified in UntisCommonParser.colorProvider, cookieProvider, cookieStore, credential, executor, PARAM_CLASS_REGEX, scheduleData| Constructor and Description |
|---|
UntisInfoParser(SubstitutionScheduleData scheduleData,
CookieProvider cookieProvider) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAllClasses()
Get a list of all available classes.
|
List<String> |
getAllTeachers()
Get a list of all available teachers.
|
SubstitutionSchedule |
getSubstitutionSchedule()
Downloads and parses the substitution schedule
|
contains, getClassesFromJson, getCredential, getInstance, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, recognizeType, setCredentialpublic UntisInfoParser(SubstitutionScheduleData scheduleData, CookieProvider cookieProvider)
public SubstitutionSchedule getSubstitutionSchedule() throws IOException, org.json.JSONException, CredentialInvalidException
BaseParsergetSubstitutionSchedule in interface SubstitutionScheduleParsergetSubstitutionSchedule in class BaseParserSubstitutionScheduleIOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidException - the supplied credential (BaseParser.setCredential(Credential) is
not correctpublic List<String> getAllClasses() throws org.json.JSONException, IOException
BaseParsergetAllClasses in class UntisCommonParserorg.json.JSONException - Error with the JSON configurationIOException - Connection or parsing errorpublic List<String> getAllTeachers()
BaseParsernull.getAllTeachers in class BaseParser