Queries¶
Objective Query¶
-
class
dlkit.learning.queries.
ObjectiveQuery
¶ Bases:
dlkit.osid.queries.OsidObjectQuery
,dlkit.osid.queries.OsidFederateableQuery
This is the query for searching objectives.
Each method match request produces an
AND
term while multiple invocations of a method produces a nestedOR
.-
match_assessment_id
(assessment_id, match)¶ Sets the assessment
Id
for this query.Parameters: - assessment_id (
osid.id.Id
) – an assessmentId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–assessment_id
isnull
- assessment_id (
-
assessment_id_terms
¶
-
supports_assessment_query
()¶ Tests if an
AssessmentQuery
is available for querying activities.Returns: true
if an assessment query is available,false
otherwiseReturn type: boolean
-
assessment_query
¶ Gets the query for an assessment.
Multiple retrievals produce a nested
OR
term.Returns: the assessment query Return type: osid.assessment.AssessmentQuery
Raise: Unimplemented
–supports_assessment_query()
isfalse
-
match_any_assessment
(match)¶ Matches an objective that has any assessment assigned.
Parameters: match ( boolean
) –true
to match objectives with any assessment,false
to match objectives with no assessment
-
assessment_terms
¶
-
match_knowledge_category_id
(grade_id, match)¶ Sets the knowledge category
Id
for this query.Parameters: - grade_id (
osid.id.Id
) – a gradeId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–grade_id
isnull
- grade_id (
-
knowledge_category_id_terms
¶
-
supports_knowledge_category_query
()¶ Tests if a
GradeQuery
is available for querying knowledge categories.Returns: true
if a grade query is available,false
otherwiseReturn type: boolean
-
knowledge_category_query
¶ Gets the query for a knowledge category.
Multiple retrievals produce a nested
OR
term.Returns: the grade query Return type: osid.grading.GradeQuery
Raise: Unimplemented
–supports_knowledge_category_query()
isfalse
-
match_any_knowledge_category
(match)¶ Matches an objective that has any knowledge category.
Parameters: match ( boolean
) –true
to match objectives with any knowledge category,false
to match objectives with no knowledge category
-
knowledge_category_terms
¶
-
match_cognitive_process_id
(grade_id, match)¶ Sets the cognitive process
Id
for this query.Parameters: - grade_id (
osid.id.Id
) – a gradeId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–grade_id
isnull
- grade_id (
-
cognitive_process_id_terms
¶
-
supports_cognitive_process_query
()¶ Tests if a
GradeQuery
is available for querying cognitive processes.Returns: true
if a grade query is available,false
otherwiseReturn type: boolean
-
cognitive_process_query
¶ Gets the query for a cognitive process.
Multiple retrievals produce a nested
OR
term.Returns: the grade query Return type: osid.grading.GradeQuery
Raise: Unimplemented
–supports_cognitive_process_query()
isfalse
-
match_any_cognitive_process
(match)¶ Matches an objective that has any cognitive process.
Parameters: match ( boolean
) –true
to match objectives with any cognitive process,false
to match objectives with no cognitive process
-
cognitive_process_terms
¶
-
match_activity_id
(activity_id, match)¶ Sets the activity
Id
for this query.Parameters: - activity_id (
osid.id.Id
) – an activityId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–activity_id
isnull
- activity_id (
-
activity_id_terms
¶
-
supports_activity_query
()¶ Tests if an
ActivityQuery
is available for querying activities.Returns: true
if an activity query is available,false
otherwiseReturn type: boolean
-
activity_query
¶ Gets the query for an activity.
Multiple retrievals produce a nested
OR
term.Returns: the activity query Return type: osid.learning.ActivityQuery
Raise: Unimplemented
–supports_activity_query()
isfalse
-
match_any_activity
(match)¶ Matches an objective that has any related activity.
Parameters: match ( boolean
) –true
to match objectives with any activity,false
to match objectives with no activity
-
activity_terms
¶
-
match_requisite_objective_id
(requisite_objective_id, match)¶ Sets the requisite objective
Id
for this query.Parameters: - requisite_objective_id (
osid.id.Id
) – a requisite objectiveId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–requisite_objective_id
isnull
- requisite_objective_id (
-
requisite_objective_id_terms
¶
-
supports_requisite_objective_query
()¶ Tests if an
ObjectiveQuery
is available for querying requisite objectives.Returns: true
if an objective query is available,false
otherwiseReturn type: boolean
-
requisite_objective_query
¶ Gets the query for a requisite objective.
Multiple retrievals produce a nested
OR
term.Returns: the objective query Return type: osid.learning.ObjectiveQuery
Raise: Unimplemented
–supports_requisite_objective_query()
isfalse
-
match_any_requisite_objective
(match)¶ Matches an objective that has any related requisite.
Parameters: match ( boolean
) –true
to match objectives with any requisite,false
to match objectives with no requisite
-
requisite_objective_terms
¶
-
match_dependent_objective_id
(dependent_objective_id, match)¶ Sets the dependent objective
Id
to query objectives dependent on the given objective.Parameters: - dependent_objective_id (
osid.id.Id
) – a dependent objectiveId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–dependent_objective_id
isnull
- dependent_objective_id (
-
dependent_objective_id_terms
¶
-
supports_depndent_objective_query
()¶ Tests if an
ObjectiveQuery
is available for querying dependent objectives.Returns: true
if an objective query is available,false
otherwiseReturn type: boolean
-
dependent_objective_query
¶ Gets the query for a dependent objective.
Multiple retrievals produce a nested
OR
term.Returns: the objective query Return type: osid.learning.ObjectiveQuery
Raise: Unimplemented
–supports_dependent_objective_query()
isfalse
-
match_any_dependent_objective
(match)¶ Matches an objective that has any related dependents.
Parameters: match ( boolean
) –true
to match objectives with any dependent,false
to match objectives with no dependents
-
dependent_objective_terms
¶
-
match_equivalent_objective_id
(equivalent_objective_id, match)¶ Sets the equivalent objective
Id
to query equivalents.Parameters: - equivalent_objective_id (
osid.id.Id
) – an equivalent objectiveId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–equivalent_objective_id
isnull
- equivalent_objective_id (
-
equivalent_objective_id_terms
¶
-
supports_equivalent_objective_query
()¶ Tests if an
ObjectiveQuery
is available for querying equivalent objectives.Returns: true
if an objective query is available,false
otherwiseReturn type: boolean
-
equivalent_objective_query
¶ Gets the query for an equivalent objective.
Multiple retrievals produce a nested
OR
term.Returns: the objective query Return type: osid.learning.ObjectiveQuery
Raise: Unimplemented
–supports_equivalent_objective_query()
isfalse
-
match_any_equivalent_objective
(match)¶ Matches an objective that has any related equivalents.
Parameters: match ( boolean
) –true
to match objectives with any equivalent,false
to match objectives with no equivalents
-
equivalent_objective_terms
¶
-
match_ancestor_objective_id
(objective_id, match)¶ Sets the objective
Id
for this query to match objectives that have the specified objective as an ancestor.Parameters: - objective_id (
osid.id.Id
) – an objectiveId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–objective_id
isnull
- objective_id (
-
ancestor_objective_id_terms
¶
-
supports_ancestor_objective_query
()¶ Tests if an
ObjectiveQuery
is available.Returns: true
if an objective query is available,false
otherwiseReturn type: boolean
-
ancestor_objective_query
¶ Gets the query for an objective.
Multiple retrievals produce a nested
OR
term.Returns: the objective query Return type: osid.learning.ObjectiveQuery
Raise: Unimplemented
–supports_ancestor_objective_query()
isfalse
-
match_any_ancestor_objective
(match)¶ Matches objectives that have any ancestor.
Parameters: match ( boolean
) –true
to match objective with any ancestor,false
to match root objectives
-
ancestor_objective_terms
¶
-
match_descendant_objective_id
(objective_id, match)¶ Sets the objective
Id
for this query to match objectives that have the specified objective as a descendant.Parameters: - objective_id (
osid.id.Id
) – an objectiveId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–objective_id
isnull
- objective_id (
-
descendant_objective_id_terms
¶
-
supports_descendant_objective_query
()¶ Tests if an
ObjectiveQuery
is available.Returns: true
if an objective query is available,false
otherwiseReturn type: boolean
-
descendant_objective_query
¶ Gets the query for an objective.
Multiple retrievals produce a nested
OR
term.Returns: the objective query Return type: osid.learning.ObjectiveQuery
Raise: Unimplemented
–supports_descendant_objective_query()
isfalse
-
match_any_descendant_objective
(match)¶ Matches objectives that have any ancestor.
Parameters: match ( boolean
) –true
to match objectives with any ancestor,false
to match leaf objectives
-
descendant_objective_terms
¶
-
match_objective_bank_id
(objective_bank_id, match)¶ Sets the objective bank
Id
for this query.Parameters: - objective_bank_id (
osid.id.Id
) – an objective bankId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–objective_bank_id
isnull
- objective_bank_id (
-
objective_bank_id_terms
¶
-
supports_objective_bank_query
()¶ Tests if a
ObjectiveBankQuery
is available for querying objective banks.Returns: true
if an objective bank query is available,false
otherwiseReturn type: boolean
-
objective_bank_query
¶ Gets the query for an objective bank.
Multiple retrievals produce a nested
OR
term.Returns: the objective bank query Return type: osid.learning.ObjectiveBankQuery
Raise: Unimplemented
–supports_objective_bank_query()
isfalse
-
objective_bank_terms
¶
-
get_objective_query_record
(objective_record_type)¶ Gets the objective query record corresponding to the given
Objective
recordType
.Multiple retrievals produce a nested
OR
term.Parameters: objective_record_type ( osid.type.Type
) – an objective query record typeReturns: the objective query record Return type: osid.learning.records.ObjectiveQueryRecord
Raise: NullArgument
–objective_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(objective_record_type)
isfalse
-
Activity Query¶
-
class
dlkit.learning.queries.
ActivityQuery
¶ Bases:
dlkit.osid.queries.OsidObjectQuery
,dlkit.osid.queries.OsidSubjugateableQuery
This is the query for searching activities.
Each method match request produces an
AND
term while multiple invocations of a method produces a nestedOR
.-
match_objective_id
(objective_id, match)¶ Sets the objective
Id
for this query.Parameters: - objective_id (
osid.id.Id
) – an objectiveId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–objective_id
isnull
- objective_id (
-
objective_id_terms
¶
-
supports_objective_query
()¶ Tests if an
ObjectiveQuery
is available for querying objectives.Returns: true
if an objective query is available,false
otherwiseReturn type: boolean
-
objective_query
¶ Gets the query for an objective.
Multiple retrievals produce a nested
OR
term.Returns: the objective query Return type: osid.learning.ObjectiveQuery
Raise: Unimplemented
–supports_objective_query()
isfalse
-
objective_terms
¶
-
match_asset_id
(asset_id, match)¶ Sets the asset
Id
for this query.Parameters: - asset_id (
osid.id.Id
) – an assetId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–asset_id
isnull
- asset_id (
-
asset_id_terms
¶
-
supports_asset_query
()¶ Tests if an
AssetQuery
is available for querying objectives.Returns: true
if an robjective query is available,false
otherwiseReturn type: boolean
-
asset_query
¶ Gets the query for an asset.
Multiple retrievals produce a nested
OR
term.Returns: the asset query Return type: osid.repository.AssetQuery
Raise: Unimplemented
–supports_asset_query()
isfalse
-
match_any_asset
(match)¶ Matches an activity that has any objective assigned.
Parameters: match ( boolean
) –true
to match activities with any asset,false
to match activities with no asset
-
asset_terms
¶
-
match_course_id
(course_id, match)¶ Sets the course
Id
for this query.Parameters: - course_id (
osid.id.Id
) – a courseId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–course_id
isnull
- course_id (
-
course_id_terms
¶
-
supports_course_query
()¶ Tests if a
CourseQuery
is available for querying courses.Returns: true
if a course query is available,false
otherwiseReturn type: boolean
-
course_query
¶ Gets the query for a course.
Multiple retrievals produce a nested
OR
term.Returns: the course query Return type: osid.course.CourseQuery
Raise: Unimplemented
–supports_course_query()
isfalse
-
match_any_course
(match)¶ Matches an activity that has any course assigned.
Parameters: match ( boolean
) –true
to match activities with any courses,false
to match activities with no courses
-
course_terms
¶
-
match_assessment_id
(assessment_id, match)¶ Sets the assessment
Id
for this query.Parameters: - assessment_id (
osid.id.Id
) – an assessmentId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–assessment_id
isnull
- assessment_id (
-
assessment_id_terms
¶
-
supports_assessment_query
()¶ Tests if an
AssessmentQuery
is available for querying assessments.Returns: true
if an assessment query is available,false
otherwiseReturn type: boolean
-
assessment_query
¶ Gets the query for a assessment.
Multiple retrievals produce a nested
OR
term.Returns: the assessment query Return type: osid.assessment.AssessmentQuery
Raise: Unimplemented
–supports_assessment_query()
isfalse
-
match_any_assessment
(match)¶ Matches an activity that has any assessment assigned.
Parameters: match ( boolean
) –true
to match activities with any assessments,false
to match activities with no assessments
-
assessment_terms
¶
-
match_objective_bank_id
(objective_bank_id, match)¶ Sets the objective bank
Id
for this query.Parameters: - objective_bank_id (
osid.id.Id
) – an objective bankId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–objective_bank_id
isnull
- objective_bank_id (
-
objective_bank_id_terms
¶
-
supports_objective_bank_query
()¶ Tests if a
ObjectiveBankQuery
is available for querying resources.Returns: true
if an objective bank query is available,false
otherwiseReturn type: boolean
-
objective_bank_query
¶ Gets the query for an objective bank.
Multiple retrievals produce a nested
OR
term.Returns: the objective bank query Return type: osid.learning.ObjectiveBankQuery
Raise: Unimplemented
–supports_objective_bank_query()
isfalse
-
objective_bank_terms
¶
-
get_activity_query_record
(activity_record_type)¶ Gets the activity query record corresponding to the given
Activity
recordType
.Multiple retrievals produce a nested
OR
term.Parameters: activity_record_type ( osid.type.Type
) – an activity query record typeReturns: the activity query record Return type: osid.learning.records.ActivityQueryRecord
Raise: NullArgument
–activity_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(activity_record_type)
isfalse
-
Objective Bank Query¶
-
class
dlkit.learning.queries.
ObjectiveBankQuery
¶ Bases:
dlkit.osid.queries.OsidCatalogQuery
This is the query for searching objective banks.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_objective_id
(objective_id, match)¶ Sets the objective
Id
for this query.Parameters: - objective_id (
osid.id.Id
) – an objectiveId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–objective_id
isnull
- objective_id (
-
objective_id_terms
¶
-
supports_objective_query
()¶ Tests if an
ObjectiveQuery
is available.Returns: true
if an objective query is available,false
otherwiseReturn type: boolean
-
objective_query
¶ Gets the query for an objective.
Multiple retrievals produce a nested
OR
term.Returns: the objective query Return type: osid.learning.ObjectiveQuery
Raise: Unimplemented
–supports_objective_query()
isfalse
-
match_any_objective
(match)¶ Matches an objective bank that has any objective assigned.
Parameters: match ( boolean
) –true
to match objective banks with any objective,false
to match objective banks with no objectives
-
objective_terms
¶
-
match_activity_id
(activity_id, match)¶ Sets the activity
Id
for this query.Parameters: - activity_id (
osid.id.Id
) – an activityId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–activity_id
isnull
- activity_id (
-
activity_id_terms
¶
-
supports_activity_query
()¶ Tests if a
ActivityQuery
is available for querying activities.Returns: true
if an activity query is available,false
otherwiseReturn type: boolean
-
activity_query
¶ Gets the query for an activity.
Multiple retrievals produce a nested
OR
term.Returns: the activity query Return type: osid.learning.ActivityQuery
Raise: Unimplemented
–supports_activity_query()
isfalse
-
match_any_activity
(match)¶ Matches an objective bank that has any activity assigned.
Parameters: match ( boolean
) –true
to match objective banks with any activity,false
to match objective banks with no activities
-
activity_terms
¶
-
match_ancestor_objective_bank_id
(objective_bank_id, match)¶ Sets the objective bank
Id
for this query to match objective banks that have the specified objective bank as an ancestor.Parameters: - objective_bank_id (
osid.id.Id
) – an objective bankId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–objective_bank_id
isnull
- objective_bank_id (
-
ancestor_objective_bank_id_terms
¶
-
supports_ancestor_objective_bank_query
()¶ Tests if a
ObjectiveBankQuery
is available for querying ancestor objective banks.Returns: true
if an objective bank query is available,false
otherwiseReturn type: boolean
-
ancestor_objective_bank_query
¶ Gets the query for an objective bank.
Multiple retrievals produce a nested
OR
term.Returns: the objective bank query Return type: osid.learning.ObjectiveBankQuery
Raise: Unimplemented
–supports_ancestor_objective_bank_query()
isfalse
-
match_any_ancestor_objective_bank
(match)¶ Matches an objective bank that has any ancestor.
Parameters: match ( boolean
) –true
to match objective banks with any ancestor,false
to match root objective banks
-
ancestor_objective_bank_terms
¶
-
match_descendant_objective_bank_id
(objective_bank_id, match)¶ Sets the objective bank
Id
for this query to match objective banks that have the specified objective bank as a descendant.Parameters: - objective_bank_id (
osid.id.Id
) – an objective bankId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–objective_bank_id
isnull
- objective_bank_id (
-
descendant_objective_bank_id_terms
¶
-
supports_descendant_objective_bank_query
()¶ Tests if a
ObjectiveBankQuery
is available for querying descendant objective banks.Returns: true
if an objective bank query is available,false
otherwiseReturn type: boolean
-
descendant_objective_bank_query
¶ Gets the query for an objective bank.
Multiple retrievals produce a nested
OR
term.Returns: the objective bank query Return type: osid.learning.ObjectiveBankQuery
Raise: Unimplemented
–supports_descendant_objective_bank_query()
isfalse
-
match_any_descendant_objective_bank
(match)¶ Matches an objective bank that has any descendant.
Parameters: match ( boolean
) –true
to match objective banks with any descendant,false
to match leaf objective banks
-
descendant_objective_bank_terms
¶
-
get_objective_bank_query_record
(objective_bank_record_type)¶ Gets the objective bank query record corresponding to the given
ObjectiveBank
recordType
.Multiple record retrievals produce a nested
OR
term.Parameters: objective_bank_record_type ( osid.type.Type
) – an objective bank record typeReturns: the objective bank query record Return type: osid.learning.records.ObjectiveBankQueryRecord
Raise: NullArgument
–objective_bank_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(objective_bank_record_type)
isfalse
-