public class DaVinciParser extends BaseParser
This parser can be accessed using "davinci"
for SubstitutionScheduleData.setApi(String)
.
SubstitutionScheduleData.setData(JSONObject)
to configure the parser:
url
(String, required if urls
not specified)urls
(Array of strings, required if url
not specified)classes
(Array of Strings, required if classesSource
not specified)classesSource
(String, optional)website
(String, recommended)embeddedContentSelector
(String, optional)LoginHandler
for login-protected schedules.colorProvider, cookieProvider, cookieStore, credential, debuggingDataHandler, encodingDetector, executor, PARAM_CLASS_REGEX, sardine, scheduleData
Constructor and Description |
---|
DaVinciParser(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, getWebdavClient, httpGet, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, isPersonal, recognizeType, setCredential, setDebuggingDataHandler, setLocalSource
public DaVinciParser(SubstitutionScheduleData scheduleData, CookieProvider cookieProvider)
public SubstitutionSchedule getSubstitutionSchedule() throws java.io.IOException, org.json.JSONException, CredentialInvalidException
SubstitutionScheduleParser
getSubstitutionSchedule
in interface SubstitutionScheduleParser
getSubstitutionSchedule
in class BaseParser
SubstitutionSchedule
java.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 java.io.IOException, org.json.JSONException, CredentialInvalidException
BaseParser
getAllClasses
in class BaseParser
java.io.IOException
- Connection or parsing errororg.json.JSONException
- Error with the JSON configurationCredentialInvalidException
public java.util.List<java.lang.String> getAllTeachers()
BaseParser
null
.getAllTeachers
in class BaseParser