Skip to content

Commit 4bbe537

Browse files
committed
[tutorial] Add list of default validations
1 parent 9d0e07f commit 4bbe537

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

doc/tutorial.rst

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,86 @@ Similarly the second validation warning can be resolved before saving the docume
10271027

10281028
Please note that the automatic validation is run whenever a document is saved or loaded using the ``odml.save`` and ``odml.load`` functions as well as the ``ODMLWriter`` or the ``ODMLReader``. The validation is not run when using any of the lower level ``xmlparser``, ``dict_parser`` or ``rdf_converter`` classes.
10291029

1030+
List of available default validations
1031+
*************************************
1032+
1033+
The following contains a list of the default odml validations, their message and the suggested course of action to resolve the issue.
1034+
1035+
| Validation: ``object_required_attributes``
1036+
| Message: "Missing required attribute 'xyz'"
1037+
| Applies to: ``Document``, ``Section``, ``Property``
1038+
| Course of action: Add an appropriate value to attribute 'xyz' for the reported odml entity.
1039+
1040+
| Validation: ``section_type_must_be_defined``
1041+
| Message: "Section type not specified"
1042+
| Applies to: ``Section``
1043+
| Course of action: Fill in the ``type`` attribute of the reported Section.
1044+
1045+
| Validation: ``section_unique_ids``
1046+
| Message: "Duplicate id in Section 'secA' and 'secB'"
1047+
| Applies to: ``Section``
1048+
| Course of action: IDs have to be unique and a duplicate id was found. Assign a new id for the reported Section.
1049+
1050+
| Validation: ``property_unique_ids``
1051+
| Message: "Duplicate id in Property 'propA' and 'propB'"
1052+
| Applies to: ``Property``
1053+
| Course of action: IDs have to be unique and a duplicate id was found. Assign a new id for the reported Property
1054+
1055+
| Validation: ``section_unique_name_type``
1056+
| Message: "name/type combination must be unique"
1057+
| Applies to: ``Section``
1058+
| Course of action: The combination of Section.name and Section.type has to be unique on the same level. Change either name or type of the reported Section.
1059+
1060+
| Validation: ``object_unique_name``
1061+
| Message: "Object names must be unique"
1062+
| Applies to: ``Document``, ``Section``, ``Property``
1063+
| Course of action: Property name has to be unique on the same level. Change the name of the reported Property.
1064+
1065+
| Validation: ``object_name_readable``
1066+
| Message: "Name not assigned"
1067+
| Applies to: ``Section``, ``Property``
1068+
| Course of action: When Section or Property names are left empty on creation or set to None, they are automatically assigned the entities uuid. Assign a human readable name to the reported entity.
1069+
1070+
| Validation: ``property_terminology_check``
1071+
| Message: "Property 'prop' not found in terminology"
1072+
| Applies to: ``Property``
1073+
| Course of action: The reported entity is linked to an repository but the repository is not available. Check if the linked content has moved.
1074+
1075+
| Validation: ``property_dependency_check``
1076+
| Message: "Property refers to a non-existent dependency object" or "Dependency-value is not equal to value of the property's dependency"
1077+
| Applies to: ``Property``
1078+
| Course of action: The reported entity depends on another Property, but this dependency has not been satisfied. Check the referenced Property and its value to resolve the issue.
1079+
1080+
| Validation: ``property_values_check``
1081+
| Message: "Tuple of length 'x' not consistent with dtype 'dtype'!" or "Property values not of consistent dtype!".
1082+
| Applies to: ``Property``
1083+
| Course of action: Adjust the values or the dtype of the referenced Propery.
1084+
1085+
| Validation: ``property_values_string_check``
1086+
| Message: "Dtype of property "prop" currently is "string", but might fit dtype "dtype"!"
1087+
| Applies to: ``Property``
1088+
| Course of action: Check if the datatype of the referenced Property.values has been loaded correctly and change the Property.dtype if required.
1089+
1090+
| Validation: ``section_properties_cardinality``
1091+
| Message: "cardinality violated x values, y found)"
1092+
| Applies to: ``Section``
1093+
| Course of action: A cardinality defined for the number of Properties of a Section does not match. Add or remove Properties until the cardinality has been satisfied or adjust the cardinality.
1094+
1095+
| Validation: ``section_sections_cardinality``
1096+
| Message: "cardinality violated x values, y found)"
1097+
| Applies to: ``Section``
1098+
| Course of action: A cardinality defined for the number of Sections of a Section does not match. Add or remove Sections until the cardinality has been satisfied or adjust the cardinality.
1099+
1100+
| Validation: ``property_values_cardinality``
1101+
| Message: "cardinality violated x values, y found)"
1102+
| Applies to: ``Property``
1103+
| Course of action: A cardinality defined for the number of Values of a Property does not match. Add or remove Values until the cardinality has been satisfied or adjust the cardinality.
1104+
1105+
| Validation: ``section_repository_present``
1106+
| Message: "A section should have an associated repository" or "Could not load terminology" or "Section type not found in terminology"
1107+
| Applies to: ``Section``
1108+
| Course of action: Optional validation. Will report any section that does not specify a repository. Add a repository to the reported Section to resolve.
1109+
10301110
Advanced knowledge on Values
10311111
----------------------------
10321112

0 commit comments

Comments
 (0)