repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystem.get_numeric_score_increment
def get_numeric_score_increment(self): """Gets the incremental step. return: (decimal) - the increment raise: IllegalState - ``is_based_on_grades()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if self.is_based_on_grades(): r...
python
def get_numeric_score_increment(self): """Gets the incremental step. return: (decimal) - the increment raise: IllegalState - ``is_based_on_grades()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if self.is_based_on_grades(): r...
[ "def", "get_numeric_score_increment", "(", "self", ")", ":", "if", "self", ".", "is_based_on_grades", "(", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'This GradeSystem is based on grades'", ")", "if", "self", ".", "_my_map", "[", "'numericScoreIncrement...
Gets the incremental step. return: (decimal) - the increment raise: IllegalState - ``is_based_on_grades()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "incremental", "step", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L491-L504
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystem.get_highest_numeric_score
def get_highest_numeric_score(self): """Gets the highest number in a numeric grading system. return: (decimal) - the highest number raise: IllegalState - ``is_based_on_grades()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if self.is_bas...
python
def get_highest_numeric_score(self): """Gets the highest number in a numeric grading system. return: (decimal) - the highest number raise: IllegalState - ``is_based_on_grades()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if self.is_bas...
[ "def", "get_highest_numeric_score", "(", "self", ")", ":", "if", "self", ".", "is_based_on_grades", "(", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'This GradeSystem is based on grades'", ")", "if", "self", ".", "_my_map", "[", "'highestNumericScore'", ...
Gets the highest number in a numeric grading system. return: (decimal) - the highest number raise: IllegalState - ``is_based_on_grades()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "highest", "number", "in", "a", "numeric", "grading", "system", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L508-L521
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm._init_metadata
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._numeric_score_increment_default = self._mdata['numeric_score_increment']['default_decimal_values'][0] self._lowest_numeric_score_default = self._mdata['lowe...
python
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._numeric_score_increment_default = self._mdata['numeric_score_increment']['default_decimal_values'][0] self._lowest_numeric_score_default = self._mdata['lowe...
[ "def", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidObjectForm", ".", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", ")", "self", ".", "_numeric_score_increment_default", "=", "self", ".", "_mdata", "["...
Initialize form metadata
[ "Initialize", "form", "metadata" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L578-L584
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm._init_map
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidObjectForm._init_map(self, record_types=record_types) self._my_map['numericScoreIncrement'] = self._numeric_score_increment_default self._my_map['lowestNumericScore'] = self._lowest_numeric_score...
python
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidObjectForm._init_map(self, record_types=record_types) self._my_map['numericScoreIncrement'] = self._numeric_score_increment_default self._my_map['lowestNumericScore'] = self._lowest_numeric_score...
[ "def", "_init_map", "(", "self", ",", "record_types", "=", "None", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidObjectForm", ".", "_init_map", "(", "self", ",", "record_types", "=", "record_types", ")", "self", ".", "_my_map", "[", "'numeri...
Initialize form map
[ "Initialize", "form", "map" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L586-L594
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.get_based_on_grades_metadata
def get_based_on_grades_metadata(self): """Gets the metadata for a grade-based designation. return: (osid.Metadata) - metadata for the grade-based designation *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.re...
python
def get_based_on_grades_metadata(self): """Gets the metadata for a grade-based designation. return: (osid.Metadata) - metadata for the grade-based designation *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.re...
[ "def", "get_based_on_grades_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'based_on_grades'", "]", ")", "metadata", ".", "update", "(", ...
Gets the metadata for a grade-based designation. return: (osid.Metadata) - metadata for the grade-based designation *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "a", "grade", "-", "based", "designation", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L596-L607
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.set_based_on_grades
def set_based_on_grades(self, grades): """Sets the grade-based designation. arg: grades (boolean): the grade-based designation raise: InvalidArgument - ``grades`` is invalid raise: NoAccess - ``grades`` cannot be modified *compliance: mandatory -- This method must be implem...
python
def set_based_on_grades(self, grades): """Sets the grade-based designation. arg: grades (boolean): the grade-based designation raise: InvalidArgument - ``grades`` is invalid raise: NoAccess - ``grades`` cannot be modified *compliance: mandatory -- This method must be implem...
[ "def", "set_based_on_grades", "(", "self", ",", "grades", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_group_template", "if", "self", ".", "get_based_on_grades_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "errors", ".", ...
Sets the grade-based designation. arg: grades (boolean): the grade-based designation raise: InvalidArgument - ``grades`` is invalid raise: NoAccess - ``grades`` cannot be modified *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "grade", "-", "based", "designation", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L612-L626
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.clear_based_on_grades
def clear_based_on_grades(self): """Clears the based on grades designation. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
python
def clear_based_on_grades(self): """Clears the based on grades designation. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
[ "def", "clear_based_on_grades", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_group_template", "if", "(", "self", ".", "get_based_on_grades_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_based_on_grades...
Clears the based on grades designation. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Clears", "the", "based", "on", "grades", "designation", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L628-L640
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.get_lowest_numeric_score_metadata
def get_lowest_numeric_score_metadata(self): """Gets the metadata for the lowest numeric score. return: (osid.Metadata) - metadata for the lowest numeric score *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.Resource...
python
def get_lowest_numeric_score_metadata(self): """Gets the metadata for the lowest numeric score. return: (osid.Metadata) - metadata for the lowest numeric score *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.Resource...
[ "def", "get_lowest_numeric_score_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'lowest_numeric_score'", "]", ")", "metadata", ".", "update"...
Gets the metadata for the lowest numeric score. return: (osid.Metadata) - metadata for the lowest numeric score *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "lowest", "numeric", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L644-L654
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.set_lowest_numeric_score
def set_lowest_numeric_score(self, score): """Sets the lowest numeric score. arg: score (decimal): the lowest numeric score raise: InvalidArgument - ``score`` is invalid raise: NoAccess - ``score`` cannot be modified *compliance: mandatory -- This method must be implemented...
python
def set_lowest_numeric_score(self, score): """Sets the lowest numeric score. arg: score (decimal): the lowest numeric score raise: InvalidArgument - ``score`` is invalid raise: NoAccess - ``score`` cannot be modified *compliance: mandatory -- This method must be implemented...
[ "def", "set_lowest_numeric_score", "(", "self", ",", "score", ")", ":", "# Implemented from template for osid.grading.GradeSystemForm.set_lowest_numeric_score", "if", "self", ".", "get_lowest_numeric_score_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "e...
Sets the lowest numeric score. arg: score (decimal): the lowest numeric score raise: InvalidArgument - ``score`` is invalid raise: NoAccess - ``score`` cannot be modified *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "lowest", "numeric", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L659-L677
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.clear_lowest_numeric_score
def clear_lowest_numeric_score(self): """Clears the lowest score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.grading.G...
python
def clear_lowest_numeric_score(self): """Clears the lowest score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.grading.G...
[ "def", "clear_lowest_numeric_score", "(", "self", ")", ":", "# Implemented from template for osid.grading.GradeSystemForm.clear_lowest_numeric_score", "if", "(", "self", ".", "get_lowest_numeric_score_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "g...
Clears the lowest score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Clears", "the", "lowest", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L679-L691
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.get_numeric_score_increment_metadata
def get_numeric_score_increment_metadata(self): """Gets the metadata for the lowest numeric score. return: (osid.Metadata) - metadata for the lowest numeric score *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.Resou...
python
def get_numeric_score_increment_metadata(self): """Gets the metadata for the lowest numeric score. return: (osid.Metadata) - metadata for the lowest numeric score *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.Resou...
[ "def", "get_numeric_score_increment_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'numeric_score_increment'", "]", ")", "metadata", ".", "u...
Gets the metadata for the lowest numeric score. return: (osid.Metadata) - metadata for the lowest numeric score *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "lowest", "numeric", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L695-L705
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.set_numeric_score_increment
def set_numeric_score_increment(self, increment): """Sets the numeric score increment. arg: increment (decimal): the numeric score increment raise: InvalidArgument - ``increment`` is invalid raise: NoAccess - ``increment`` cannot be modified *compliance: mandatory -- This m...
python
def set_numeric_score_increment(self, increment): """Sets the numeric score increment. arg: increment (decimal): the numeric score increment raise: InvalidArgument - ``increment`` is invalid raise: NoAccess - ``increment`` cannot be modified *compliance: mandatory -- This m...
[ "def", "set_numeric_score_increment", "(", "self", ",", "increment", ")", ":", "# Implemented from template for osid.grading.GradeSystemForm.set_lowest_numeric_score", "if", "self", ".", "get_numeric_score_increment_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "ra...
Sets the numeric score increment. arg: increment (decimal): the numeric score increment raise: InvalidArgument - ``increment`` is invalid raise: NoAccess - ``increment`` cannot be modified *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "numeric", "score", "increment", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L710-L728
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.clear_numeric_score_increment
def clear_numeric_score_increment(self): """Clears the numeric score increment. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for ...
python
def clear_numeric_score_increment(self): """Clears the numeric score increment. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for ...
[ "def", "clear_numeric_score_increment", "(", "self", ")", ":", "# Implemented from template for osid.grading.GradeSystemForm.clear_lowest_numeric_score", "if", "(", "self", ".", "get_numeric_score_increment_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", "."...
Clears the numeric score increment. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Clears", "the", "numeric", "score", "increment", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L730-L742
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.get_highest_numeric_score_metadata
def get_highest_numeric_score_metadata(self): """Gets the metadata for the highest numeric score. return: (osid.Metadata) - metadata for the highest numeric score *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.Resou...
python
def get_highest_numeric_score_metadata(self): """Gets the metadata for the highest numeric score. return: (osid.Metadata) - metadata for the highest numeric score *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.Resou...
[ "def", "get_highest_numeric_score_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'highest_numeric_score'", "]", ")", "metadata", ".", "updat...
Gets the metadata for the highest numeric score. return: (osid.Metadata) - metadata for the highest numeric score *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "highest", "numeric", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L746-L756
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.set_highest_numeric_score
def set_highest_numeric_score(self, score): """Sets the highest numeric score. arg: score (decimal): the highest numeric score raise: InvalidArgument - ``score`` is invalid raise: NoAccess - ``score`` cannot be modified *compliance: mandatory -- This method must be implemen...
python
def set_highest_numeric_score(self, score): """Sets the highest numeric score. arg: score (decimal): the highest numeric score raise: InvalidArgument - ``score`` is invalid raise: NoAccess - ``score`` cannot be modified *compliance: mandatory -- This method must be implemen...
[ "def", "set_highest_numeric_score", "(", "self", ",", "score", ")", ":", "# Implemented from template for osid.grading.GradeSystemForm.set_lowest_numeric_score", "if", "self", ".", "get_highest_numeric_score_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", ...
Sets the highest numeric score. arg: score (decimal): the highest numeric score raise: InvalidArgument - ``score`` is invalid raise: NoAccess - ``score`` cannot be modified *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "highest", "numeric", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L761-L779
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeSystemForm.clear_highest_numeric_score
def clear_highest_numeric_score(self): """Clears the highest numeric score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
python
def clear_highest_numeric_score(self): """Clears the highest numeric score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
[ "def", "clear_highest_numeric_score", "(", "self", ")", ":", "# Implemented from template for osid.grading.GradeSystemForm.clear_lowest_numeric_score", "if", "(", "self", ".", "get_highest_numeric_score_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", ...
Clears the highest numeric score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Clears", "the", "highest", "numeric", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L781-L793
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntry.get_gradebook_column_id
def get_gradebook_column_id(self): """Gets the ``Id`` of the ``GradebookColumn``. return: (osid.id.Id) - the ``Id`` of the ``GradebookColumn`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective_id...
python
def get_gradebook_column_id(self): """Gets the ``Id`` of the ``GradebookColumn``. return: (osid.id.Id) - the ``Id`` of the ``GradebookColumn`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective_id...
[ "def", "get_gradebook_column_id", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective_id", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'gradebookColumnId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", ...
Gets the ``Id`` of the ``GradebookColumn``. return: (osid.id.Id) - the ``Id`` of the ``GradebookColumn`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Id", "of", "the", "GradebookColumn", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L878-L888
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntry.get_gradebook_column
def get_gradebook_column(self): """Gets the ``GradebookColumn``. return: (osid.grading.GradebookColumn) - the ``GradebookColumn`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # Implemented from temp...
python
def get_gradebook_column(self): """Gets the ``GradebookColumn``. return: (osid.grading.GradebookColumn) - the ``GradebookColumn`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # Implemented from temp...
[ "def", "get_gradebook_column", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'gradebookColumnId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'gr...
Gets the ``GradebookColumn``. return: (osid.grading.GradebookColumn) - the ``GradebookColumn`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "GradebookColumn", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L892-L908
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntry.get_overridden_calculated_entry
def get_overridden_calculated_entry(self): """Gets the calculated entry this entry overrides. return: (osid.grading.GradeEntry) - the calculated entry raise: IllegalState - ``overrides_calculated_entry()`` is ``false`` raise: OperationFailed - unable to complete reques...
python
def get_overridden_calculated_entry(self): """Gets the calculated entry this entry overrides. return: (osid.grading.GradeEntry) - the calculated entry raise: IllegalState - ``overrides_calculated_entry()`` is ``false`` raise: OperationFailed - unable to complete reques...
[ "def", "get_overridden_calculated_entry", "(", "self", ")", ":", "# Implemented from template for osid.resource.Resource.get_avatar_template", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'overriddenCalculatedEntryId'", "]", ")", ":", "raise", "errors", ".", "I...
Gets the calculated entry this entry overrides. return: (osid.grading.GradeEntry) - the calculated entry raise: IllegalState - ``overrides_calculated_entry()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must b...
[ "Gets", "the", "calculated", "entry", "this", "entry", "overrides", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L979-L998
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntry.get_grade_id
def get_grade_id(self): """Gets the grade ``Id`` in this entry if the grading system is based on grades. return: (osid.id.Id) - the grade ``Id`` raise: IllegalState - ``is_graded()`` is ``false`` or ``GradeSystem.isBasedOnGrades()`` is ``false`` *compliance: mandatory -...
python
def get_grade_id(self): """Gets the grade ``Id`` in this entry if the grading system is based on grades. return: (osid.id.Id) - the grade ``Id`` raise: IllegalState - ``is_graded()`` is ``false`` or ``GradeSystem.isBasedOnGrades()`` is ``false`` *compliance: mandatory -...
[ "def", "get_grade_id", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective_id", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'gradeId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'grade empty'", ...
Gets the grade ``Id`` in this entry if the grading system is based on grades. return: (osid.id.Id) - the grade ``Id`` raise: IllegalState - ``is_graded()`` is ``false`` or ``GradeSystem.isBasedOnGrades()`` is ``false`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "grade", "Id", "in", "this", "entry", "if", "the", "grading", "system", "is", "based", "on", "grades", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1025-L1037
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntry.get_grade
def get_grade(self): """Gets the grade in this entry if the grading system is based on grades. return: (osid.grading.Grade) - the grade raise: IllegalState - ``is_graded()`` is ``false`` or ``GradeSystem.isBasedOnGrades()`` is ``false`` raise: OperationFailed - unable ...
python
def get_grade(self): """Gets the grade in this entry if the grading system is based on grades. return: (osid.grading.Grade) - the grade raise: IllegalState - ``is_graded()`` is ``false`` or ``GradeSystem.isBasedOnGrades()`` is ``false`` raise: OperationFailed - unable ...
[ "def", "get_grade", "(", "self", ")", ":", "grade_system", "=", "self", ".", "get_gradebook_column", "(", ")", ".", "get_grade_system", "(", ")", "for", "grade", "in", "grade_system", ".", "get_grades", "(", ")", ":", "if", "str", "(", "grade", ".", "ide...
Gets the grade in this entry if the grading system is based on grades. return: (osid.grading.Grade) - the grade raise: IllegalState - ``is_graded()`` is ``false`` or ``GradeSystem.isBasedOnGrades()`` is ``false`` raise: OperationFailed - unable to complete request *com...
[ "Gets", "the", "grade", "in", "this", "entry", "if", "the", "grading", "system", "is", "based", "on", "grades", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1041-L1056
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntry.get_time_graded
def get_time_graded(self): """Gets the time the gradeable object was graded. return: (osid.calendaring.DateTime) - the timestamp of the grading entry raise: IllegalState - ``is_graded()`` is ``false`` or ``is_derived()`` is ``true`` *compliance: mandator...
python
def get_time_graded(self): """Gets the time the gradeable object was graded. return: (osid.calendaring.DateTime) - the timestamp of the grading entry raise: IllegalState - ``is_graded()`` is ``false`` or ``is_derived()`` is ``true`` *compliance: mandator...
[ "def", "get_time_graded", "(", "self", ")", ":", "if", "not", "self", ".", "is_graded", "(", ")", "or", "self", ".", "is_derived", "(", ")", ":", "raise", "errors", ".", "IllegalState", "(", ")", "time_graded", "=", "self", ".", "_my_map", "[", "'timeG...
Gets the time the gradeable object was graded. return: (osid.calendaring.DateTime) - the timestamp of the grading entry raise: IllegalState - ``is_graded()`` is ``false`` or ``is_derived()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "time", "the", "gradeable", "object", "was", "graded", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1077-L1097
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntry.get_grading_agent_id
def get_grading_agent_id(self): """Gets the ``Id`` of the ``Agent`` that created this entry. return: (osid.id.Id) - the ``Id`` of the ``Agent`` raise: IllegalState - ``is_graded()`` is ``false`` or ``is_derived()`` is ``true`` *compliance: mandatory -- This method must ...
python
def get_grading_agent_id(self): """Gets the ``Id`` of the ``Agent`` that created this entry. return: (osid.id.Id) - the ``Id`` of the ``Agent`` raise: IllegalState - ``is_graded()`` is ``false`` or ``is_derived()`` is ``true`` *compliance: mandatory -- This method must ...
[ "def", "get_grading_agent_id", "(", "self", ")", ":", "if", "not", "self", ".", "is_graded", "or", "self", ".", "is_derived", "(", ")", ":", "raise", "errors", ".", "IllegalState", "(", ")", "return", "Id", "(", "self", ".", "_my_map", "[", "'gradingAgen...
Gets the ``Id`` of the ``Agent`` that created this entry. return: (osid.id.Id) - the ``Id`` of the ``Agent`` raise: IllegalState - ``is_graded()`` is ``false`` or ``is_derived()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Id", "of", "the", "Agent", "that", "created", "this", "entry", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1128-L1139
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.get_ignored_for_calculations_metadata
def get_ignored_for_calculations_metadata(self): """Gets the metadata for the ignore flag. return: (osid.Metadata) - metadata for the ignore flag *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group...
python
def get_ignored_for_calculations_metadata(self): """Gets the metadata for the ignore flag. return: (osid.Metadata) - metadata for the ignore flag *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group...
[ "def", "get_ignored_for_calculations_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'ignored_for_calculations'", "]", ")", "metadata", ".", ...
Gets the metadata for the ignore flag. return: (osid.Metadata) - metadata for the ignore flag *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "ignore", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1245-L1255
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.set_ignored_for_calculations
def set_ignored_for_calculations(self, ignore): """Sets the ignore for calculations flag. arg: ignore (boolean): the new ignore flag raise: InvalidArgument - ``ignore`` is invalid raise: NoAccess - ``ignore`` cannot be modified *compliance: mandatory -- This method must be ...
python
def set_ignored_for_calculations(self, ignore): """Sets the ignore for calculations flag. arg: ignore (boolean): the new ignore flag raise: InvalidArgument - ``ignore`` is invalid raise: NoAccess - ``ignore`` cannot be modified *compliance: mandatory -- This method must be ...
[ "def", "set_ignored_for_calculations", "(", "self", ",", "ignore", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_group_template", "if", "self", ".", "get_ignored_for_calculations_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "...
Sets the ignore for calculations flag. arg: ignore (boolean): the new ignore flag raise: InvalidArgument - ``ignore`` is invalid raise: NoAccess - ``ignore`` cannot be modified *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "ignore", "for", "calculations", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1260-L1274
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.clear_ignored_for_calculations
def clear_ignored_for_calculations(self): """Clears the ignore for calculations flag. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from templat...
python
def clear_ignored_for_calculations(self): """Clears the ignore for calculations flag. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from templat...
[ "def", "clear_ignored_for_calculations", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_group_template", "if", "(", "self", ".", "get_ignored_for_calculations_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "g...
Clears the ignore for calculations flag. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Clears", "the", "ignore", "for", "calculations", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1276-L1288
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.get_grade_metadata
def get_grade_metadata(self): """Gets the metadata for a grade. return: (osid.Metadata) - metadata for the grade *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template metada...
python
def get_grade_metadata(self): """Gets the metadata for a grade. return: (osid.Metadata) - metadata for the grade *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template metada...
[ "def", "get_grade_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'grade'", "]", ")", "metadata", ".", "update", "(", "{", "'existing_i...
Gets the metadata for a grade. return: (osid.Metadata) - metadata for the grade *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "a", "grade", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1292-L1302
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.set_grade
def set_grade(self, grade_id): """Sets the grade. arg: grade_id (osid.id.Id): the new grade raise: InvalidArgument - ``grade_id`` is invalid or ``GradebookColumn.getGradeSystem().isBasedOnGrades()`` is ``false`` raise: NoAccess - ``grade_id`` cannot ...
python
def set_grade(self, grade_id): """Sets the grade. arg: grade_id (osid.id.Id): the new grade raise: InvalidArgument - ``grade_id`` is invalid or ``GradebookColumn.getGradeSystem().isBasedOnGrades()`` is ``false`` raise: NoAccess - ``grade_id`` cannot ...
[ "def", "set_grade", "(", "self", ",", "grade_id", ")", ":", "if", "not", "self", ".", "_grade_system", ".", "is_based_on_grades", "(", ")", ":", "raise", "errors", ".", "InvalidArgument", "(", ")", "if", "self", ".", "get_grade_metadata", "(", ")", ".", ...
Sets the grade. arg: grade_id (osid.id.Id): the new grade raise: InvalidArgument - ``grade_id`` is invalid or ``GradebookColumn.getGradeSystem().isBasedOnGrades()`` is ``false`` raise: NoAccess - ``grade_id`` cannot be modified raise: NullArgument -...
[ "Sets", "the", "grade", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1307-L1329
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.clear_grade
def clear_grade(self): """Clears the grade. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if not self._grade_system.is_based_on_grades(): return ...
python
def clear_grade(self): """Clears the grade. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if not self._grade_system.is_based_on_grades(): return ...
[ "def", "clear_grade", "(", "self", ")", ":", "if", "not", "self", ".", "_grade_system", ".", "is_based_on_grades", "(", ")", ":", "return", "# do nothing, spec does not raise error", "if", "(", "self", ".", "get_grade_metadata", "(", ")", ".", "is_read_only", "(...
Clears the grade. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Clears", "the", "grade", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1331-L1346
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.get_score_metadata
def get_score_metadata(self): """Gets the metadata for a score. return: (osid.Metadata) - metadata for the score *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template metada...
python
def get_score_metadata(self): """Gets the metadata for a score. return: (osid.Metadata) - metadata for the score *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template metada...
[ "def", "get_score_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'score'", "]", ")", "metadata", ".", "update", "(", "{", "'existing_d...
Gets the metadata for a score. return: (osid.Metadata) - metadata for the score *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "a", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1350-L1360
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.set_score
def set_score(self, score): """Sets the score. arg: score (decimal): the new score raise: InvalidArgument - ``score`` is invalid or ``GradebookColumn.getGradeSystem().isBasedOnGrades()`` is ``true`` raise: NoAccess - ``score`` cannot be modified ...
python
def set_score(self, score): """Sets the score. arg: score (decimal): the new score raise: InvalidArgument - ``score`` is invalid or ``GradebookColumn.getGradeSystem().isBasedOnGrades()`` is ``true`` raise: NoAccess - ``score`` cannot be modified ...
[ "def", "set_score", "(", "self", ",", "score", ")", ":", "if", "self", ".", "_grade_system", ".", "is_based_on_grades", "(", ")", ":", "raise", "errors", ".", "InvalidArgument", "(", ")", "if", "self", ".", "get_score_metadata", "(", ")", ".", "is_read_onl...
Sets the score. arg: score (decimal): the new score raise: InvalidArgument - ``score`` is invalid or ``GradebookColumn.getGradeSystem().isBasedOnGrades()`` is ``true`` raise: NoAccess - ``score`` cannot be modified *compliance: mandatory -- This meth...
[ "Sets", "the", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1365-L1389
mitsei/dlkit
dlkit/json_/grading/objects.py
GradeEntryForm.clear_score
def clear_score(self): """Clears the score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if self._grade_system.is_based_on_grades(): return # do...
python
def clear_score(self): """Clears the score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if self._grade_system.is_based_on_grades(): return # do...
[ "def", "clear_score", "(", "self", ")", ":", "if", "self", ".", "_grade_system", ".", "is_based_on_grades", "(", ")", ":", "return", "# do nothing, spec does not raise error", "if", "(", "self", ".", "get_score_metadata", "(", ")", ".", "is_read_only", "(", ")",...
Clears the score. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Clears", "the", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1391-L1406
mitsei/dlkit
dlkit/json_/grading/objects.py
GradebookColumnForm._init_metadata
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._grade_system_default = self._mdata['grade_system']['default_id_values'][0]
python
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._grade_system_default = self._mdata['grade_system']['default_id_values'][0]
[ "def", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidObjectForm", ".", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", ")", "self", ".", "_grade_system_default", "=", "self", ".", "_mdata", "[", "'grade...
Initialize form metadata
[ "Initialize", "form", "metadata" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1574-L1577
mitsei/dlkit
dlkit/json_/grading/objects.py
GradebookColumnSummary._get_entries_for_calculation
def _get_entries_for_calculation(self): """Ignores entries flagged with ignoreForCalculation""" mgr = self._get_provider_manager('Grading') # what about the Proxy? if not mgr.supports_gradebook_column_lookup(): raise errors.OperationFailed('Grading does not support GradebookColumn l...
python
def _get_entries_for_calculation(self): """Ignores entries flagged with ignoreForCalculation""" mgr = self._get_provider_manager('Grading') # what about the Proxy? if not mgr.supports_gradebook_column_lookup(): raise errors.OperationFailed('Grading does not support GradebookColumn l...
[ "def", "_get_entries_for_calculation", "(", "self", ")", ":", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'Grading'", ")", "# what about the Proxy?", "if", "not", "mgr", ".", "supports_gradebook_column_lookup", "(", ")", ":", "raise", "errors", ".", "O...
Ignores entries flagged with ignoreForCalculation
[ "Ignores", "entries", "flagged", "with", "ignoreForCalculation" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1721-L1730
mitsei/dlkit
dlkit/json_/grading/objects.py
GradebookColumnSummary._get_entry_scores
def _get_entry_scores(self): """Takes entries from self._entries and returns a list of scores (or output scores, if based on grades)""" if self.get_gradebook_column().get_grade_system().is_based_on_grades(): return [e.get_grade().get_output_score() for e in self._entries if e.is_grad...
python
def _get_entry_scores(self): """Takes entries from self._entries and returns a list of scores (or output scores, if based on grades)""" if self.get_gradebook_column().get_grade_system().is_based_on_grades(): return [e.get_grade().get_output_score() for e in self._entries if e.is_grad...
[ "def", "_get_entry_scores", "(", "self", ")", ":", "if", "self", ".", "get_gradebook_column", "(", ")", ".", "get_grade_system", "(", ")", ".", "is_based_on_grades", "(", ")", ":", "return", "[", "e", ".", "get_grade", "(", ")", ".", "get_output_score", "(...
Takes entries from self._entries and returns a list of scores (or output scores, if based on grades)
[ "Takes", "entries", "from", "self", ".", "_entries", "and", "returns", "a", "list", "of", "scores", "(", "or", "output", "scores", "if", "based", "on", "grades", ")" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1732-L1738
mitsei/dlkit
dlkit/json_/grading/objects.py
GradebookColumnSummary.get_mode
def get_mode(self): """Gets the mode of the score. If this system is based on grades, the mode of the output score is returned. return: (decimal) - the median score *compliance: mandatory -- This method must be implemented.* """ # http://stackoverflow.com/quest...
python
def get_mode(self): """Gets the mode of the score. If this system is based on grades, the mode of the output score is returned. return: (decimal) - the median score *compliance: mandatory -- This method must be implemented.* """ # http://stackoverflow.com/quest...
[ "def", "get_mode", "(", "self", ")", ":", "# http://stackoverflow.com/questions/10797819/finding-the-mode-of-a-list-in-python", "return", "max", "(", "set", "(", "self", ".", "_entry_scores", ")", ",", "key", "=", "self", ".", "_entry_scores", ".", "count", ")" ]
Gets the mode of the score. If this system is based on grades, the mode of the output score is returned. return: (decimal) - the median score *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "mode", "of", "the", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1802-L1813
mitsei/dlkit
dlkit/json_/grading/objects.py
GradebookColumnSummary.get_rms
def get_rms(self): """Gets the root mean square of the score. If this system is based on grades, the RMS of the output score is returned. return: (decimal) - the median score *compliance: mandatory -- This method must be implemented.* """ return np.sqrt(np.mean...
python
def get_rms(self): """Gets the root mean square of the score. If this system is based on grades, the RMS of the output score is returned. return: (decimal) - the median score *compliance: mandatory -- This method must be implemented.* """ return np.sqrt(np.mean...
[ "def", "get_rms", "(", "self", ")", ":", "return", "np", ".", "sqrt", "(", "np", ".", "mean", "(", "np", ".", "square", "(", "self", ".", "_entry_scores", ")", ")", ")" ]
Gets the root mean square of the score. If this system is based on grades, the RMS of the output score is returned. return: (decimal) - the median score *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "root", "mean", "square", "of", "the", "score", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L1817-L1827
mitsei/dlkit
dlkit/json_/grading/objects.py
GradebookNode.get_gradebook
def get_gradebook(self): """Gets the ``Gradebook`` at this node. return: (osid.grading.Gradebook) - the gradebook represented by this node *compliance: mandatory -- This method must be implemented.* """ if self._lookup_session is None: mgr = get_prov...
python
def get_gradebook(self): """Gets the ``Gradebook`` at this node. return: (osid.grading.Gradebook) - the gradebook represented by this node *compliance: mandatory -- This method must be implemented.* """ if self._lookup_session is None: mgr = get_prov...
[ "def", "get_gradebook", "(", "self", ")", ":", "if", "self", ".", "_lookup_session", "is", "None", ":", "mgr", "=", "get_provider_manager", "(", "'GRADING'", ",", "runtime", "=", "self", ".", "_runtime", ",", "proxy", "=", "self", ".", "_proxy", ")", "se...
Gets the ``Gradebook`` at this node. return: (osid.grading.Gradebook) - the gradebook represented by this node *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Gradebook", "at", "this", "node", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L2041-L2052
mitsei/dlkit
dlkit/json_/grading/objects.py
GradebookNode.get_parent_gradebook_nodes
def get_parent_gradebook_nodes(self): """Gets the parents of this gradebook. return: (osid.grading.GradebookNodeList) - the parents of the ``id`` *compliance: mandatory -- This method must be implemented.* """ parent_gradebook_nodes = [] for node in self...
python
def get_parent_gradebook_nodes(self): """Gets the parents of this gradebook. return: (osid.grading.GradebookNodeList) - the parents of the ``id`` *compliance: mandatory -- This method must be implemented.* """ parent_gradebook_nodes = [] for node in self...
[ "def", "get_parent_gradebook_nodes", "(", "self", ")", ":", "parent_gradebook_nodes", "=", "[", "]", "for", "node", "in", "self", ".", "_my_map", "[", "'parentNodes'", "]", ":", "parent_gradebook_nodes", ".", "append", "(", "GradebookNode", "(", "node", ".", "...
Gets the parents of this gradebook. return: (osid.grading.GradebookNodeList) - the parents of the ``id`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "parents", "of", "this", "gradebook", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/objects.py#L2056-L2071
planetlabs/es_fluent
es_fluent/filters/__init__.py
register_filter
def register_filter(filter_cls): """ Adds the ``filter_cls`` to our registry. """ if filter_cls.name is None: return elif filter_cls.name in FILTER_REGISTRY: raise RuntimeError( "Filter class already registered: {}".format(filter_cls.name)) else: FILTER_REGIST...
python
def register_filter(filter_cls): """ Adds the ``filter_cls`` to our registry. """ if filter_cls.name is None: return elif filter_cls.name in FILTER_REGISTRY: raise RuntimeError( "Filter class already registered: {}".format(filter_cls.name)) else: FILTER_REGIST...
[ "def", "register_filter", "(", "filter_cls", ")", ":", "if", "filter_cls", ".", "name", "is", "None", ":", "return", "elif", "filter_cls", ".", "name", "in", "FILTER_REGISTRY", ":", "raise", "RuntimeError", "(", "\"Filter class already registered: {}\"", ".", "for...
Adds the ``filter_cls`` to our registry.
[ "Adds", "the", "filter_cls", "to", "our", "registry", "." ]
train
https://github.com/planetlabs/es_fluent/blob/74f8db3a1bf9aa1d54512cf2d5e0ec58ee2f4b1c/es_fluent/filters/__init__.py#L22-L32
planetlabs/es_fluent
es_fluent/filters/__init__.py
build_filter
def build_filter(filter_or_string, *args, **kwargs): """ Overloaded filter construction. If ``filter_or_string`` is a string we look up it's corresponding class in the filter registry and return it. Otherwise, assume ``filter_or_string`` is an instance of a filter. :return: :class:`~es_fluent.filte...
python
def build_filter(filter_or_string, *args, **kwargs): """ Overloaded filter construction. If ``filter_or_string`` is a string we look up it's corresponding class in the filter registry and return it. Otherwise, assume ``filter_or_string`` is an instance of a filter. :return: :class:`~es_fluent.filte...
[ "def", "build_filter", "(", "filter_or_string", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "isinstance", "(", "filter_or_string", ",", "basestring", ")", ":", "# Names that start with `~` indicate a negated filter.", "if", "filter_or_string", ".", "s...
Overloaded filter construction. If ``filter_or_string`` is a string we look up it's corresponding class in the filter registry and return it. Otherwise, assume ``filter_or_string`` is an instance of a filter. :return: :class:`~es_fluent.filters.Filter`
[ "Overloaded", "filter", "construction", ".", "If", "filter_or_string", "is", "a", "string", "we", "look", "up", "it", "s", "corresponding", "class", "in", "the", "filter", "registry", "and", "return", "it", ".", "Otherwise", "assume", "filter_or_string", "is", ...
train
https://github.com/planetlabs/es_fluent/blob/74f8db3a1bf9aa1d54512cf2d5e0ec58ee2f4b1c/es_fluent/filters/__init__.py#L35-L52
jason-weirather/py-seq-tools
seqtools/format/gpd.py
GPD.Options
def Options(**kwargs): """ A method for declaring options for the class""" construct = GPDOptions #IMPORTANT! Set this names = construct._fields d = {} for name in names: d[name] = None #default values for k,v in kwargs.iteritems(): if k in names: d[k] = v else: raise ValueE...
python
def Options(**kwargs): """ A method for declaring options for the class""" construct = GPDOptions #IMPORTANT! Set this names = construct._fields d = {} for name in names: d[name] = None #default values for k,v in kwargs.iteritems(): if k in names: d[k] = v else: raise ValueE...
[ "def", "Options", "(", "*", "*", "kwargs", ")", ":", "construct", "=", "GPDOptions", "#IMPORTANT! Set this", "names", "=", "construct", ".", "_fields", "d", "=", "{", "}", "for", "name", "in", "names", ":", "d", "[", "name", "]", "=", "None", "#defaul...
A method for declaring options for the class
[ "A", "method", "for", "declaring", "options", "for", "the", "class" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/gpd.py#L58-L68
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetLookupSession.get_asset
def get_asset(self, asset_id): """Gets the ``Asset`` specified by its ``Id``. In plenary mode, the exact ``Id`` is found or a ``NotFound`` results. Otherwise, the returned ``Asset`` may have a different ``Id`` than requested, such as the case where a duplicate ``Id`` was assigne...
python
def get_asset(self, asset_id): """Gets the ``Asset`` specified by its ``Id``. In plenary mode, the exact ``Id`` is found or a ``NotFound`` results. Otherwise, the returned ``Asset`` may have a different ``Id`` than requested, such as the case where a duplicate ``Id`` was assigne...
[ "def", "get_asset", "(", "self", ",", "asset_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceLookupSession.get_resource", "# NOTE: This implementation currently ignores plenary view", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "co...
Gets the ``Asset`` specified by its ``Id``. In plenary mode, the exact ``Id`` is found or a ``NotFound`` results. Otherwise, the returned ``Asset`` may have a different ``Id`` than requested, such as the case where a duplicate ``Id`` was assigned to an ``Asset`` and retained for compati...
[ "Gets", "the", "Asset", "specified", "by", "its", "Id", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L200-L227
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetLookupSession.get_assets_by_ids
def get_assets_by_ids(self, asset_ids): """Gets an ``AssetList`` corresponding to the given ``IdList``. In plenary mode, the returned list contains all of the assets specified in the ``Id`` list, in the order of the list, including duplicates, or an error results if an ``Id`` in the ...
python
def get_assets_by_ids(self, asset_ids): """Gets an ``AssetList`` corresponding to the given ``IdList``. In plenary mode, the returned list contains all of the assets specified in the ``Id`` list, in the order of the list, including duplicates, or an error results if an ``Id`` in the ...
[ "def", "get_assets_by_ids", "(", "self", ",", "asset_ids", ")", ":", "# Implemented from template for", "# osid.resource.ResourceLookupSession.get_resources_by_ids", "# NOTE: This implementation currently ignores plenary view", "collection", "=", "JSONClientValidated", "(", "'repositor...
Gets an ``AssetList`` corresponding to the given ``IdList``. In plenary mode, the returned list contains all of the assets specified in the ``Id`` list, in the order of the list, including duplicates, or an error results if an ``Id`` in the supplied list is not found or inaccessible. Ot...
[ "Gets", "an", "AssetList", "corresponding", "to", "the", "given", "IdList", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L230-L271
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetLookupSession.get_assets_by_genus_type
def get_assets_by_genus_type(self, asset_genus_type): """Gets an ``AssetList`` corresponding to the given asset genus ``Type`` which does not include assets of types derived from the specified ``Type``. In plenary mode, the returned list contains all known assets or an error results. Otherwise,...
python
def get_assets_by_genus_type(self, asset_genus_type): """Gets an ``AssetList`` corresponding to the given asset genus ``Type`` which does not include assets of types derived from the specified ``Type``. In plenary mode, the returned list contains all known assets or an error results. Otherwise,...
[ "def", "get_assets_by_genus_type", "(", "self", ",", "asset_genus_type", ")", ":", "# Implemented from template for", "# osid.resource.ResourceLookupSession.get_resources_by_genus_type", "# NOTE: This implementation currently ignores plenary view", "collection", "=", "JSONClientValidated",...
Gets an ``AssetList`` corresponding to the given asset genus ``Type`` which does not include assets of types derived from the specified ``Type``. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are...
[ "Gets", "an", "AssetList", "corresponding", "to", "the", "given", "asset", "genus", "Type", "which", "does", "not", "include", "assets", "of", "types", "derived", "from", "the", "specified", "Type", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L274-L299
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetLookupSession.get_assets
def get_assets(self): """Gets all ``Assets``. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session. return: (osid.repository.AssetList) - a list of `...
python
def get_assets(self): """Gets all ``Assets``. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session. return: (osid.repository.AssetList) - a list of `...
[ "def", "get_assets", "(", "self", ")", ":", "# Implemented from template for", "# osid.resource.ResourceLookupSession.get_resources", "# NOTE: This implementation currently ignores plenary view", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", ...
Gets all ``Assets``. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session. return: (osid.repository.AssetList) - a list of ``Assets`` raise: Operati...
[ "Gets", "all", "Assets", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L364-L384
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetContentLookupSession.get_asset_content
def get_asset_content(self, asset_content_id): """Gets the ``AssetContent`` specified by its ``Id``. In plenary mode, the exact ``Id`` is found or a ``NotFound`` results. Otherwise, the returned ``AssetContent`` may have a different ``Id`` than requested, such as the case where a duplic...
python
def get_asset_content(self, asset_content_id): """Gets the ``AssetContent`` specified by its ``Id``. In plenary mode, the exact ``Id`` is found or a ``NotFound`` results. Otherwise, the returned ``AssetContent`` may have a different ``Id`` than requested, such as the case where a duplic...
[ "def", "get_asset_content", "(", "self", ",", "asset_content_id", ")", ":", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Asset'", ",", "runtime", "=", "self", ".", "_runtime", ")", "asset_content_identifier", "=", "Objec...
Gets the ``AssetContent`` specified by its ``Id``. In plenary mode, the exact ``Id`` is found or a ``NotFound`` results. Otherwise, the returned ``AssetContent`` may have a different ``Id`` than requested, such as the case where a duplicate ``Id`` was assigned to an ``AssetContent`` and...
[ "Gets", "the", "AssetContent", "specified", "by", "its", "Id", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L548-L578
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetContentLookupSession.get_asset_contents_by_ids
def get_asset_contents_by_ids(self, asset_content_ids): """Gets an ``AssetList`` corresponding to the given ``IdList``. In plenary mode, the returned list contains all of the asset contents specified in the ``Id`` list, in the order of the list, including duplicates, or an error results...
python
def get_asset_contents_by_ids(self, asset_content_ids): """Gets an ``AssetList`` corresponding to the given ``IdList``. In plenary mode, the returned list contains all of the asset contents specified in the ``Id`` list, in the order of the list, including duplicates, or an error results...
[ "def", "get_asset_contents_by_ids", "(", "self", ",", "asset_content_ids", ")", ":", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Asset'", ",", "runtime", "=", "self", ".", "_runtime", ")", "object_id_list", "=", "[", ...
Gets an ``AssetList`` corresponding to the given ``IdList``. In plenary mode, the returned list contains all of the asset contents specified in the ``Id`` list, in the order of the list, including duplicates, or an error results if an ``Id`` in the supplied list is not found or inaccess...
[ "Gets", "an", "AssetList", "corresponding", "to", "the", "given", "IdList", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L581-L619
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetContentLookupSession.get_asset_contents_by_genus_type
def get_asset_contents_by_genus_type(self, asset_content_genus_type): """Gets an ``AssetContentList`` corresponding to the given asset content genus ``Type`` which does not include asset contents of types derived from the specified ``Type``. In plenary mode, the returned list contains all known asset c...
python
def get_asset_contents_by_genus_type(self, asset_content_genus_type): """Gets an ``AssetContentList`` corresponding to the given asset content genus ``Type`` which does not include asset contents of types derived from the specified ``Type``. In plenary mode, the returned list contains all known asset c...
[ "def", "get_asset_contents_by_genus_type", "(", "self", ",", "asset_content_genus_type", ")", ":", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Asset'", ",", "runtime", "=", "self", ".", "_runtime", ")", "results", "=", ...
Gets an ``AssetContentList`` corresponding to the given asset content genus ``Type`` which does not include asset contents of types derived from the specified ``Type``. In plenary mode, the returned list contains all known asset contents or an error results. Otherwise, the returned list may contain onl...
[ "Gets", "an", "AssetContentList", "corresponding", "to", "the", "given", "asset", "content", "genus", "Type", "which", "does", "not", "include", "asset", "contents", "of", "types", "derived", "from", "the", "specified", "Type", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L622-L652
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetContentLookupSession.get_asset_contents_for_asset
def get_asset_contents_for_asset(self, asset_id): """Gets an ``AssetList`` from the given Asset. In plenary mode, the returned list contains all known asset contents or an error results. Otherwise, the returned list may contain only those asset contents that are accessible through this ...
python
def get_asset_contents_for_asset(self, asset_id): """Gets an ``AssetList`` from the given Asset. In plenary mode, the returned list contains all known asset contents or an error results. Otherwise, the returned list may contain only those asset contents that are accessible through this ...
[ "def", "get_asset_contents_for_asset", "(", "self", ",", "asset_id", ")", ":", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Asset'", ",", "runtime", "=", "self", ".", "_runtime", ")", "result", "=", "collection", ".", ...
Gets an ``AssetList`` from the given Asset. In plenary mode, the returned list contains all known asset contents or an error results. Otherwise, the returned list may contain only those asset contents that are accessible through this session. :param asset_id: an asset ``Id`` :t...
[ "Gets", "an", "AssetList", "from", "the", "given", "Asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L697-L722
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetQuerySession.get_assets_by_query
def get_assets_by_query(self, asset_query): """Gets a list of ``Assets`` matching the given asset query. arg: asset_query (osid.repository.AssetQuery): the asset query return: (osid.repository.AssetList) - the returned ``AssetList`` raise: NullArgument - ``asset_quer...
python
def get_assets_by_query(self, asset_query): """Gets a list of ``Assets`` matching the given asset query. arg: asset_query (osid.repository.AssetQuery): the asset query return: (osid.repository.AssetList) - the returned ``AssetList`` raise: NullArgument - ``asset_quer...
[ "def", "get_assets_by_query", "(", "self", ",", "asset_query", ")", ":", "# Implemented from template for", "# osid.resource.ResourceQuerySession.get_resources_by_query", "and_list", "=", "list", "(", ")", "or_list", "=", "list", "(", ")", "for", "term", "in", "asset_qu...
Gets a list of ``Assets`` matching the given asset query. arg: asset_query (osid.repository.AssetQuery): the asset query return: (osid.repository.AssetList) - the returned ``AssetList`` raise: NullArgument - ``asset_query`` is ``null`` raise: OperationFailed - unabl...
[ "Gets", "a", "list", "of", "Assets", "matching", "the", "given", "asset", "query", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L875-L914
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetSearchSession.get_assets_by_search
def get_assets_by_search(self, asset_query, asset_search): """Gets the search results matching the given search query using the given search. arg: asset_query (osid.repository.AssetQuery): the asset query arg: asset_search (osid.repository.AssetSearch): the asset ...
python
def get_assets_by_search(self, asset_query, asset_search): """Gets the search results matching the given search query using the given search. arg: asset_query (osid.repository.AssetQuery): the asset query arg: asset_search (osid.repository.AssetSearch): the asset ...
[ "def", "get_assets_by_search", "(", "self", ",", "asset_query", ",", "asset_search", ")", ":", "# Implemented from template for", "# osid.resource.ResourceSearchSession.get_resources_by_search_template", "# Copied from osid.resource.ResourceQuerySession.get_resources_by_query_template", "a...
Gets the search results matching the given search query using the given search. arg: asset_query (osid.repository.AssetQuery): the asset query arg: asset_search (osid.repository.AssetSearch): the asset search return: (osid.repository.AssetSearchResults) - t...
[ "Gets", "the", "search", "results", "matching", "the", "given", "search", "query", "using", "the", "given", "search", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1047-L1091
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.get_asset_form_for_create
def get_asset_form_for_create(self, asset_record_types): """Gets the asset form for creating new assets. A new form should be requested for each create transaction. arg: asset_record_types (osid.type.Type[]): array of asset record types return: (osid.repository.Asset...
python
def get_asset_form_for_create(self, asset_record_types): """Gets the asset form for creating new assets. A new form should be requested for each create transaction. arg: asset_record_types (osid.type.Type[]): array of asset record types return: (osid.repository.Asset...
[ "def", "get_asset_form_for_create", "(", "self", ",", "asset_record_types", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.get_resource_form_for_create_template", "for", "arg", "in", "asset_record_types", ":", "if", "not", "isinstance", "(", ...
Gets the asset form for creating new assets. A new form should be requested for each create transaction. arg: asset_record_types (osid.type.Type[]): array of asset record types return: (osid.repository.AssetForm) - the asset form raise: NullArgument - ``asset_record...
[ "Gets", "the", "asset", "form", "for", "creating", "new", "assets", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1279-L1314
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.create_asset
def create_asset(self, asset_form): """Creates a new ``Asset``. arg: asset_form (osid.repository.AssetForm): the form for this ``Asset`` return: (osid.repository.Asset) - the new ``Asset`` raise: IllegalState - ``asset_form`` already used in a create ...
python
def create_asset(self, asset_form): """Creates a new ``Asset``. arg: asset_form (osid.repository.AssetForm): the form for this ``Asset`` return: (osid.repository.Asset) - the new ``Asset`` raise: IllegalState - ``asset_form`` already used in a create ...
[ "def", "create_asset", "(", "self", ",", "asset_form", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.create_resource_template", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Asset'", ",", "runtime...
Creates a new ``Asset``. arg: asset_form (osid.repository.AssetForm): the form for this ``Asset`` return: (osid.repository.Asset) - the new ``Asset`` raise: IllegalState - ``asset_form`` already used in a create transaction raise: InvalidArgument - o...
[ "Creates", "a", "new", "Asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1317-L1359
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.update_asset
def update_asset(self, asset_form): """Updates an existing asset. arg: asset_form (osid.repository.AssetForm): the form containing the elements to be updated raise: IllegalState - ``asset_form`` already used in anupdate transaction raise: InvalidArgu...
python
def update_asset(self, asset_form): """Updates an existing asset. arg: asset_form (osid.repository.AssetForm): the form containing the elements to be updated raise: IllegalState - ``asset_form`` already used in anupdate transaction raise: InvalidArgu...
[ "def", "update_asset", "(", "self", ",", "asset_form", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.update_resource_template", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Asset'", ",", "runtime...
Updates an existing asset. arg: asset_form (osid.repository.AssetForm): the form containing the elements to be updated raise: IllegalState - ``asset_form`` already used in anupdate transaction raise: InvalidArgument - the form contains an invalid value ...
[ "Updates", "an", "existing", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1415-L1455
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.delete_asset
def delete_asset(self, asset_id): """Deletes an ``Asset``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` to remove raise: NotFound - ``asset_id`` not found raise: NullArgument - ``asset_id`` is ``null`` raise: OperationFailed - unable to complete ...
python
def delete_asset(self, asset_id): """Deletes an ``Asset``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` to remove raise: NotFound - ``asset_id`` not found raise: NullArgument - ``asset_id`` is ``null`` raise: OperationFailed - unable to complete ...
[ "def", "delete_asset", "(", "self", ",", "asset_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.delete_resource_template", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Asset'", ",", "runtime",...
Deletes an ``Asset``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` to remove raise: NotFound - ``asset_id`` not found raise: NullArgument - ``asset_id`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - au...
[ "Deletes", "an", "Asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1478-L1502
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.alias_asset
def alias_asset(self, asset_id, alias_id): """Adds an ``Id`` to an ``Asset`` for the purpose of creating compatibility. The primary ``Id`` of the ``Asset`` is determined by the provider. The new ``Id`` performs as an alias to the primary ``Id``. If the alias is a pointer to another asse...
python
def alias_asset(self, asset_id, alias_id): """Adds an ``Id`` to an ``Asset`` for the purpose of creating compatibility. The primary ``Id`` of the ``Asset`` is determined by the provider. The new ``Id`` performs as an alias to the primary ``Id``. If the alias is a pointer to another asse...
[ "def", "alias_asset", "(", "self", ",", "asset_id", ",", "alias_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.alias_resources_template", "self", ".", "_alias_id", "(", "primary_id", "=", "asset_id", ",", "equivalent_id", "=", "ali...
Adds an ``Id`` to an ``Asset`` for the purpose of creating compatibility. The primary ``Id`` of the ``Asset`` is determined by the provider. The new ``Id`` performs as an alias to the primary ``Id``. If the alias is a pointer to another asset, it is reassigned to the given asset ``Id``....
[ "Adds", "an", "Id", "to", "an", "Asset", "for", "the", "purpose", "of", "creating", "compatibility", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1523-L1543
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.get_asset_content_form_for_create
def get_asset_content_form_for_create(self, asset_id, asset_content_record_types): """Gets an asset content form for creating new assets. arg: asset_id (osid.id.Id): the ``Id`` of an ``Asset`` arg: asset_content_record_types (osid.type.Type[]): array of asset content recor...
python
def get_asset_content_form_for_create(self, asset_id, asset_content_record_types): """Gets an asset content form for creating new assets. arg: asset_id (osid.id.Id): the ``Id`` of an ``Asset`` arg: asset_content_record_types (osid.type.Type[]): array of asset content recor...
[ "def", "get_asset_content_form_for_create", "(", "self", ",", "asset_id", ",", "asset_content_record_types", ")", ":", "# Implemented from template for", "# osid.learning.ActivityAdminSession.get_activity_form_for_create_template", "if", "not", "isinstance", "(", "asset_id", ",", ...
Gets an asset content form for creating new assets. arg: asset_id (osid.id.Id): the ``Id`` of an ``Asset`` arg: asset_content_record_types (osid.type.Type[]): array of asset content record types return: (osid.repository.AssetContentForm) - the asset content ...
[ "Gets", "an", "asset", "content", "form", "for", "creating", "new", "assets", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1592-L1636
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.create_asset_content
def create_asset_content(self, asset_content_form): """Creates new ``AssetContent`` for a given asset. arg: asset_content_form (osid.repository.AssetContentForm): the form for this ``AssetContent`` return: (osid.repository.AssetContent) - the new ``AssetConten...
python
def create_asset_content(self, asset_content_form): """Creates new ``AssetContent`` for a given asset. arg: asset_content_form (osid.repository.AssetContentForm): the form for this ``AssetContent`` return: (osid.repository.AssetContent) - the new ``AssetConten...
[ "def", "create_asset_content", "(", "self", ",", "asset_content_form", ")", ":", "# Implemented from template for", "# osid.repository.AssetAdminSession.create_asset_content_template", "from", "dlkit", ".", "abstract_osid", ".", "repository", ".", "objects", "import", "AssetCon...
Creates new ``AssetContent`` for a given asset. arg: asset_content_form (osid.repository.AssetContentForm): the form for this ``AssetContent`` return: (osid.repository.AssetContent) - the new ``AssetContent`` raise: IllegalState - ``asset_content_form`` alrea...
[ "Creates", "new", "AssetContent", "for", "a", "given", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1639-L1688
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.get_asset_content_form_for_update
def get_asset_content_form_for_update(self, asset_content_id): """Gets the asset content form for updating an existing asset content. A new asset content form should be requested for each update transaction. arg: asset_content_id (osid.id.Id): the ``Id`` of the ``Ass...
python
def get_asset_content_form_for_update(self, asset_content_id): """Gets the asset content form for updating an existing asset content. A new asset content form should be requested for each update transaction. arg: asset_content_id (osid.id.Id): the ``Id`` of the ``Ass...
[ "def", "get_asset_content_form_for_update", "(", "self", ",", "asset_content_id", ")", ":", "# Implemented from template for", "# osid.repository.AssetAdminSession.get_asset_content_form_for_update_template", "from", "dlkit", ".", "abstract_osid", ".", "id", ".", "primitives", "i...
Gets the asset content form for updating an existing asset content. A new asset content form should be requested for each update transaction. arg: asset_content_id (osid.id.Id): the ``Id`` of the ``AssetContent`` return: (osid.repository.AssetContentForm) - the asset...
[ "Gets", "the", "asset", "content", "form", "for", "updating", "an", "existing", "asset", "content", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1711-L1746
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.update_asset_content
def update_asset_content(self, asset_content_form): """Updates an existing asset content. arg: asset_content_form (osid.repository.AssetContentForm): the form containing the elements to be updated raise: IllegalState - ``asset_content_form`` already used in an ...
python
def update_asset_content(self, asset_content_form): """Updates an existing asset content. arg: asset_content_form (osid.repository.AssetContentForm): the form containing the elements to be updated raise: IllegalState - ``asset_content_form`` already used in an ...
[ "def", "update_asset_content", "(", "self", ",", "asset_content_form", ")", ":", "# Implemented from template for", "# osid.repository.AssetAdminSession.update_asset_content_template", "from", "dlkit", ".", "abstract_osid", ".", "repository", ".", "objects", "import", "AssetCon...
Updates an existing asset content. arg: asset_content_form (osid.repository.AssetContentForm): the form containing the elements to be updated raise: IllegalState - ``asset_content_form`` already used in an update transaction raise: InvalidArgument - the form...
[ "Updates", "an", "existing", "asset", "content", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1749-L1808
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession.delete_asset_content
def delete_asset_content(self, asset_content_id): """Deletes content from an ``Asset``. arg: asset_content_id (osid.id.Id): the ``Id`` of the ``AssetContent`` raise: NotFound - ``asset_content_id`` is not found raise: NullArgument - ``asset_content_id`` is ``null`` ...
python
def delete_asset_content(self, asset_content_id): """Deletes content from an ``Asset``. arg: asset_content_id (osid.id.Id): the ``Id`` of the ``AssetContent`` raise: NotFound - ``asset_content_id`` is not found raise: NullArgument - ``asset_content_id`` is ``null`` ...
[ "def", "delete_asset_content", "(", "self", ",", "asset_content_id", ")", ":", "# Implemented from template for", "# osid.repository.AssetAdminSession.delete_asset_content_template", "from", "dlkit", ".", "abstract_osid", ".", "id", ".", "primitives", "import", "Id", "as", ...
Deletes content from an ``Asset``. arg: asset_content_id (osid.id.Id): the ``Id`` of the ``AssetContent`` raise: NotFound - ``asset_content_id`` is not found raise: NullArgument - ``asset_content_id`` is ``null`` raise: OperationFailed - unable to complete request ...
[ "Deletes", "content", "from", "an", "Asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1831-L1867
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetAdminSession._get_asset_id_with_enclosure
def _get_asset_id_with_enclosure(self, enclosure_id): """Create an Asset with an enclosed foreign object. This is here to support AssetCompositionSession.set_asset. May need to add this in other objects to support other osid.Containable objects. return: (osid.id.Id) - the id of the new ...
python
def _get_asset_id_with_enclosure(self, enclosure_id): """Create an Asset with an enclosed foreign object. This is here to support AssetCompositionSession.set_asset. May need to add this in other objects to support other osid.Containable objects. return: (osid.id.Id) - the id of the new ...
[ "def", "_get_asset_id_with_enclosure", "(", "self", ",", "enclosure_id", ")", ":", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY'", ")", "query_session", "=", "mgr", ".", "get_asset_query_session_for_repository", "(", "self", ".", "_catalog_id", ...
Create an Asset with an enclosed foreign object. This is here to support AssetCompositionSession.set_asset. May need to add this in other objects to support other osid.Containable objects. return: (osid.id.Id) - the id of the new Asset
[ "Create", "an", "Asset", "with", "an", "enclosed", "foreign", "object", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L1869-L1888
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetNotificationSession.register_for_new_assets_by_genus_type
def register_for_new_assets_by_genus_type(self, asset_genus_type): """Registers for notification of new assets of the given asset genus type. ``AssetReceiver.newAssets()`` is invoked when an asset is appears in this repository. arg: asset_genus_type (osid.type.Type): the genus type ...
python
def register_for_new_assets_by_genus_type(self, asset_genus_type): """Registers for notification of new assets of the given asset genus type. ``AssetReceiver.newAssets()`` is invoked when an asset is appears in this repository. arg: asset_genus_type (osid.type.Type): the genus type ...
[ "def", "register_for_new_assets_by_genus_type", "(", "self", ",", "asset_genus_type", ")", ":", "# Implemented from template for", "# osid.resource.ResourceNotificationSession.register_for_changed_resource", "if", "not", "MONGO_LISTENER", ".", "receivers", "[", "self", ".", "_ns"...
Registers for notification of new assets of the given asset genus type. ``AssetReceiver.newAssets()`` is invoked when an asset is appears in this repository. arg: asset_genus_type (osid.type.Type): the genus type of the ``Asset`` to monitor raise: NullArgument - ``a...
[ "Registers", "for", "notification", "of", "new", "assets", "of", "the", "given", "asset", "genus", "type", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2058-L2077
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetNotificationSession.register_for_deleted_asset
def register_for_deleted_asset(self, asset_id): """Registers for notification of a deleted asset. ``AssetReceiver.deletedAssets()`` is invoked when the specified asset is deleted or removed from this repository. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` to ...
python
def register_for_deleted_asset(self, asset_id): """Registers for notification of a deleted asset. ``AssetReceiver.deletedAssets()`` is invoked when the specified asset is deleted or removed from this repository. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` to ...
[ "def", "register_for_deleted_asset", "(", "self", ",", "asset_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceNotificationSession.register_for_deleted_resource", "if", "not", "MONGO_LISTENER", ".", "receivers", "[", "self", ".", "_ns", "]", "[", "...
Registers for notification of a deleted asset. ``AssetReceiver.deletedAssets()`` is invoked when the specified asset is deleted or removed from this repository. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` to monitor raise: NullArgument - ``asset_id`` is ...
[ "Registers", "for", "notification", "of", "a", "deleted", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2176-L2195
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositorySession.get_asset_ids_by_repository
def get_asset_ids_by_repository(self, repository_id): """Gets the list of ``Asset`` ``Ids`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of related asset ``Ids`` raise: NotFound - ``repository_id`` i...
python
def get_asset_ids_by_repository(self, repository_id): """Gets the list of ``Asset`` ``Ids`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of related asset ``Ids`` raise: NotFound - ``repository_id`` i...
[ "def", "get_asset_ids_by_repository", "(", "self", ",", "repository_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_resource_ids_by_bin", "id_list", "=", "[", "]", "for", "asset", "in", "self", ".", "get_assets_by_repository", "(", ...
Gets the list of ``Asset`` ``Ids`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of related asset ``Ids`` raise: NotFound - ``repository_id`` is not found raise: NullArgument - ``repository_id`` is `...
[ "Gets", "the", "list", "of", "Asset", "Ids", "associated", "with", "a", "Repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2310-L2327
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositorySession.get_assets_by_repository
def get_assets_by_repository(self, repository_id): """Gets the list of ``Assets`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.repository.AssetList) - list of related assets raise: NotFound - ``repository_id`` is not f...
python
def get_assets_by_repository(self, repository_id): """Gets the list of ``Assets`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.repository.AssetList) - list of related assets raise: NotFound - ``repository_id`` is not f...
[ "def", "get_assets_by_repository", "(", "self", ",", "repository_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_resources_by_bin", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY'", ",", "local", "=", "True", ")...
Gets the list of ``Assets`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.repository.AssetList) - list of related assets raise: NotFound - ``repository_id`` is not found raise: NullArgument - ``repository_id`` is ``nul...
[ "Gets", "the", "list", "of", "Assets", "associated", "with", "a", "Repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2330-L2347
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositorySession.get_asset_ids_by_repositories
def get_asset_ids_by_repositories(self, repository_ids): """Gets the list of ``Asset Ids`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.id.IdList) - list of asset ``Ids`` raise: Null...
python
def get_asset_ids_by_repositories(self, repository_ids): """Gets the list of ``Asset Ids`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.id.IdList) - list of asset ``Ids`` raise: Null...
[ "def", "get_asset_ids_by_repositories", "(", "self", ",", "repository_ids", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_resource_ids_by_bins", "id_list", "=", "[", "]", "for", "asset", "in", "self", ".", "get_assets_by_repositories", "...
Gets the list of ``Asset Ids`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.id.IdList) - list of asset ``Ids`` raise: NullArgument - ``repository_ids`` is ``null`` raise: OperationF...
[ "Gets", "the", "list", "of", "Asset", "Ids", "corresponding", "to", "a", "list", "of", "Repository", "objects", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2350-L2367
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositorySession.get_assets_by_repositories
def get_assets_by_repositories(self, repository_ids): """Gets the list of ``Assets`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.repository.AssetList) - list of assets raise: NullAr...
python
def get_assets_by_repositories(self, repository_ids): """Gets the list of ``Assets`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.repository.AssetList) - list of assets raise: NullAr...
[ "def", "get_assets_by_repositories", "(", "self", ",", "repository_ids", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_resources_by_bins", "asset_list", "=", "[", "]", "for", "repository_id", "in", "repository_ids", ":", "asset_list", "+...
Gets the list of ``Assets`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.repository.AssetList) - list of assets raise: NullArgument - ``repository_ids`` is ``null`` raise: Operation...
[ "Gets", "the", "list", "of", "Assets", "corresponding", "to", "a", "list", "of", "Repository", "objects", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2370-L2388
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositorySession.get_repository_ids_by_asset
def get_repository_ids_by_asset(self, asset_id): """Gets the list of ``Repository`` ``Ids`` mapped to an ``Asset``. arg: asset_id (osid.id.Id): ``Id`` of an ``Asset`` return: (osid.id.IdList) - list of repository ``Ids`` raise: NotFound - ``asset_id`` is not found raise: N...
python
def get_repository_ids_by_asset(self, asset_id): """Gets the list of ``Repository`` ``Ids`` mapped to an ``Asset``. arg: asset_id (osid.id.Id): ``Id`` of an ``Asset`` return: (osid.id.IdList) - list of repository ``Ids`` raise: NotFound - ``asset_id`` is not found raise: N...
[ "def", "get_repository_ids_by_asset", "(", "self", ",", "asset_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_bin_ids_by_resource", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY'", ",", "local", "=", "True", "...
Gets the list of ``Repository`` ``Ids`` mapped to an ``Asset``. arg: asset_id (osid.id.Id): ``Id`` of an ``Asset`` return: (osid.id.IdList) - list of repository ``Ids`` raise: NotFound - ``asset_id`` is not found raise: NullArgument - ``asset_id`` is ``null`` raise: Opera...
[ "Gets", "the", "list", "of", "Repository", "Ids", "mapped", "to", "an", "Asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2391-L2412
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositorySession.get_repositories_by_asset
def get_repositories_by_asset(self, asset_id): """Gets the list of ``Repository`` objects mapped to an ``Asset``. arg: asset_id (osid.id.Id): ``Id`` of an ``Asset`` return: (osid.repository.RepositoryList) - list of repositories raise: NotFound - ``asset_id`` is not found ra...
python
def get_repositories_by_asset(self, asset_id): """Gets the list of ``Repository`` objects mapped to an ``Asset``. arg: asset_id (osid.id.Id): ``Id`` of an ``Asset`` return: (osid.repository.RepositoryList) - list of repositories raise: NotFound - ``asset_id`` is not found ra...
[ "def", "get_repositories_by_asset", "(", "self", ",", "asset_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_bins_by_resource", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY'", ",", "local", "=", "True", ")", ...
Gets the list of ``Repository`` objects mapped to an ``Asset``. arg: asset_id (osid.id.Id): ``Id`` of an ``Asset`` return: (osid.repository.RepositoryList) - list of repositories raise: NotFound - ``asset_id`` is not found raise: NullArgument - ``asset_id`` is ``null`` rais...
[ "Gets", "the", "list", "of", "Repository", "objects", "mapped", "to", "an", "Asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2415-L2432
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositoryAssignmentSession.get_assignable_repository_ids
def get_assignable_repository_ids(self, repository_id): """Gets a list of repositories including and under the given repository node in which any asset can be assigned. arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of assign...
python
def get_assignable_repository_ids(self, repository_id): """Gets a list of repositories including and under the given repository node in which any asset can be assigned. arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of assign...
[ "def", "get_assignable_repository_ids", "(", "self", ",", "repository_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinAssignmentSession.get_assignable_bin_ids", "# This will likely be overridden by an authorization adapter", "mgr", "=", "self", ".", "_get_...
Gets a list of repositories including and under the given repository node in which any asset can be assigned. arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of assignable repository ``Ids`` raise: NullArgument - ``repository...
[ "Gets", "a", "list", "of", "repositories", "including", "and", "under", "the", "given", "repository", "node", "in", "which", "any", "asset", "can", "be", "assigned", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2503-L2523
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositoryAssignmentSession.assign_asset_to_repository
def assign_asset_to_repository(self, asset_id, repository_id): """Adds an existing ``Asset`` to a ``Repository``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` raise: AlreadyExists - ``ass...
python
def assign_asset_to_repository(self, asset_id, repository_id): """Adds an existing ``Asset`` to a ``Repository``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` raise: AlreadyExists - ``ass...
[ "def", "assign_asset_to_repository", "(", "self", ",", "asset_id", ",", "repository_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinAssignmentSession.assign_resource_to_bin", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY'", ",...
Adds an existing ``Asset`` to a ``Repository``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` raise: AlreadyExists - ``asset_id`` already assigned to ``repository_id`` rais...
[ "Adds", "an", "existing", "Asset", "to", "a", "Repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2545-L2566
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetRepositoryAssignmentSession.unassign_asset_from_repository
def unassign_asset_from_repository(self, asset_id, repository_id): """Removes an ``Asset`` from a ``Repository``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` raise: NotFound - ``asset_id...
python
def unassign_asset_from_repository(self, asset_id, repository_id): """Removes an ``Asset`` from a ``Repository``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` raise: NotFound - ``asset_id...
[ "def", "unassign_asset_from_repository", "(", "self", ",", "asset_id", ",", "repository_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinAssignmentSession.unassign_resource_from_bin", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY...
Removes an ``Asset`` from a ``Repository``. arg: asset_id (osid.id.Id): the ``Id`` of the ``Asset`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` raise: NotFound - ``asset_id`` or ``repository_id`` not found or ``asset_id`` not assigned...
[ "Removes", "an", "Asset", "from", "a", "Repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2569-L2589
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetCompositionSession.get_composition_assets
def get_composition_assets(self, composition_id): """Gets the list of assets mapped to the given ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` return: (osid.repository.AssetList) - list of assets raise: NotFound - ``composition_id``...
python
def get_composition_assets(self, composition_id): """Gets the list of assets mapped to the given ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` return: (osid.repository.AssetList) - list of assets raise: NotFound - ``composition_id``...
[ "def", "get_composition_assets", "(", "self", ",", "composition_id", ")", ":", "# Implemented from template for", "# osid.repository.AssetCompositionSession.get_composition_assets", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Compositi...
Gets the list of assets mapped to the given ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` return: (osid.repository.AssetList) - list of assets raise: NotFound - ``composition_id`` not found raise: NullArgument - ``composition_id`` ...
[ "Gets", "the", "list", "of", "assets", "mapped", "to", "the", "given", "Composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2733-L2762
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetCompositionSession.get_compositions_by_asset
def get_compositions_by_asset(self, asset_id): """Gets a list of compositions including the given asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` return: (osid.repository.CompositionList) - the returned ``Composition list`` raise: NotFound - ``asset_id`` i...
python
def get_compositions_by_asset(self, asset_id): """Gets a list of compositions including the given asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` return: (osid.repository.CompositionList) - the returned ``Composition list`` raise: NotFound - ``asset_id`` i...
[ "def", "get_compositions_by_asset", "(", "self", ",", "asset_id", ")", ":", "# Implemented from template for", "# osid.repository.AssetCompositionSession.get_compositions_by_asset", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Compositi...
Gets a list of compositions including the given asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` return: (osid.repository.CompositionList) - the returned ``Composition list`` raise: NotFound - ``asset_id`` is not found raise: NullArgument - ``asset_id`` is...
[ "Gets", "a", "list", "of", "compositions", "including", "the", "given", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2765-L2786
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetCompositionDesignSession.add_asset
def add_asset(self, asset_id, composition_id): """Appends an asset to a composition. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: AlreadyExists - ``asset_id`` already part ...
python
def add_asset(self, asset_id, composition_id): """Appends an asset to a composition. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: AlreadyExists - ``asset_id`` already part ...
[ "def", "add_asset", "(", "self", ",", "asset_id", ",", "composition_id", ")", ":", "# The asset found check may want to be run through _get_provider_manager", "# so as to ensure access control:", "from", "dlkit", ".", "abstract_osid", ".", "id", ".", "primitives", "import", ...
Appends an asset to a composition. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: AlreadyExists - ``asset_id`` already part ``composition_id`` raise: NotFound - ``asset_id...
[ "Appends", "an", "asset", "to", "a", "composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2861-L2905
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetCompositionDesignSession.move_asset_ahead
def move_asset_ahead(self, asset_id, composition_id, reference_id): """Reorders assets in a composition by moving the specified asset in front of a reference asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Compos...
python
def move_asset_ahead(self, asset_id, composition_id, reference_id): """Reorders assets in a composition by moving the specified asset in front of a reference asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Compos...
[ "def", "move_asset_ahead", "(", "self", ",", "asset_id", ",", "composition_id", ",", "reference_id", ")", ":", "if", "(", "not", "isinstance", "(", "composition_id", ",", "ABCId", ")", "and", "composition_id", ".", "get_identifier_namespace", "(", ")", "!=", "...
Reorders assets in a composition by moving the specified asset in front of a reference asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` arg: reference_id (osid.id.Id): ``Id`` of the reference ...
[ "Reorders", "assets", "in", "a", "composition", "by", "moving", "the", "specified", "asset", "in", "front", "of", "a", "reference", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2908-L2930
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetCompositionDesignSession.move_asset_behind
def move_asset_behind(self, asset_id, composition_id, reference_id): """Reorders assets in a composition by moving the specified asset behind of a reference asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composi...
python
def move_asset_behind(self, asset_id, composition_id, reference_id): """Reorders assets in a composition by moving the specified asset behind of a reference asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composi...
[ "def", "move_asset_behind", "(", "self", ",", "asset_id", ",", "composition_id", ",", "reference_id", ")", ":", "if", "(", "not", "isinstance", "(", "composition_id", ",", "ABCId", ")", "and", "composition_id", ".", "get_identifier_namespace", "(", ")", "!=", ...
Reorders assets in a composition by moving the specified asset behind of a reference asset. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` arg: reference_id (osid.id.Id): ``Id`` of the reference ...
[ "Reorders", "assets", "in", "a", "composition", "by", "moving", "the", "specified", "asset", "behind", "of", "a", "reference", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2933-L2955
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetCompositionDesignSession.order_assets
def order_assets(self, asset_ids, composition_id): """Reorders a set of assets in a composition. arg: asset_ids (osid.id.Id[]): ``Ids`` for a set of ``Assets`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: NotFound - ``comp...
python
def order_assets(self, asset_ids, composition_id): """Reorders a set of assets in a composition. arg: asset_ids (osid.id.Id[]): ``Ids`` for a set of ``Assets`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: NotFound - ``comp...
[ "def", "order_assets", "(", "self", ",", "asset_ids", ",", "composition_id", ")", ":", "if", "(", "not", "isinstance", "(", "composition_id", ",", "ABCId", ")", "and", "composition_id", ".", "get_identifier_namespace", "(", ")", "!=", "'repository.Composition'", ...
Reorders a set of assets in a composition. arg: asset_ids (osid.id.Id[]): ``Ids`` for a set of ``Assets`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: NotFound - ``composition_id`` not found or, an ``asset_id`` not...
[ "Reorders", "a", "set", "of", "assets", "in", "a", "composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2958-L2979
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetCompositionDesignSession.remove_asset
def remove_asset(self, asset_id, composition_id): """Removes an ``Asset`` from a ``Composition``. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: NotFound - ``asset_id`` ``not found in com...
python
def remove_asset(self, asset_id, composition_id): """Removes an ``Asset`` from a ``Composition``. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: NotFound - ``asset_id`` ``not found in com...
[ "def", "remove_asset", "(", "self", ",", "asset_id", ",", "composition_id", ")", ":", "if", "(", "not", "isinstance", "(", "composition_id", ",", "ABCId", ")", "and", "composition_id", ".", "get_identifier_namespace", "(", ")", "!=", "'repository.Composition'", ...
Removes an ``Asset`` from a ``Composition``. arg: asset_id (osid.id.Id): ``Id`` of the ``Asset`` arg: composition_id (osid.id.Id): ``Id`` of the ``Composition`` raise: NotFound - ``asset_id`` ``not found in composition_id`` raise: NullArgument - ``asset_id`` or ...
[ "Removes", "an", "Asset", "from", "a", "Composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L2982-L3004
mitsei/dlkit
dlkit/json_/repository/sessions.py
AssetCompositionDesignSession._get_composition_collection
def _get_composition_collection(self, composition_id): """Returns a Mongo Collection and Composition given a Composition Id""" collection = JSONClientValidated('repository', collection='Composition', runtime=self._runtime)...
python
def _get_composition_collection(self, composition_id): """Returns a Mongo Collection and Composition given a Composition Id""" collection = JSONClientValidated('repository', collection='Composition', runtime=self._runtime)...
[ "def", "_get_composition_collection", "(", "self", ",", "composition_id", ")", ":", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Composition'", ",", "runtime", "=", "self", ".", "_runtime", ")", "composition_map", "=", "...
Returns a Mongo Collection and Composition given a Composition Id
[ "Returns", "a", "Mongo", "Collection", "and", "Composition", "given", "a", "Composition", "Id" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3006-L3014
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionLookupSession.get_composition
def get_composition(self, composition_id): """Gets the ``Composition`` specified by its ``Id``. arg: composition_id (osid.id.Id): ``Id`` of the ``Composiiton`` return: (osid.repository.Composition) - the composition raise: NotFound - ``composition_id`` not found ...
python
def get_composition(self, composition_id): """Gets the ``Composition`` specified by its ``Id``. arg: composition_id (osid.id.Id): ``Id`` of the ``Composiiton`` return: (osid.repository.Composition) - the composition raise: NotFound - ``composition_id`` not found ...
[ "def", "get_composition", "(", "self", ",", "composition_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceLookupSession.get_resource", "# NOTE: This implementation currently ignores plenary view", "collection", "=", "JSONClientValidated", "(", "'repository'", ...
Gets the ``Composition`` specified by its ``Id``. arg: composition_id (osid.id.Id): ``Id`` of the ``Composiiton`` return: (osid.repository.Composition) - the composition raise: NotFound - ``composition_id`` not found raise: NullArgument - ``composition_id`` is ``nul...
[ "Gets", "the", "Composition", "specified", "by", "its", "Id", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3225-L3247
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionLookupSession.get_compositions_by_ids
def get_compositions_by_ids(self, composition_ids): """Gets a ``CompositionList`` corresponding to the given ``IdList``. arg: composition_ids (osid.id.IdList): the list of ``Ids`` to retrieve return: (osid.repository.CompositionList) - the returned ``Compositi...
python
def get_compositions_by_ids(self, composition_ids): """Gets a ``CompositionList`` corresponding to the given ``IdList``. arg: composition_ids (osid.id.IdList): the list of ``Ids`` to retrieve return: (osid.repository.CompositionList) - the returned ``Compositi...
[ "def", "get_compositions_by_ids", "(", "self", ",", "composition_ids", ")", ":", "# Implemented from template for", "# osid.resource.ResourceLookupSession.get_resources_by_ids", "# NOTE: This implementation currently ignores plenary view", "collection", "=", "JSONClientValidated", "(", ...
Gets a ``CompositionList`` corresponding to the given ``IdList``. arg: composition_ids (osid.id.IdList): the list of ``Ids`` to retrieve return: (osid.repository.CompositionList) - the returned ``Composition list`` raise: NotFound - an ``Id`` was not found ...
[ "Gets", "a", "CompositionList", "corresponding", "to", "the", "given", "IdList", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3250-L3283
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionLookupSession.get_compositions_by_genus_type
def get_compositions_by_genus_type(self, composition_genus_type): """Gets a ``CompositionList`` corresponding to the given composition genus ``Type`` which does not include compositions of types derived from the specified ``Type``. arg: composition_genus_type (osid.type.Type): a composition ...
python
def get_compositions_by_genus_type(self, composition_genus_type): """Gets a ``CompositionList`` corresponding to the given composition genus ``Type`` which does not include compositions of types derived from the specified ``Type``. arg: composition_genus_type (osid.type.Type): a composition ...
[ "def", "get_compositions_by_genus_type", "(", "self", ",", "composition_genus_type", ")", ":", "# Implemented from template for", "# osid.resource.ResourceLookupSession.get_resources_by_genus_type", "# NOTE: This implementation currently ignores plenary view", "collection", "=", "JSONClien...
Gets a ``CompositionList`` corresponding to the given composition genus ``Type`` which does not include compositions of types derived from the specified ``Type``. arg: composition_genus_type (osid.type.Type): a composition genus type return: (osid.repository.CompositionList) - the re...
[ "Gets", "a", "CompositionList", "corresponding", "to", "the", "given", "composition", "genus", "Type", "which", "does", "not", "include", "compositions", "of", "types", "derived", "from", "the", "specified", "Type", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3286-L3308
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionLookupSession.get_compositions
def get_compositions(self): """Gets all ``Compositions``. return: (osid.repository.CompositionList) - a list of ``Compositions`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This m...
python
def get_compositions(self): """Gets all ``Compositions``. return: (osid.repository.CompositionList) - a list of ``Compositions`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This m...
[ "def", "get_compositions", "(", "self", ")", ":", "# Implemented from template for", "# osid.resource.ResourceLookupSession.get_resources", "# NOTE: This implementation currently ignores plenary view", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", ...
Gets all ``Compositions``. return: (osid.repository.CompositionList) - a list of ``Compositions`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.*
[ "Gets", "all", "Compositions", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3371-L3388
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionQuerySession.get_compositions_by_query
def get_compositions_by_query(self, composition_query): """Gets a list of ``Compositions`` matching the given composition query. arg: composition_query (osid.repository.CompositionQuery): the composition query return: (osid.repository.CompositionList) - the returned ...
python
def get_compositions_by_query(self, composition_query): """Gets a list of ``Compositions`` matching the given composition query. arg: composition_query (osid.repository.CompositionQuery): the composition query return: (osid.repository.CompositionList) - the returned ...
[ "def", "get_compositions_by_query", "(", "self", ",", "composition_query", ")", ":", "# Implemented from template for", "# osid.resource.ResourceQuerySession.get_resources_by_query", "and_list", "=", "list", "(", ")", "or_list", "=", "list", "(", ")", "for", "term", "in",...
Gets a list of ``Compositions`` matching the given composition query. arg: composition_query (osid.repository.CompositionQuery): the composition query return: (osid.repository.CompositionList) - the returned ``CompositionList`` raise: NullArgument - ``composi...
[ "Gets", "a", "list", "of", "Compositions", "matching", "the", "given", "composition", "query", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3551-L3592
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionSearchSession.get_compositions_by_search
def get_compositions_by_search(self, composition_query, composition_search): """Gets the search results matching the given search query using the given search. arg: composition_query (osid.repository.CompositionQuery): the composition query arg: composition_search (osid.re...
python
def get_compositions_by_search(self, composition_query, composition_search): """Gets the search results matching the given search query using the given search. arg: composition_query (osid.repository.CompositionQuery): the composition query arg: composition_search (osid.re...
[ "def", "get_compositions_by_search", "(", "self", ",", "composition_query", ",", "composition_search", ")", ":", "# Implemented from template for", "# osid.resource.ResourceSearchSession.get_resources_by_search_template", "# Copied from osid.resource.ResourceQuerySession.get_resources_by_que...
Gets the search results matching the given search query using the given search. arg: composition_query (osid.repository.CompositionQuery): the composition query arg: composition_search (osid.repository.CompositionSearch): the composition search return: (osi...
[ "Gets", "the", "search", "results", "matching", "the", "given", "search", "query", "using", "the", "given", "search", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3656-L3700
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionAdminSession.get_composition_form_for_create
def get_composition_form_for_create(self, composition_record_types): """Gets the composition form for creating new compositions. A new form should be requested for each create transaction. arg: composition_record_types (osid.type.Type[]): array of composition record types ...
python
def get_composition_form_for_create(self, composition_record_types): """Gets the composition form for creating new compositions. A new form should be requested for each create transaction. arg: composition_record_types (osid.type.Type[]): array of composition record types ...
[ "def", "get_composition_form_for_create", "(", "self", ",", "composition_record_types", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.get_resource_form_for_create_template", "for", "arg", "in", "composition_record_types", ":", "if", "not", "isin...
Gets the composition form for creating new compositions. A new form should be requested for each create transaction. arg: composition_record_types (osid.type.Type[]): array of composition record types return: (osid.repository.CompositionForm) - the composition form r...
[ "Gets", "the", "composition", "form", "for", "creating", "new", "compositions", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3848-L3883
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionAdminSession.create_composition
def create_composition(self, composiiton_form): """Creates a new ``Composition``. arg: composiiton_form (osid.repository.CompositionForm): the form for this ``Composition`` return: (osid.repository.Composition) - the new ``Composition`` raise: IllegalState - ``compos...
python
def create_composition(self, composiiton_form): """Creates a new ``Composition``. arg: composiiton_form (osid.repository.CompositionForm): the form for this ``Composition`` return: (osid.repository.Composition) - the new ``Composition`` raise: IllegalState - ``compos...
[ "def", "create_composition", "(", "self", ",", "composiiton_form", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.create_resource_template", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Composition'",...
Creates a new ``Composition``. arg: composiiton_form (osid.repository.CompositionForm): the form for this ``Composition`` return: (osid.repository.Composition) - the new ``Composition`` raise: IllegalState - ``composition_form`` already used in a create trans...
[ "Creates", "a", "new", "Composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3886-L3928
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionAdminSession.update_composition
def update_composition(self, composiiton_form): """Updates an existing composition. arg: composiiton_form (osid.repository.CompositionForm): the form containing the elements to be updated raise: IllegalState - ``composition_form`` already used in an update tr...
python
def update_composition(self, composiiton_form): """Updates an existing composition. arg: composiiton_form (osid.repository.CompositionForm): the form containing the elements to be updated raise: IllegalState - ``composition_form`` already used in an update tr...
[ "def", "update_composition", "(", "self", ",", "composiiton_form", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.update_resource_template", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Composition'",...
Updates an existing composition. arg: composiiton_form (osid.repository.CompositionForm): the form containing the elements to be updated raise: IllegalState - ``composition_form`` already used in an update transaction raise: InvalidArgument - the form contai...
[ "Updates", "an", "existing", "composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L3985-L4025
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionAdminSession.delete_composition
def delete_composition(self, composition_id): """Deletes a ``Composition``. arg: composition_id (osid.id.Id): the ``Id`` of the ``Composition`` to remove raise: NotFound - ``composition_id`` not found raise: NullArgument - ``composition_id`` is ``null`` rais...
python
def delete_composition(self, composition_id): """Deletes a ``Composition``. arg: composition_id (osid.id.Id): the ``Id`` of the ``Composition`` to remove raise: NotFound - ``composition_id`` not found raise: NullArgument - ``composition_id`` is ``null`` rais...
[ "def", "delete_composition", "(", "self", ",", "composition_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.delete_resource_template", "collection", "=", "JSONClientValidated", "(", "'repository'", ",", "collection", "=", "'Composition'", ...
Deletes a ``Composition``. arg: composition_id (osid.id.Id): the ``Id`` of the ``Composition`` to remove raise: NotFound - ``composition_id`` not found raise: NullArgument - ``composition_id`` is ``null`` raise: OperationFailed - unable to complete request ...
[ "Deletes", "a", "Composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4048-L4072
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionAdminSession.alias_composition
def alias_composition(self, composition_id, alias_id): """Adds an ``Id`` to a ``Composition`` for the purpose of creating compatibility. The primary ``Id`` of the ``Composition`` is determined by the provider. The new ``Id`` is an alias to the primary ``Id``. If the alias is a pointer t...
python
def alias_composition(self, composition_id, alias_id): """Adds an ``Id`` to a ``Composition`` for the purpose of creating compatibility. The primary ``Id`` of the ``Composition`` is determined by the provider. The new ``Id`` is an alias to the primary ``Id``. If the alias is a pointer t...
[ "def", "alias_composition", "(", "self", ",", "composition_id", ",", "alias_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceAdminSession.alias_resources_template", "self", ".", "_alias_id", "(", "primary_id", "=", "composition_id", ",", "equivalent_...
Adds an ``Id`` to a ``Composition`` for the purpose of creating compatibility. The primary ``Id`` of the ``Composition`` is determined by the provider. The new ``Id`` is an alias to the primary ``Id``. If the alias is a pointer to another composition, it is reassigned to the given compo...
[ "Adds", "an", "Id", "to", "a", "Composition", "for", "the", "purpose", "of", "creating", "compatibility", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4148-L4171
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionRepositorySession.get_composition_ids_by_repository
def get_composition_ids_by_repository(self, repository_id): """Gets the list of ``Composition`` ``Ids`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of related composition ``Ids`` raise: NotFound - `...
python
def get_composition_ids_by_repository(self, repository_id): """Gets the list of ``Composition`` ``Ids`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of related composition ``Ids`` raise: NotFound - `...
[ "def", "get_composition_ids_by_repository", "(", "self", ",", "repository_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_resource_ids_by_bin", "id_list", "=", "[", "]", "for", "composition", "in", "self", ".", "get_compositions_by_repo...
Gets the list of ``Composition`` ``Ids`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.id.IdList) - list of related composition ``Ids`` raise: NotFound - ``repository_id`` is not found raise: NullArgument - ``reposito...
[ "Gets", "the", "list", "of", "Composition", "Ids", "associated", "with", "a", "Repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4273-L4290
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionRepositorySession.get_compositions_by_repository
def get_compositions_by_repository(self, repository_id): """Gets the list of ``Compositions`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.repository.CompositionList) - list of related compositions raise...
python
def get_compositions_by_repository(self, repository_id): """Gets the list of ``Compositions`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.repository.CompositionList) - list of related compositions raise...
[ "def", "get_compositions_by_repository", "(", "self", ",", "repository_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_resources_by_bin", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY'", ",", "local", "=", "True"...
Gets the list of ``Compositions`` associated with a ``Repository``. arg: repository_id (osid.id.Id): ``Id`` of the ``Repository`` return: (osid.repository.CompositionList) - list of related compositions raise: NotFound - ``repository_id`` is not found raise: NullArg...
[ "Gets", "the", "list", "of", "Compositions", "associated", "with", "a", "Repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4293-L4311
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionRepositorySession.get_composition_ids_by_repositories
def get_composition_ids_by_repositories(self, repository_ids): """Gets the list of ``Composition`` ``Ids`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.id.IdList) - list of composition ``Ids...
python
def get_composition_ids_by_repositories(self, repository_ids): """Gets the list of ``Composition`` ``Ids`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.id.IdList) - list of composition ``Ids...
[ "def", "get_composition_ids_by_repositories", "(", "self", ",", "repository_ids", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_resource_ids_by_bins", "id_list", "=", "[", "]", "for", "composition", "in", "self", ".", "get_compositions_by_...
Gets the list of ``Composition`` ``Ids`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.id.IdList) - list of composition ``Ids`` raise: NullArgument - ``repository_ids`` is ``null`` r...
[ "Gets", "the", "list", "of", "Composition", "Ids", "corresponding", "to", "a", "list", "of", "Repository", "objects", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4314-L4331
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionRepositorySession.get_compositions_by_repositories
def get_compositions_by_repositories(self, repository_ids): """Gets the list of ``Compositions`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.repository.CompositionList) - list of Composition...
python
def get_compositions_by_repositories(self, repository_ids): """Gets the list of ``Compositions`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.repository.CompositionList) - list of Composition...
[ "def", "get_compositions_by_repositories", "(", "self", ",", "repository_ids", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_resources_by_bins", "composition_list", "=", "[", "]", "for", "repository_id", "in", "repository_ids", ":", "compo...
Gets the list of ``Compositions`` corresponding to a list of ``Repository`` objects. arg: repository_ids (osid.id.IdList): list of repository ``Ids`` return: (osid.repository.CompositionList) - list of Compositions raise: NullArgument - ``repository_ids`` is ``null`` ...
[ "Gets", "the", "list", "of", "Compositions", "corresponding", "to", "a", "list", "of", "Repository", "objects", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4334-L4352
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionRepositorySession.get_repository_ids_by_composition
def get_repository_ids_by_composition(self, composition_id): """Gets the ``Repository`` ``Ids`` mapped to a ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of a ``Composition`` return: (osid.id.IdList) - list of repository ``Ids`` raise: NotFound - ``composition_id`` is n...
python
def get_repository_ids_by_composition(self, composition_id): """Gets the ``Repository`` ``Ids`` mapped to a ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of a ``Composition`` return: (osid.id.IdList) - list of repository ``Ids`` raise: NotFound - ``composition_id`` is n...
[ "def", "get_repository_ids_by_composition", "(", "self", ",", "composition_id", ")", ":", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY'", ",", "local", "=", "True", ")", "lookup_session", "=", "mgr", ".", "get_composition_lookup_session", "(",...
Gets the ``Repository`` ``Ids`` mapped to a ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of a ``Composition`` return: (osid.id.IdList) - list of repository ``Ids`` raise: NotFound - ``composition_id`` is not found raise: NullArgument - ``composition_id`` is ``null`` ...
[ "Gets", "the", "Repository", "Ids", "mapped", "to", "a", "Composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4355-L4376
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionRepositorySession.get_repositories_by_composition
def get_repositories_by_composition(self, composition_id): """Gets the ``Repository`` objects mapped to a ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of a ``Composition`` return: (osid.repository.RepositoryList) - list of repositories raise: NotFound - ``composition_id...
python
def get_repositories_by_composition(self, composition_id): """Gets the ``Repository`` objects mapped to a ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of a ``Composition`` return: (osid.repository.RepositoryList) - list of repositories raise: NotFound - ``composition_id...
[ "def", "get_repositories_by_composition", "(", "self", ",", "composition_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinSession.get_bins_by_resource", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSITORY'", ",", "local", "=", "Tru...
Gets the ``Repository`` objects mapped to a ``Composition``. arg: composition_id (osid.id.Id): ``Id`` of a ``Composition`` return: (osid.repository.RepositoryList) - list of repositories raise: NotFound - ``composition_id`` is not found raise: NullArgument - ``composition_id`` is `...
[ "Gets", "the", "Repository", "objects", "mapped", "to", "a", "Composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4379-L4396
mitsei/dlkit
dlkit/json_/repository/sessions.py
CompositionRepositoryAssignmentSession.assign_composition_to_repository
def assign_composition_to_repository(self, composition_id, repository_id): """Adds an existing ``Composition`` to a ``Repository``. arg: composition_id (osid.id.Id): the ``Id`` of the ``Composition`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repo...
python
def assign_composition_to_repository(self, composition_id, repository_id): """Adds an existing ``Composition`` to a ``Repository``. arg: composition_id (osid.id.Id): the ``Id`` of the ``Composition`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repo...
[ "def", "assign_composition_to_repository", "(", "self", ",", "composition_id", ",", "repository_id", ")", ":", "# Implemented from template for", "# osid.resource.ResourceBinAssignmentSession.assign_resource_to_bin", "mgr", "=", "self", ".", "_get_provider_manager", "(", "'REPOSI...
Adds an existing ``Composition`` to a ``Repository``. arg: composition_id (osid.id.Id): the ``Id`` of the ``Composition`` arg: repository_id (osid.id.Id): the ``Id`` of the ``Repository`` raise: AlreadyExists - ``composition_id`` already assigned to ...
[ "Adds", "an", "existing", "Composition", "to", "a", "Repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/sessions.py#L4510-L4533