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"
website (String, optional)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.scheduleBaseurl (String, optional, Default: same as baseurl)baseurl.LoginHandler for login-protected schedules
and those specified in UntisCommonParser.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PARAM_BASEURL |
static java.lang.String |
PARAM_CLASS_SELECT_REGEX |
static java.lang.String |
PARAM_REMOVE_NON_MATCHING_CLASSES |
static java.lang.String |
PARAM_W_AFTER_NUMBER |
colorProvider, cookieProvider, cookieStore, credential, debuggingDataHandler, encodingDetector, executor, PARAM_CLASS_REGEX, sardine, scheduleData| Constructor and Description |
|---|
UntisInfoParser(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
|
parseSubstitutionTable, parseSubstitutionTablecontains, getClassesFromJson, getCredential, getInstance, getLastChange, getWebdavClient, httpGet, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, isPersonal, recognizeType, setCredential, setDebuggingDataHandler, setLocalSourcepublic static final java.lang.String PARAM_BASEURL
public static final java.lang.String PARAM_CLASS_SELECT_REGEX
public static final java.lang.String PARAM_REMOVE_NON_MATCHING_CLASSES
public static final java.lang.String PARAM_W_AFTER_NUMBER
public UntisInfoParser(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,
java.io.IOException,
CredentialInvalidException
BaseParsergetAllClasses in class UntisCommonParserorg.json.JSONException - Error with the JSON configurationjava.io.IOException - Connection or parsing errorCredentialInvalidExceptionpublic java.util.List<java.lang.String> getAllTeachers()
BaseParsernull.getAllTeachers in class BaseParser