@@ -881,7 +881,7 @@ Data type conversions
881881
882882After creating a Property with metadata the data type can be changed and the
883883format of the corresponding entry will converted to the new data type, if the
884- new format is valid for the given metadata::
884+ new format is valid for the given metadata::
885885
886886 >>> test_dtype_conv = odml.Property('p', value=1.0)
887887 >>> print(test_dtype_conv.value)
@@ -896,7 +896,7 @@ new format is valid for the given metadata::
896896
897897If the conversion is invalid a ValueError is raised.
898898
899- Also note, that during such a process, metadata loss may occur if a float is
899+ Also note, that during such a process metadata loss may occur if a float is
900900converted to an integer and then back to a float::
901901
902902 >>> test_dtype_conv = odml.Property('p', value=42.42)
@@ -907,57 +907,6 @@ converted to an integer and then back to a float::
907907 >>> print(test_dtype_conv.value)
908908 [42.0]
909909
910- Terminologies
911- -------------
912- (DEPRECATED; new version coming soon)
913- odML supports terminologies that are data structure templates for typical use cases.
914- Sections can have a ``repository `` attribute. As repositories can be inherited,
915- the current applicable one can be obtained using the :py:meth: `odml.section.BaseSection.get_repository `
916- method.
917-
918- Binary metadata
919- ***************
920-
921- For metadata of binary data type you also need to be specify the correct
922- encoder. The following table lists all possible encoders of the odML-libarary
923- and their binary metadata representation:
924-
925- +------------------+--------------------------+
926- | binary encoder | binary metadata example |
927- +==================+==========================+
928- | quoted-printable | Ford Prefect |
929- +------------------+--------------------------+
930- | hexadecimal | 466f72642050726566656374 |
931- +------------------+--------------------------+
932- | base64 | Rm9yZCBQcmVmZWN0 |
933- +------------------+--------------------------+
934-
935- The encoder can also be edited later on::
936-
937- >>> test_value = odml.Value(data='Ford Prefect',
938- dtype=odml.DType.binary,
939- encoder='quoted-printable')
940- >>> test_value
941- <binary Ford Prefect>
942- >>> test_value.encoder = 'hexadecimal'
943- >>> test_value
944- <binary 466f72642050726566656374>
945- >>> test_value.encoder = 'base64'
946- >>> test_value
947- <binary Rm9yZCBQcmVmZWN0>
948-
949- The checksum of binary metadata is automatically calculated with ``crc32 `` as
950- default checksum::
951-
952- >>> test_value.checksum
953- 'crc32$10e6c0cf
954-
955- Alternatively, ``md5 `` can be used for the checksum calculation::
956-
957- >>> test_value.checksum = "md5"
958- >>> test_value.checksum
959- 'md5$c1282d5763e2249028047757b6209518'
960-
961910
962911Advanced knowledge on Properties
963912--------------------------------
@@ -973,7 +922,7 @@ Links & Includes
973922----------------
974923(DEPRECATED; new version coming soon)
975924
976- Sections can be linked to other Sections, so that they include their defined
925+ Sections can be linked to other Sections, so that they include their defined
977926attributes. A link can be within the document (``link `` property) or to an
978927external one (``include `` property).
979928
0 commit comments