Web Services

Introduction

The SAMUEL web service is desployed in http://samuel.iaia.lcc.uma.es/samuelExternal.

Many operations returns the DistributionMedea bean. This class has two String lists, one with values and the other with probabilities (the value of position i has the probability of position i).

Operations

reportEvidence

void reportEvidence(String idLRRequest, String idStudentLR, String activity, 
                    String data,        String mark,        String resource)

Description:

Record a new activity score (evidence) of a student about a specific concept in the specified date.

Parameters:

  • idLRRequest: ID of the Learning Resource which does the request.
  • idStudentLR: student ID.
  • activity: activity ID.
  • date: date formatted as dd-MM-yyyy HH:mm:ss. Leave it empty to use the current server date.
  • mark: score.
  • resource: resource identifier that generates the evidence: 1 - Component, 2 - Teacher, 3 - Student.

reportEvidences

void reportEvidences(String idLRRequest, String idStudentLR, String marksXML)

Description:

Record a set of evidences (xml file) of a student.

Parameters:

  • idLRRequest: ID of the Learning Resource which does the request.
  • idStudentLR: Student ID.
  • marksXML: XML string with the set of evidences.

XML File:

  • The XML file must have the next structure(DTD):

  <!ELEMENT Marks (Mark+)>
  <!ELEMENT Mark(EMPTY)>
  <!ATTLIST Mark date   CDATA #REQUIRED 
                 mark     CDATA #REQUIRED 
                 activity CDATA #REQUIRED
                 resource CDATA #REQUIRED>

The date field must be in the next format: "dd-mm-YYYY HH:mm:ss". Example: "22-02-2010 17:12:00".
The resource field must be one of these values: 1 (Component), 2 (Teacher) or 3 (Student).

reportActivity

void reportActivity(String  idLRRequest, String idActivity,  String nameActivity, 
                    String  evalTypeXML, String conceptsXML, Integer relevance,
                    Boolean ignore)

Description:

Record a new activity.

Parameters:

  • idLRRequest: ID of the Learning Resource which does the request.
  • idActivity: Activity ID.
  • nameActivity: Activity name.
  • evalTypeXML: XML string with the information about the activity evaluation.
  • conceptsXML: XML string associating concepts to this activity.
  • relevance Activity relevance (difficulty) (1 - low, 2 - medium, 3 - high, null - default). The more relevance the more knowledge is needed to do it allright.
  • ignore: Indicates whether the activity will be taken into account or not when the student model generare.

evalTypeXML File:

The file must have the next structure(DTD), in case that the evaluation is done with real numbers (the only one supported in version 1.1):

  <!ELEMENT DataType>	
  <!ATTLIST type (Real) #REQUIRED 
              lowerBoundary CDATA #REQUIRED 
              upperBoundary CDATA #REQUIRED >

Example:

  <DataType type="Real" lowerBoundary="0" upperBoundary="100"></DataType>

conceptsXML File:

The file must have the next structure(DTD):

  <!ELEMENT Ontology (Concept+)>
  <!ATTLIST Ontology url CDATA #REQUIRED>
  <!ELEMENT Concept(EMPTY)>
  <!ATTLIST Concept id CDATA #REQUIRED relevance CDATA #REQUIRED>

Example:

<Ontology url="http://urano.lcc.uma.es/samuel/ontologias/HogarDigital.owl">
  <Concept id="B0102" relevance="75" />
  <Concept id="B0801" relevance="50" />
</Ontology>

requestKnowledge

DistributionMedea requestKnowledge(String idLRRequest,          String idStudentLR, String concept, 
                                   List<String> idLRReportList, String urlOntology, Calendar date, 
                                   int windowSize,              int windowType,     int method)

Description:

Get student model of a student. All evidences have the same weight.

Parámetros:

  • idLRRequest: ID of the Learning Resource which does the request.
  • idStudentLR: Student ID.
  • concept: Concept ID.
  • idLRReportList: List of the learning resources (IDs) whose evidences will be used to infer the model.
  • urlOntology: URL of the concept Ontology (Owl).
  • date: Student Model date.
  • windowSize: Window size (days or evidences number, depending of the parameter windowType) which we assume that student's knowledge doesn't change.
  • windowType: Kind of window: 1 to window kind evidences number and 2 to window kind number of days.
  • method: Method of evidences accumulation (inference): 1 to Graded Response Model and 2 to Bayes.

Output:

Student's knowledge in distributed format.

requestKnowledgeWeighted

DistributionMedea requestKnowledgeWeighted(String idLRRequest,          String idStudentLR, String concept, 
                                           List<String> idLRReportList, String urlOntology, Calendar date, 
                                           int windowSize,              int windowType,     int method)

Description:

Get student model of a student. The more recents evidences have more weight.

Parameters:

  • idLRRequest: ID of the Learning Resource which does the request.
  • idStudentLR: Student ID.
  • concept: Concept ID.
  • idLRReportList: List of the learning resources (IDs) whose evidences will be used to infer the model.
  • urlOntology: URL of the concept Ontology (Owl).
  • date: Student Model date.
  • windowSize: Window size (days or evidences number, depending of the parameter windowType) which we assume that student's knowledge doesn't change.
  • windowType: Kind of window: 1 to window kind evidences number and 2 to window kind number of days.
  • method: Method of evidences accumulation (inference): 1 to Graded Response Model and 2 to Bayes.

Output:

Student's knowledge in distributed format.

requestGroupKnowledge

DistributionMedea requestGroupKnowledge(String idLRRequest,          List<String> group, String concept, 
                                        List<String> idLRReportList, String urlOntology, Calendar date, 
                                        int windowSize,              int windowType,     int method, 
                                        boolean removeEmptyStudents)

Description:

Get student model of a group of students. All evidences have the same weight.

Parámetros:

  • idLRRequest: ID of the Learning Resource which does the request.
  • group: List of student IDs.
  • concept: Concept ID.
  • idLRReportList: List of the learning resources (IDs) whose evidences will be used to infer the model.
  • urlOntology: URL of the concept Ontology (Owl).
  • date: Student Model date.
  • windowSize: Window size (days or evidences number, depending of the parameter windowType) which we assume that student's knowledge doesn't change.
  • windowType: Kind of window: 1 to window kind evidences number and 2 to window kind number of days.
  • method: Method of evidences accumulation (inference): 1 to Graded Response Model and 2 to Bayes.
  • removeEmptyStudents: If the value is true it ignores the students without evidences, if the value is false it takes into account the students without evidences.

Output:

Student model of the group in distributed format.

requestGroupKnowledgeWeighted

DistributionMedea requestGroupKnowledgeWeighted(String idLRRequest,          List<String> group, String concept, 
                                                List<String> idLRReportList, String urlOntology, Calendar date, 
                                                int windowSize,              int windowType,     int method, 
                                                boolean removeEmptyStudents)

Description:

Get student model of a group of students. The more recents evidences have more weight.

Parameter:

  • idLRRequest: ID of the Learning Resource which does the request.
  • group: List of student IDs.
  • concept: Concept ID.
  • idLRReportList: List of the learning resources (IDs) whose evidences will be used to infer the model.
  • urlOntology: URL of the concept Ontology (Owl).
  • date: Student Model date.
  • windowSize: Window size (days or evidences number, depending of the parameter windowType) which we assume that student's knowledge doesn't change.
  • windowType: Kind of window: 1 to window kind evidences number and 2 to window kind number of days.
  • method: Method of evidences accumulation (inference): 1 to Graded Response Model and 2 to Bayes.
  • removeEmptyStudents: If the value is true it ignores the students without evidences, if the value is false it takes into account the students without evidences.

Output:

Student model of the group in distributed format.

requestEvidences

DistributionMedea requestEvidences(String idStudentLR,          String idLRRequest, String concept, 
                                   List<String> idLRReportList, String urlOntology, Calendar date, 
                                   int windowSize,              int windowType,     int method)

Description:

Get knowledge evidences of a student about a specific concept.

Parameters:

  • idLRRequest: ID of the Learning Resource which does the request.
  • idStudentLR: - Student ID.
  • concept: Concept ID.
  • idLRReportList:List of the learning resources (IDs) whose evidences will be returned.
  • urlOntology: URL of the concept Ontology (Owl).
  • date: Student Model date.
  • windowSize: Window size (days or evidences number, depending of the parameter windowType) which we assume that student's knowledge doesn't change.
  • windowType: Kind of window: 1 to window kind evidences number and 2 to window kind number of days.

Output:

List of evideces.

Ontology

The ontology used to specify the topics and their relationships must be an owl ontology such as this:

<rdf:RDF
   xmlns="http://example.com/samuel/SAMUEL.owl#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
   xmlns:owl="http://www.w3.org/2002/07/owl#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">

<owl:Class rdf:about="http://example.com/SAMUEL.owl#Concept">
  <rdfs:label>Concept</rdfs:label>
</owl:Class>

<Concept rdf:about="#ID1">
  <rdfs:label>IHD_01 - Instalaciones y equipos del HOGAR DIGITAL</rdfs:label>
  <vcard:SORT-STRING>1</vcard:SORT-STRING>
</Concept>

<Concept rdf:about="#ID2">
  <rdfs:label>Conexión a servicios externos de comunicación en el hogar digital</rdfs:label>
  <vcard:SORT-STRING>1</vcard:SORT-STRING>
  <dcterms:isPartOf rdf:resource="#ID1"/>
  <rdf:type rdf:resource="http://example.com/SAMUEL.owl#Concept"/>
</Concept>

<Concept rdf:about="#ID6">
  <rdfs:label>Infraestructuras comunes de telecomunicaciones ICT</rdfs:label>
  <vcard:SORT-STRING>1</vcard:SORT-STRING>
  <dcterms:isPartOf rdf:resource="#ID2"/>
  <rdf:type rdf:resource="http://example.com/SAMUEL.owl#Concept"/>
</Concept>

<Concept rdf:about="#ID7">
  <rdfs:label>Instalaciones de fibra óptica</rdfs:label>
  <vcard:SORT-STRING>2</vcard:SORT-STRING>
  <dcterms:isPartOf rdf:resource="#ID2"/>
  <rdf:type rdf:resource="http://example.com/SAMUEL.owl#Concept"/>
</Concept>

<Concept rdf:about="#ID3">
  <rdfs:label>Red de comunicación en el hogar digital</rdfs:label>
  <vcard:SORT-STRING>2</vcard:SORT-STRING>
  <dcterms:isPartOf rdf:resource="#ID1"/>
  <rdf:type rdf:resource="http://example.com/SAMUEL.owl#Concept"/>
</Concept>

<Concept rdf:about="#ID8">
  <rdfs:label>Infraestructuras básicas de red local</rdfs:label>
  <vcard:SORT-STRING>1</vcard:SORT-STRING>
  <dcterms:isPartOf rdf:resource="#ID3"/>
  <rdf:type rdf:resource="http://example.com/SAMUEL.owl#Concept"/>
</Concept>

<Concept rdf:about="#ID9">
  <rdfs:label>Instalación y configuración de redes de área local LAN</rdfs:label>
  <vcard:SORT-STRING>2</vcard:SORT-STRING>
  <dcterms:isPartOf rdf:resource="#ID3"/>
  <rdf:type rdf:resource="http://example.com/SAMUEL.owl#Concept"/>
</Concept>

<rdf:Description rdf:about="#ID9">
  <dcterms:requires rdf:resource="#ID8"/>
</rdf:Description>

</rdf:RDF>

Where Concept is the class representing a topic, rdf:about is the topic id, rdfs:label is the topic name, dcterms:isPartOf is the topic-subtopic relationship pointing to the parent concept id and vcard:SORT-STRING is the order of the topic (between topics of same level, ie bothers topics). Also, if you want to specify prerequisites relationship you can do it by dcterms:requires element, indicating the id of the required concept. So, the urlOntology parameter of above operations must be a link to one owl ontology with this format.

Redmine Appliance - Powered by TurnKey Linux