From 1ff37b068294fe6e491ce77629450e05caf3241e Mon Sep 17 00:00:00 2001 From: Sebastian Schmittner Date: Thu, 12 Nov 2020 15:10:24 +0100 Subject: [PATCH 1/7] WIP --- epcis_event_hash_generator/hash_generator.py | 31 ++++++++++++-------- tests/test_all_values_present.py | 2 +- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/epcis_event_hash_generator/hash_generator.py b/epcis_event_hash_generator/hash_generator.py index 4825c6d..9161572 100644 --- a/epcis_event_hash_generator/hash_generator.py +++ b/epcis_event_hash_generator/hash_generator.py @@ -56,10 +56,16 @@ def fix_time_stamp_format(timestamp): def recurse_through_children_in_order(root, child_order): - """child_order is expected to be a property order, see PROP_ORDER. Loop over child order, look for a child of - root with matching name and add its text (if any). Recurse through the grand children applying the sub order. """ - texts = "" + Loop over child order, look for a child of root with matching key and build the pre-hash string (mostly key=value) + Recurse through the grand children applying the sub order. + + `root` is to be a simple python object, i.e. a triple of two strings (key/value) and a list of + simple python objects (children). + `child_order` is expected to be a property order, see PROP_ORDER. + + All elements added to the returned + """ for (child_name, sub_child_order) in child_order: list_of_values = [] prefix = "" @@ -78,16 +84,21 @@ def recurse_through_children_in_order(root, child_order): list_of_values.append( child_name + "=" + text) + if len(child[2]) == 0: + logging.debug("Finished processing %s", child) + root.remove(child) + # sort list of values to fix !10 list_of_values.sort() if len(list_of_values) > 1: logging.debug("sorted: %s", list_of_values) + pre_hash = "" if "".join(list_of_values): # fixes #16 - texts += prefix + "".join(list_of_values) + pre_hash = prefix + "".join(list_of_values) elif prefix: - logging.debug("Skipping empty element: %s", prefix) - return texts + logging.warning("Skipping empty element: %s", prefix) + return pre_hash def format_if_numeric(text): @@ -123,12 +134,8 @@ def gather_elements_not_in_order(root, child_order): """ # remove recordTime, if any - child_order_or_record_time = child_order + [("recordTime", None)] - - for (child_name, _) in child_order_or_record_time: - covered_children = [x for x in root if x[0] == child_name] - logging.debug("Children '%s' covered by ordering: %s", child_name, covered_children) - for child in covered_children: + for child in root: + if child[0] == "recordTime": root.remove(child) logging.debug("Parsing remaining elements in: %s", root) diff --git a/tests/test_all_values_present.py b/tests/test_all_values_present.py index 040d49b..a6ec8be 100644 --- a/tests/test_all_values_present.py +++ b/tests/test_all_values_present.py @@ -11,7 +11,7 @@ TEST_FILE_PATH = "examples/" -IGNORED_KEYS = ["eventTime"] +IGNORED_KEYS = ["eventTime", "recordTime", "declarationTime"] def _py_to_value_list(py_obj): From 851a8ce76b8b7aa4d5e1498a98e6cabd69bf9711 Mon Sep 17 00:00:00 2001 From: Sebastian Schmittner Date: Mon, 7 Dec 2020 14:06:45 +0100 Subject: [PATCH 2/7] reworked hashing algorithm to accomodate finding user extensions anywhere. Added custom join by for debugging --- .gitignore | 3 +- epcis_event_hash_generator/__init__.py | 7 ++ epcis_event_hash_generator/hash_generator.py | 83 +++++++++++--------- epcis_event_hash_generator/main.py | 9 ++- tests/test_all_values_present.py | 8 +- 5 files changed, 67 insertions(+), 43 deletions(-) diff --git a/.gitignore b/.gitignore index d846060..7e00867 100644 --- a/.gitignore +++ b/.gitignore @@ -105,4 +105,5 @@ venv.bak/ # tmp files \#*# -*~ \ No newline at end of file +*~ +.vscode/* diff --git a/epcis_event_hash_generator/__init__.py b/epcis_event_hash_generator/__init__.py index 960799c..f05f4e2 100644 --- a/epcis_event_hash_generator/__init__.py +++ b/epcis_event_hash_generator/__init__.py @@ -1,5 +1,12 @@ # -*- coding: utf-8 -*- +JOIN_BY = "" +""" +Join the substrings to the pre hash string using this deliminator. +By the specification in https://github.com/RalphTro/epcis-event-hash-generator this is to be the empty string, but using e.g. newline might be helpful for debugging. +When using the command line utility, this can be changed via the -j flag. +""" + PROP_ORDER = [ ('eventTime', None), ('eventTimeZoneOffset', None), diff --git a/epcis_event_hash_generator/hash_generator.py b/epcis_event_hash_generator/hash_generator.py index 9161572..b4e4180 100644 --- a/epcis_event_hash_generator/hash_generator.py +++ b/epcis_event_hash_generator/hash_generator.py @@ -20,6 +20,7 @@ import datetime import hashlib import logging +import traceback import dateutil.parser @@ -33,6 +34,9 @@ from epcis_event_hash_generator.json_to_py import event_list_from_epcis_document_json as read_json from epcis_event_hash_generator.json_to_py import event_list_from_epcis_document_json_str as read_json_str from epcis_event_hash_generator import PROP_ORDER +from epcis_event_hash_generator import JOIN_BY as DEFAULT_JOIN_BY + +JOIN_BY = DEFAULT_JOIN_BY def fix_time_stamp_format(timestamp): @@ -55,24 +59,28 @@ def fix_time_stamp_format(timestamp): return fixed -def recurse_through_children_in_order(root, child_order): +def recurse_through_children_in_order(child_list, child_order): """ Loop over child order, look for a child of root with matching key and build the pre-hash string (mostly key=value) Recurse through the grand children applying the sub order. + All elements added to the returned pre hash string are removed from the tree below the root. + After the recursion completes, only elements NOT added to the pre-hash string are left in the tree. - `root` is to be a simple python object, i.e. a triple of two strings (key/value) and a list of - simple python objects (children). + `child_list` is to be a list of simple python object, i.e. triples of two strings (key/value) and a list of + simple python objects (grand children). `child_order` is expected to be a property order, see PROP_ORDER. - All elements added to the returned """ + pre_hash = "" + logging.debug("Calculating pre hash for child list %s \nWith order %s", child_list, child_order) for (child_name, sub_child_order) in child_order: list_of_values = [] - prefix = "" - for child in [x for x in root if x[0] == child_name]: + children = [x for x in child_list if x[0] == child_name] # elements with the same name + for child in children: + text = "" + grand_child_text = "" if sub_child_order: - list_of_values.append(recurse_through_children_in_order(child[2], sub_child_order)) - prefix = child_name + grand_child_text = recurse_through_children_in_order(child[2], sub_child_order) if child[1]: text = child[1].strip() if child_name.lower().find("time") > 0 and child_name.lower().find("offset") < 0: @@ -81,23 +89,26 @@ def recurse_through_children_in_order(root, child_order): text = format_if_numeric(text) logging.debug("Adding text '%s'", text) - list_of_values.append( - child_name + "=" + text) + + if text or grand_child_text: + list_of_values.append(child_name + "=" + text + grand_child_text) + else: + logging.debug("Empty element ignored: %s", child) if len(child[2]) == 0: logging.debug("Finished processing %s", child) - root.remove(child) + child_list.remove(child) - # sort list of values to fix !10 + # sort list of values to fix #10 list_of_values.sort() - if len(list_of_values) > 1: - logging.debug("sorted: %s", list_of_values) - pre_hash = "" if "".join(list_of_values): # fixes #16 - pre_hash = prefix + "".join(list_of_values) - elif prefix: - logging.warning("Skipping empty element: %s", prefix) + if pre_hash: + list_of_values.insert(0, pre_hash) # yields correct Joining behavior + pre_hash = JOIN_BY.join(list_of_values) + + logging.debug("child list pre hash is %s", pre_hash) + return pre_hash @@ -113,34 +124,29 @@ def format_if_numeric(text): return text -def generic_element_to_prehash_string(root): +def generic_child_list_to_prehash_string(children): list_of_values = [] - logging.debug("Parsing remaining elements: %s", root) - if isinstance(root, str) and root: - list_of_values.append("=" + root.strip()) - else: - for child in root: - list_of_values.append(child[0] + generic_element_to_prehash_string( - child[1]) + generic_element_to_prehash_string(child[2])) + logging.debug("Parsing remaining elements in: %s", children) + + for child in children: + list_of_values.append(child[0] + "=" + child[1].strip() + generic_child_list_to_prehash_string(child[2])) list_of_values.sort() - return "".join(list_of_values) + return JOIN_BY.join(list_of_values) -def gather_elements_not_in_order(root, child_order): +def gather_elements_not_in_order(children, child_order): """ Collects vendor extensions not covered by the defined child order. Consumes the root. """ # remove recordTime, if any - for child in root: + for child in children: if child[0] == "recordTime": - root.remove(child) - - logging.debug("Parsing remaining elements in: %s", root) - if root: - return generic_element_to_prehash_string(root) + children.remove(child) + if children: + return generic_child_list_to_prehash_string(children) return "" @@ -186,12 +192,13 @@ def compute_prehash_from_events(events): for event in events[2]: logging.debug("prehashing event:\n%s", event) try: - prehash_string_list.append("eventType=" + event[0] + + prehash_string_list.append("eventType=" + event[0] + JOIN_BY + recurse_through_children_in_order(event[2], PROP_ORDER) + gather_elements_not_in_order(event[2], PROP_ORDER) ) except Exception as ex: logging.error("could not parse event:\n%s\n\nerror: %s", event, ex) + logging.debug("".join(traceback.format_tb(ex.__traceback__))) pass # To see/check concatenated value string before hash algorithm is performed: @@ -209,12 +216,16 @@ def epcis_hash_from_xml(xmlStr, hashalg="sha256"): return calculate_hash(prehash_string_list, hashalg) -def epcis_hash(path, hashalg="sha256"): +def epcis_hash(path, hashalg="sha256", join_by=DEFAULT_JOIN_BY): """Read all EPCIS Events from the EPCIS XML document at path. Compute a normalized form (pre-hash string) for each event and return an array of the event hashes computed from the pre-hash by hashalg. """ + global JOIN_BY + join_by = join_by.replace(r"\n", "\n").replace(r"\t", "\t") + logging.debug("Setting JOIN_BY='%s'", join_by) + JOIN_BY = join_by prehash_string_list = compute_prehash_from_file(path) return calculate_hash(prehash_string_list, hashalg) diff --git a/epcis_event_hash_generator/main.py b/epcis_event_hash_generator/main.py index d5d621f..506672b 100755 --- a/epcis_event_hash_generator/main.py +++ b/epcis_event_hash_generator/main.py @@ -65,6 +65,11 @@ def command_line_parsing(): "--prehash", help="If given, also output the prehash string to stdout. Output to a .prehashes file, if combined with -b.", action="store_true") + parser.add_argument( + "-j", + "--join", + help="String used to join the pre hash string. Defaults to empty string as specified. Values like '\\n' might be useful for debugging.", + default="") args = parser.parse_args() @@ -91,9 +96,11 @@ def main(): args = command_line_parsing() + logging.debug("Running cli tool with arguments %s", args) + for filename in args.file: # ACTUAL ALGORITHM CALL: - (hashes, prehashes) = hash_generator.epcis_hash(filename, args.algorithm) + (hashes, prehashes) = hash_generator.epcis_hash(filename, args.algorithm, args.join) # Output: if args.batch: diff --git a/tests/test_all_values_present.py b/tests/test_all_values_present.py index a6ec8be..e52427a 100644 --- a/tests/test_all_values_present.py +++ b/tests/test_all_values_present.py @@ -5,21 +5,19 @@ from os import walk -from epcis_event_hash_generator.hash_generator import epcis_hash +from epcis_event_hash_generator.hash_generator import epcis_hash, format_if_numeric from epcis_event_hash_generator.json_to_py import event_list_from_epcis_document_json from epcis_event_hash_generator.xml_to_py import event_list_from_epcis_document_xml TEST_FILE_PATH = "examples/" -IGNORED_KEYS = ["eventTime", "recordTime", "declarationTime"] - def _py_to_value_list(py_obj): """Transform a nested (Key, Value, Children) object tree into a list of (key, value) pairs""" key_values = [] key, value, children = py_obj - if key not in IGNORED_KEYS and value != "": - key_values.append((key, value)) + if "time" not in key.lower() and value != "": + key_values.append((key, format_if_numeric(value))) for child in children: key_values += _py_to_value_list(child) return key_values From b082c8855eb64329a7a041557756712fbbb2c473 Mon Sep 17 00:00:00 2001 From: Sebastian Schmittner Date: Mon, 7 Dec 2020 14:28:16 +0100 Subject: [PATCH 3/7] added new values for tests and description for example pics how to generate those pre-hash strings --- README.md | 4 +++ epcis_event_hash_generator/hash_generator.py | 4 +-- .../ReferenceEventHashAlgorithm.hashes | 2 +- .../ReferenceEventHashAlgorithm.prehashes | 2 +- .../ReferenceEventHashAlgorithm2.hashes | 2 +- .../ReferenceEventHashAlgorithm2.prehashes | 2 +- tests/examples/SensorDataExamples.hashes | 24 ++++++++--------- tests/examples/SensorDataExamples.prehashes | 24 ++++++++--------- ...cWith2DifferentTransformationEvents.hashes | 4 +-- ...th2DifferentTransformationEvents.prehashes | 4 +-- .../epcisDocWithCustomSchemaInContext.hashes | 4 +-- ...pcisDocWithCustomSchemaInContext.prehashes | 2 ++ .../epcisDocWithDefaultSchemaInContext.hashes | 4 +-- ...cisDocWithDefaultSchemaInContext.prehashes | 2 ++ .../epcisDocWithSensorDataObjectEvent.hashes | 2 +- ...pcisDocWithSensorDataObjectEvent.prehashes | 2 +- ...DocWithShippingAndTransportingEvent.hashes | 4 +-- ...WithShippingAndTransportingEvent.prehashes | 4 +-- ...ithTransformationEventWithExtension.hashes | 2 +- ...TransformationEventWithExtension.prehashes | 2 +- ...ormationEventWithMultipleExtensions.hashes | 2 +- ...ationEventWithMultipleExtensions.prehashes | 2 +- .../epcisDocWithVariousEventTypes.hashes | 26 +++++++++---------- .../epcisDocWithVariousEventTypes.prehashes | 26 +++++++++---------- ...cWithXMLstartTagAndErrorDeclaration.hashes | 2 +- ...thXMLstartTagAndErrorDeclaration.prehashes | 2 +- 26 files changed, 84 insertions(+), 76 deletions(-) create mode 100644 tests/examples/epcisDocWithCustomSchemaInContext.prehashes create mode 100644 tests/examples/epcisDocWithDefaultSchemaInContext.prehashes diff --git a/README.md b/README.md index 35d7beb..939ace6 100644 --- a/README.md +++ b/README.md @@ -141,10 +141,14 @@ Example 1: ![Example 1 for EPCIS event pre-hash computation](docs/hashingAlgorithmLogicIllustration_example1.jpg) +Run `epcis_event_hash_generator/main.py tests/examples/ReferenceEventHashAlgorithm.xml -pj "\n"` to get a similar output of the pre-hash string and `epcis_event_hash_generator/main.py tests/examples/ReferenceEventHashAlgorithm.xml` to verify the hash. + Example 2: ![Example 2 for EPCIS event pre-hash computation ](docs/hashingAlgorithmLogicIllustration_example2.jpg) +Run `epcis_event_hash_generator/main.py tests/examples/ReferenceEventHashAlgorithm2.xml -pj "\n"` to get a similar output of the pre-hash string and `epcis_event_hash_generator/main.py tests/examples/ReferenceEventHashAlgorithm2.xml` to verify the hash. + Example 3: ![Example 3 for EPCIS event pre-hash computation ](docs/hashingAlgorithmLogicIllustration_example3.jpg) diff --git a/epcis_event_hash_generator/hash_generator.py b/epcis_event_hash_generator/hash_generator.py index b4e4180..ecb852b 100644 --- a/epcis_event_hash_generator/hash_generator.py +++ b/epcis_event_hash_generator/hash_generator.py @@ -192,8 +192,8 @@ def compute_prehash_from_events(events): for event in events[2]: logging.debug("prehashing event:\n%s", event) try: - prehash_string_list.append("eventType=" + event[0] + JOIN_BY + - recurse_through_children_in_order(event[2], PROP_ORDER) + prehash_string_list.append("eventType=" + event[0] + JOIN_BY + + recurse_through_children_in_order(event[2], PROP_ORDER)+ JOIN_BY + gather_elements_not_in_order(event[2], PROP_ORDER) ) except Exception as ex: diff --git a/tests/examples/ReferenceEventHashAlgorithm.hashes b/tests/examples/ReferenceEventHashAlgorithm.hashes index 731d707..0c0005e 100644 --- a/tests/examples/ReferenceEventHashAlgorithm.hashes +++ b/tests/examples/ReferenceEventHashAlgorithm.hashes @@ -1 +1 @@ -ni:///sha-256;dfc41ef765fee23520de7ff7aa6c35bee38700ff536c987a44208685daf63f78?ver=CBV2.0 +ni:///sha-256;9635bfeb9a3f2f36ba3312b15f364a69c9bd64aeedd01495e7ec2e7dd3757d1a?ver=CBV2.0 diff --git a/tests/examples/ReferenceEventHashAlgorithm.prehashes b/tests/examples/ReferenceEventHashAlgorithm.prehashes index 44a2fc7..fbcc537 100644 --- a/tests/examples/ReferenceEventHashAlgorithm.prehashes +++ b/tests/examples/ReferenceEventHashAlgorithm.prehashes @@ -1 +1 @@ -eventType=ObjectEventeventTime=2020-03-04T10:00:30.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:4012345.0000000111epc=urn:epc:id:sscc:4012345.0000000222epc=urn:epc:id:sscc:4012345.0000000333action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPointid=urn:epc:id:sgln:4012345.00011.987{https://ns.example.com/epcis}myField1{https://ns.example.com/epcis}mySubField1=2{https://ns.example.com/epcis}mySubField2=5{https://ns.example.com/epcis}myField2=0{https://ns.example.com/epcis}myField3{https://ns.example.com/epcis}mySubField3=1{https://ns.example.com/epcis}mySubField3=3 +eventType=ObjectEventeventTime=2020-03-04T10:00:30.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:4012345.0000000111epc=urn:epc:id:sscc:4012345.0000000222epc=urn:epc:id:sscc:4012345.0000000333action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPoint=id=urn:epc:id:sgln:4012345.00011.987{https://ns.example.com/epcis}myField1={https://ns.example.com/epcis}mySubField1=2{https://ns.example.com/epcis}mySubField2=5{https://ns.example.com/epcis}myField2=0{https://ns.example.com/epcis}myField3={https://ns.example.com/epcis}mySubField3=1{https://ns.example.com/epcis}mySubField3=3 diff --git a/tests/examples/ReferenceEventHashAlgorithm2.hashes b/tests/examples/ReferenceEventHashAlgorithm2.hashes index f72015c..485c45c 100644 --- a/tests/examples/ReferenceEventHashAlgorithm2.hashes +++ b/tests/examples/ReferenceEventHashAlgorithm2.hashes @@ -1 +1 @@ -ni:///sha-256;36da11936e0e528740bd1767bccbe568d60758e627f2c8a8c86c8a72af8038c8?ver=CBV2.0 +ni:///sha-256;babf9f54c3229b3df25612a6c2b2972bd439cc55e40acec14638381098523ae6?ver=CBV2.0 diff --git a/tests/examples/ReferenceEventHashAlgorithm2.prehashes b/tests/examples/ReferenceEventHashAlgorithm2.prehashes index 7db8409..512fe0c 100644 --- a/tests/examples/ReferenceEventHashAlgorithm2.prehashes +++ b/tests/examples/ReferenceEventHashAlgorithm2.prehashes @@ -1 +1 @@ -eventType=ObjectEventeventTime=2020-04-01T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatadeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111sensorReporttype=gs1:Humidityvalue=12.1uom=A93type=gs1:Molar_concentrationchemicalSubstance=urn:epcglobal:cbv:inchikey:CZMRCDWAGMRECN-UGDNZRGBSA-Nvalue=0.18uom=C35type=gs1:Molar_concentrationmicroorganism=https://www.ncbi.nlm.nih.gov/taxonomy/1126011value=0.05uom=C35type=gs1:Temperaturevalue=26sDev=0.1uom=CEL +eventType=ObjectEventeventTime=2020-04-01T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111sensorReport=type=gs1:Humidityvalue=12.1uom=A93sensorReport=type=gs1:Molar_concentrationchemicalSubstance=urn:epcglobal:cbv:inchikey:CZMRCDWAGMRECN-UGDNZRGBSA-Nvalue=0.18uom=C35sensorReport=type=gs1:Molar_concentrationmicroorganism=https://www.ncbi.nlm.nih.gov/taxonomy/1126011value=0.05uom=C35sensorReport=type=gs1:Temperaturevalue=26sDev=0.1uom=CEL diff --git a/tests/examples/SensorDataExamples.hashes b/tests/examples/SensorDataExamples.hashes index fcde235..fef4837 100644 --- a/tests/examples/SensorDataExamples.hashes +++ b/tests/examples/SensorDataExamples.hashes @@ -1,12 +1,12 @@ -ni:///sha-256;665a51da93e2a52ced894282f600fce1e67162d683a9e997eaa0657e53da4909?ver=CBV2.0 -ni:///sha-256;e46f44d8d6c8a2f156d64672afc704d4458133a65a1f01c8df61dbce6e2ad8be?ver=CBV2.0 -ni:///sha-256;6f3644012982d8b9dfb27aa33f4f3e6720a98df087e044762c19a95340d6babd?ver=CBV2.0 -ni:///sha-256;7fef66f4027ec7ed7a156f1ccd5bc4a9cdb686c24e128d0b43df1d70943c27ef?ver=CBV2.0 -ni:///sha-256;33bdeed428bb37e6404decbcd2e395fd3651ae6a3f19cd4c39ecdc704935c25e?ver=CBV2.0 -ni:///sha-256;10904fdf6331a91a9f3073fdedab3dc8484efb08a7cf896c46bcdf8c6b0d758d?ver=CBV2.0 -ni:///sha-256;b415e8c0ddf693e8e8b485b5b70df813c7b9ba71b5ca2918aeca3e18b0b9f563?ver=CBV2.0 -ni:///sha-256;41361e3404b1da90c09dabdb5aa3b42bd61fcf25395a2d441cd52c9eacfe8bc2?ver=CBV2.0 -ni:///sha-256;01eab3209f0b170b10ceca4f9d7b15a5e0dce0dd71f67207eb18af14df89273a?ver=CBV2.0 -ni:///sha-256;1d1818e087f6acb597e221d51cf1e57f7aa5977e16a0d1deeb8748b22637e298?ver=CBV2.0 -ni:///sha-256;0df156086a615ffa6eb7a73ed2b5400ada7ea545d38c7dd79c8e1dd3b5fac89e?ver=CBV2.0 -ni:///sha-256;cbcb8a828594f56a8c352fb31ed0c7ff58427ecaf4e8795c2533871c28facff6?ver=CBV2.0 +ni:///sha-256;84b0ae1153dcbf53836054f0c38376b5ca23e73218b53512e0dbce142002719e?ver=CBV2.0 +ni:///sha-256;6fa4700d03ed058fe7e996bcd0c6f54b3c86061aa863600fed0f51c611e8be60?ver=CBV2.0 +ni:///sha-256;5a03f995b3ef2380dc2aad035234f3a2cb56dee86bd8e93b2189123876cfef62?ver=CBV2.0 +ni:///sha-256;593c768a902b65ddeab2f60766fe383e8670ba96bef5f626bd6bc633b9b099c0?ver=CBV2.0 +ni:///sha-256;155795d13b538f9320b19d46b24e3d31dd58a8347bf3988d211499cad851d277?ver=CBV2.0 +ni:///sha-256;fae7eb20fdf591122fb4f16d03ac848396c90908f682daea07d2931b00a983ba?ver=CBV2.0 +ni:///sha-256;961836388c529bea098cf63ffc93cbdabe5a6d9d12092bcd3343b5834fb9027c?ver=CBV2.0 +ni:///sha-256;b3e71ed587051f01a40b48c17712e555307968bce8e330a881ea7cf091ab9179?ver=CBV2.0 +ni:///sha-256;f743c0463d897032b9d653b385ade3c39bc10b491611fc57605a91840a37fe07?ver=CBV2.0 +ni:///sha-256;5921370f6caed506bdc2edd6979e73063d60889d1e5cf6ce9c7035f21ca4a0a5?ver=CBV2.0 +ni:///sha-256;4095090821d58d1b68d3a1ebfd817690017c0d43b61898b68fb51656f10f3ced?ver=CBV2.0 +ni:///sha-256;3aa6f37d06618fb4afd69f156b2aac303ca30f686020568d0c9ef427f0bdec17?ver=CBV2.0 diff --git a/tests/examples/SensorDataExamples.prehashes b/tests/examples/SensorDataExamples.prehashes index 8788b8d..776b401 100644 --- a/tests/examples/SensorDataExamples.prehashes +++ b/tests/examples/SensorDataExamples.prehashes @@ -1,12 +1,12 @@ -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatatime=2019-04-02T14:05:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.1uom=A93type=gs1:Illuminancevalue=800uom=LUXtype=gs1:Speedvalue=160uom=KMHtype=gs1:Temperaturevalue=26uom=CELsensorMetaDatatime=2019-04-02T14:35:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.2uom=A93type=gs1:Illuminancevalue=801uom=LUXtype=gs1:Speedvalue=161uom=KMHtype=gs1:Temperaturevalue=26.1uom=CELsensorMetaDatatime=2019-04-02T14:55:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.2uom=A93type=gs1:Illuminancevalue=802uom=LUXtype=gs1:Speedvalue=162uom=KMHtype=gs1:Temperaturevalue=26.2uom=CEL -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatastartTime=2019-04-02T12:55:01.000ZendTime=2019-04-02T13:55:00.000ZdeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999bizRules=https://example.com/gdti/4012345000054987sensorReporttype=gs1:HumidityminValue=12.1maxValue=12.2uom=A93type=gs1:IlluminanceminValue=800maxValue=802uom=LUXtype=gs1:SpeedminValue=160maxValue=162uom=KMHtype=gs1:TemperatureminValue=26maxValue=26.2meanValue=26.1sDev=0.1uom=CEL -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatastartTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReporttype=gs1:HumidityminValue=69.2maxValue=72.5uom=A93type=gs1:TemperatureminValue=12.4maxValue=13.8uom=CEL -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00quantityListquantityElementepcClass=urn:epc:class:lgtin:4023333.002000.2019-10-07quantity=150uom=KGMaction=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatatime=2019-04-02T14:55:00.000+01:00sensorReporttype=gs1:HumiditydeviceID=urn:epc:id:giai:4000001.222deviceMetaData=https://id.gs1.org/giai/4000001222rawData=https://example.org/giai/401234599999value=12.1uom=A93type=gs1:IlluminancedeviceID=urn:epc:id:giai:4000001.444deviceMetaData=https://id.gs1.org/giai/4000001444rawData=https://example.org/giai/401234599999value=800uom=LUXtype=gs1:SpeeddeviceID=urn:epc:id:giai:4000001.333deviceMetaData=https://id.gs1.org/giai/4000001333rawData=https://example.org/giai/401234599999value=160uom=KMHtype=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999value=26uom=CEL -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatadeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111sensorReporttype=gs1:Temperaturevalue=26.1uom=CELtype=gs1:Temperaturevalue=26.2uom=CELtype=gs1:Temperaturevalue=26.3uom=CELtype=gs1:Temperaturevalue=26.4uom=CELtype=gs1:Temperaturevalue=26.5uom=CELtype=gs1:Temperaturevalue=26uom=CEL -eventType=ObjectEventeventTime=2019-10-07T14:00:00.000ZeventTimeZoneOffset=+01:00action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatastartTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReporttype=example:someSensorPropertystringValue=someSensorOutputtype=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CEL -eventType=ObjectEventeventTime=2019-10-07T15:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatatime=2019-07-19T14:00:00.000+01:00sensorReporttype=example:GhideviceID=urn:epc:id:giai:4000001.114stringValue=SomeStringtype=example:JkldeviceID=urn:epc:id:giai:4000001.115hexBinaryValue=f0f0f0type=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111value=26uom=CELtype=rail:AbcdeviceID=urn:epc:id:giai:4000001.112stringValue=111100001111000003641344type=rail:DefdeviceID=urn:epc:id:giai:4000001.113booleanValue=truetype=rail:MnodeviceID=urn:epc:id:giai:4000001.116uriValue=https://example.org/rail/someSectorSpecificValue -eventType=AggregationEventeventTime=2019-10-07T14:30:00.000ZeventTimeZoneOffset=+01:00parentID=urn:epc:id:sscc:4012345.0111111111childQuantityListquantityElementepcClass=urn:epc:class:lgtin:4012345.011111.1234quantity=52uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:packingdisposition=urn:epcglobal:cbv:disp:in_progressreadPointid=urn:epc:id:sgln:4012345.00025.0sensorElementListsensorElementsensorMetaDatastartTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReporttype=example:someSensorPropertystringValue=someSensorOutputtype=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELsensorMetaDatatime=2019-07-19T14:00:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999dataProcessingMethod=https://example.com/gdti/4012345000054987bizRules=https://example.org/gdti/4012345000054987sensorReporttype=gs1:Humidityvalue=12.1uom=A93type=gs1:Molar_concentrationchemicalSubstance=https://identifiers.org/inchikey:CZMRCDWAGMRECN-UGDNZRGBSA-Nvalue=0.18uom=C35type=gs1:Molar_concentrationmicroorganism=https://www.ncbi.nlm.nih.gov/taxonomy/1126011value=0.05uom=C35sensorReporttype=example:someSensorPropertystringValue=someSensorOutputtype=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999dataProcessingMethod=https://example.com/gdti/4012345000054987uom=CEL -eventType=ObjectEventeventTime=2020-05-07T15:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:sensor_reportingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorReporttype=gs1:AlarmConditionbooleanValue=truetype=gs1:ErrorConditionuriValue=https://example.com/ErrorCode-A827 -eventType=ObjectEventeventTime=2020-05-08T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.022222.1234action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:sensor_reportingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorReporttype=gs1:Speedvalue=0uom=MTStype=gs1:Speedvalue=12.8uom=MTStype=gs1:Speedvalue=4.5uom=MTS -eventType=TransactionEventeventTime=2020-07-03T06:05:00.000ZeventTimeZoneOffset=-06:00epcListepc=urn:epc:id:sgtin:0614141.107340.1epc=urn:epc:id:sgtin:0614141.107340.2action=ADDbizStep=urn:epcglobal:cbv:bizstep:inspectingdisposition=urn:epcglobal:cbv:disp:needs_replacementreadPointid=urn:epc:id:sgln:4012345.00000.5bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE100099sensorElementListsensorElementsensorReporttype=gs1:EffectiveDoseRatevalue=0.005uom=P71 -eventType=TransformationEventeventTime=2020-09-29T12:00:00.000ZeventTimeZoneOffset=+02:00errorDeclarationdeclarationTime=2020-09-29T13:00:00.000ZinputQuantityListquantityElementepcClass=urn:epc:class:lgtin:4023333.055555.ABC123quantity=25uom=KGMoutputEPCListepc=urn:epc:id:sgtin:4012345.012345.987epc=urn:epc:id:sgtin:4012345.012345.988bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4023333.00000.0bizLocationid=urn:epc:id:sgln:4023333.00001.12sensorElementListsensorElementsensorMetaDatastartTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReporttype=example:someSensorPropertystringValue=someSensorOutputtype=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELilmd{https://ns.example.com/epcis}grading=A{https://ns.example2.com/epcis}userMasterData{https://ns.example2.com/epcis}sizeCode=B-2{urn:epcglobal:cbv:mda}lotNumber=LOTABC{https://ns.example.com/epcis}internalData{https://ns.example.com/epcis}machine=urn:epc:id:giai:4012345.ABC{https://ns.example.com/epcis}procedure=A-1{https://ns.example2.com/epcis}furtherData{https://ns.example2.com/epcis}assemblyLine=2{https://ns.example2.com/epcis}workingShift=1{https://ns.example4.com/epcis}otherThings=some text +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=time=2019-04-02T14:05:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.1uom=A93sensorReport=type=gs1:Illuminancevalue=800uom=LUXsensorReport=type=gs1:Speedvalue=160uom=KMHsensorReport=type=gs1:Temperaturevalue=26uom=CELsensorElement=sensorMetaData=time=2019-04-02T14:35:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.2uom=A93sensorReport=type=gs1:Illuminancevalue=801uom=LUXsensorReport=type=gs1:Speedvalue=161uom=KMHsensorReport=type=gs1:Temperaturevalue=26.1uom=CELsensorElement=sensorMetaData=time=2019-04-02T14:55:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.2uom=A93sensorReport=type=gs1:Illuminancevalue=802uom=LUXsensorReport=type=gs1:Speedvalue=162uom=KMHsensorReport=type=gs1:Temperaturevalue=26.2uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-02T12:55:01.000ZendTime=2019-04-02T13:55:00.000ZdeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999bizRules=https://example.com/gdti/4012345000054987sensorReport=type=gs1:HumidityminValue=12.1maxValue=12.2uom=A93sensorReport=type=gs1:IlluminanceminValue=800maxValue=802uom=LUXsensorReport=type=gs1:SpeedminValue=160maxValue=162uom=KMHsensorReport=type=gs1:TemperatureminValue=26maxValue=26.2meanValue=26.1sDev=0.1uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReport=type=gs1:HumidityminValue=69.2maxValue=72.5uom=A93sensorReport=type=gs1:TemperatureminValue=12.4maxValue=13.8uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00quantityList=quantityElement=epcClass=urn:epc:class:lgtin:4023333.002000.2019-10-07quantity=150uom=KGMaction=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=time=2019-04-02T14:55:00.000+01:00sensorReport=type=gs1:HumiditydeviceID=urn:epc:id:giai:4000001.222deviceMetaData=https://id.gs1.org/giai/4000001222rawData=https://example.org/giai/401234599999value=12.1uom=A93sensorReport=type=gs1:IlluminancedeviceID=urn:epc:id:giai:4000001.444deviceMetaData=https://id.gs1.org/giai/4000001444rawData=https://example.org/giai/401234599999value=800uom=LUXsensorReport=type=gs1:SpeeddeviceID=urn:epc:id:giai:4000001.333deviceMetaData=https://id.gs1.org/giai/4000001333rawData=https://example.org/giai/401234599999value=160uom=KMHsensorReport=type=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999value=26uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111sensorReport=type=gs1:Temperaturevalue=26.1uom=CELsensorReport=type=gs1:Temperaturevalue=26.2uom=CELsensorReport=type=gs1:Temperaturevalue=26.3uom=CELsensorReport=type=gs1:Temperaturevalue=26.4uom=CELsensorReport=type=gs1:Temperaturevalue=26.5uom=CELsensorReport=type=gs1:Temperaturevalue=26uom=CELsensorElementList=sensorElement=sensorReport=time=2019-04-02T14:05:00.000+01:00sensorReport=time=2019-04-02T14:15:00.000+01:00sensorReport=time=2019-04-02T14:25:00.000+01:00sensorReport=time=2019-04-02T14:35:00.000+01:00sensorReport=time=2019-04-02T14:45:00.000+01:00sensorReport=time=2019-04-02T14:55:00.000+01:00 +eventType=ObjectEventeventTime=2019-10-07T14:00:00.000ZeventTimeZoneOffset=+01:00action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReport=type=example:someSensorPropertystringValue=someSensorOutputsensorReport=type=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELsensorElementList=sensorElement=sensorMetaData={https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport={https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData={https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987 +eventType=ObjectEventeventTime=2019-10-07T15:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=time=2019-07-19T14:00:00.000+01:00sensorReport=type=example:GhideviceID=urn:epc:id:giai:4000001.114stringValue=SomeStringsensorReport=type=example:JkldeviceID=urn:epc:id:giai:4000001.115hexBinaryValue=f0f0f0sensorReport=type=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111value=26uom=CELsensorReport=type=rail:AbcdeviceID=urn:epc:id:giai:4000001.112stringValue=111100001111000003641344sensorReport=type=rail:DefdeviceID=urn:epc:id:giai:4000001.113booleanValue=truesensorReport=type=rail:MnodeviceID=urn:epc:id:giai:4000001.116uriValue=https://example.org/rail/someSectorSpecificValue +eventType=AggregationEventeventTime=2019-10-07T14:30:00.000ZeventTimeZoneOffset=+01:00parentID=urn:epc:id:sscc:4012345.0111111111childQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4012345.011111.1234quantity=52uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:packingdisposition=urn:epcglobal:cbv:disp:in_progressreadPoint=id=urn:epc:id:sgln:4012345.00025.0sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReport=type=example:someSensorPropertystringValue=someSensorOutputsensorReport=type=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELsensorElement=sensorMetaData=time=2019-07-19T14:00:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999dataProcessingMethod=https://example.com/gdti/4012345000054987bizRules=https://example.org/gdti/4012345000054987sensorReport=type=gs1:Humidityvalue=12.1uom=A93sensorReport=type=gs1:Molar_concentrationchemicalSubstance=https://identifiers.org/inchikey:CZMRCDWAGMRECN-UGDNZRGBSA-Nvalue=0.18uom=C35sensorReport=type=gs1:Molar_concentrationmicroorganism=https://www.ncbi.nlm.nih.gov/taxonomy/1126011value=0.05uom=C35sensorElement=sensorReport=type=example:someSensorPropertystringValue=someSensorOutputsensorReport=type=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999dataProcessingMethod=https://example.com/gdti/4012345000054987uom=CELsensorElementList=sensorElement=sensorMetaData={https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport={https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData={https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987sensorElement=sensorReport=bizRules=https://example.org/gdti/4012345000054987time=2019-07-19T14:00:00.000+01:00 +eventType=ObjectEventeventTime=2020-05-07T15:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:sensor_reportingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorReport=type=gs1:AlarmConditionbooleanValue=truesensorReport=type=gs1:ErrorConditionuriValue=https://example.com/ErrorCode-A827 +eventType=ObjectEventeventTime=2020-05-08T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.022222.1234action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:sensor_reportingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorReport=type=gs1:Speedvalue=0uom=MTSsensorReport=type=gs1:Speedvalue=12.8uom=MTSsensorReport=type=gs1:Speedvalue=4.5uom=MTSsensorElementList=sensorElement=sensorReport=component=example:xsensorReport=component=example:ysensorReport=component=example:z +eventType=TransactionEventeventTime=2020-07-03T06:05:00.000ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107340.1epc=urn:epc:id:sgtin:0614141.107340.2action=ADDbizStep=urn:epcglobal:cbv:bizstep:inspectingdisposition=urn:epcglobal:cbv:disp:needs_replacementreadPoint=id=urn:epc:id:sgln:4012345.00000.5bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE100099type=urn:epcglobal:cbv:btt:posensorElementList=sensorElement=sensorReport=type=gs1:EffectiveDoseRatevalue=0.005uom=P71 +eventType=TransformationEventeventTime=2020-09-29T12:00:00.000ZeventTimeZoneOffset=+02:00errorDeclaration=declarationTime=2020-09-29T13:00:00.000ZinputQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4023333.055555.ABC123quantity=25uom=KGMoutputEPCList=epc=urn:epc:id:sgtin:4012345.012345.987epc=urn:epc:id:sgtin:4012345.012345.988bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4023333.00000.0bizLocation=id=urn:epc:id:sgln:4023333.00001.12sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReport=type=example:someSensorPropertystringValue=someSensorOutputsensorReport=type=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELbizLocation={https://ns.example.com/epcis}gs1ES=(414)4023333000017 (254)12errorDeclaration={https://ns.example.com/epcis}field={https://ns.example.com/epcis}furtherData=abcd1234{https://ns.example.com/epcis}issuer=Employee 123{https://ns.example3.com/epcis}errorCodes={https://ns.example3.com/epcis}value1=34{https://ns.example3.com/epcis}value44=66ilmd={https://ns.example.com/epcis}grading=A{https://ns.example2.com/epcis}userMasterData={https://ns.example2.com/epcis}sizeCode=B-2{urn:epcglobal:cbv:mda}lotNumber=LOTABCreadPoint={https://ns.example.com/epcis}gs1ES=(414)4023333000000sensorElementList=sensorElement=sensorMetaData={https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport={https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData={https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987{https://ns.example.com/epcis}someUserField=abc123{https://ns.example.com/epcis}internalData={https://ns.example.com/epcis}machine=urn:epc:id:giai:4012345.ABC{https://ns.example.com/epcis}procedure=A-1{https://ns.example2.com/epcis}furtherData={https://ns.example2.com/epcis}assemblyLine=2{https://ns.example2.com/epcis}workingShift=1{https://ns.example4.com/epcis}otherThings=some text diff --git a/tests/examples/epcisDocWith2DifferentTransformationEvents.hashes b/tests/examples/epcisDocWith2DifferentTransformationEvents.hashes index cc360b1..ee5d8a6 100644 --- a/tests/examples/epcisDocWith2DifferentTransformationEvents.hashes +++ b/tests/examples/epcisDocWith2DifferentTransformationEvents.hashes @@ -1,2 +1,2 @@ -ni:///sha-256;a08d084721d1b64cbf67d089c084dfffc20b82885c2d291943e926f7115cf01d?ver=CBV2.0 -ni:///sha-256;55b957d87a6d88c7b298bcfb54ccf7a947c1f12a8f0feeb5fb5e36d2c2bde2e7?ver=CBV2.0 +ni:///sha-256;7a34ce2874adff757195665f75756b374a11ad12bb57ee0ab88f6c49f6ab6fcf?ver=CBV2.0 +ni:///sha-256;321790f9441ce746c7418aff54f1ebdb6578e609fee26b5107de90b282eeb0a8?ver=CBV2.0 diff --git a/tests/examples/epcisDocWith2DifferentTransformationEvents.prehashes b/tests/examples/epcisDocWith2DifferentTransformationEvents.prehashes index 0a92cd9..9e6a2ed 100644 --- a/tests/examples/epcisDocWith2DifferentTransformationEvents.prehashes +++ b/tests/examples/epcisDocWith2DifferentTransformationEvents.prehashes @@ -1,2 +1,2 @@ -eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCListepc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged -eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4047111.012345.1111outputEPCListepc=urn:epc:id:sgtin:4047111.012345.2222epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged +eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCList=epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged +eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4047111.012345.1111outputEPCList=epc=urn:epc:id:sgtin:4047111.012345.2222epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged diff --git a/tests/examples/epcisDocWithCustomSchemaInContext.hashes b/tests/examples/epcisDocWithCustomSchemaInContext.hashes index 3850e06..46c6042 100644 --- a/tests/examples/epcisDocWithCustomSchemaInContext.hashes +++ b/tests/examples/epcisDocWithCustomSchemaInContext.hashes @@ -1,2 +1,2 @@ -ni:///sha-256;2fa970168bf3eeca1bf9dcfad5a9de3d1ce3025865f52ce90daef7d539d329ac?ver=CBV2.0 -ni:///sha-256;3530114fb1b37d9e160951a41f66cf6fa5f0d7fedb30838561f1feffd48457d5?ver=CBV2.0 +ni:///sha-256;2426270506e9efb2010c65a8ecee8a3ba2727a38c1e5be23ff109af5c851e546?ver=CBV2.0 +ni:///sha-256;581c4e2b36e4c74dd21e24c2745f8dea23e196d35fd4e27cd5cb9f3a8ae35e71?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithCustomSchemaInContext.prehashes b/tests/examples/epcisDocWithCustomSchemaInContext.prehashes new file mode 100644 index 0000000..a806e95 --- /dev/null +++ b/tests/examples/epcisDocWithCustomSchemaInContext.prehashes @@ -0,0 +1,2 @@ +eventType=ObjectEventeventTime=2005-04-04T02:33:31.116ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107346.2017epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:shippingdisposition=urn:epcglobal:cbv:disp:in_transitreadPoint=id=urn:epc:id:sgln:0614141.07346.1234bizTransactionList=bizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pohttp://ns.example.com/epcis/myField=myValueid=_:event1 +eventType=ObjectEventeventTime=2005-04-05T02:33:31.116ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingdisposition=urn:epcglobal:cbv:disp:in_progressreadPoint=id=urn:epc:id:sgln:0012345.11111.400bizLocation=id=urn:epc:id:sgln:0012345.11111.0bizTransactionList=bizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pobizTransaction=urn:epcglobal:cbv:bt:0614141073467:1152type=urn:epcglobal:cbv:btt:desadvhttp://ns.example.com/epcis/myField2=myValue2id=_:event2 diff --git a/tests/examples/epcisDocWithDefaultSchemaInContext.hashes b/tests/examples/epcisDocWithDefaultSchemaInContext.hashes index bd73bf6..46644a3 100644 --- a/tests/examples/epcisDocWithDefaultSchemaInContext.hashes +++ b/tests/examples/epcisDocWithDefaultSchemaInContext.hashes @@ -1,2 +1,2 @@ -ni:///sha-256;b6d235d8bdbc3e302c04e55367cb989925583b647048a4ed3ce11b83cf79c090?ver=CBV2.0 -ni:///sha-256;c31a793d4a542f1e00bc165fa5626815312a01712ccbbdb35c91cf66965c6776?ver=CBV2.0 +ni:///sha-256;e7bf57bb771499db0666d47a9a9ecf041f513a06df1ee912c7eb79d7d9f99a0b?ver=CBV2.0 +ni:///sha-256;b754182b801e94e5e85eff3046d680e889650138433ce6b5826e82729b4f4d5b?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithDefaultSchemaInContext.prehashes b/tests/examples/epcisDocWithDefaultSchemaInContext.prehashes new file mode 100644 index 0000000..d39e7a5 --- /dev/null +++ b/tests/examples/epcisDocWithDefaultSchemaInContext.prehashes @@ -0,0 +1,2 @@ +eventType=ObjectEventeventTime=2005-04-04T02:33:31.116ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107346.2017epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:shippingdisposition=urn:epcglobal:cbv:disp:in_transitreadPoint=id=urn:epc:id:sgln:0614141.07346.1234bizTransactionList=bizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:poid=_:event1 +eventType=ObjectEventeventTime=2005-04-05T02:33:31.116ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingdisposition=urn:epcglobal:cbv:disp:in_progressreadPoint=id=urn:epc:id:sgln:0012345.11111.400bizLocation=id=urn:epc:id:sgln:0012345.11111.0bizTransactionList=bizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pobizTransaction=urn:epcglobal:cbv:bt:0614141073467:1152type=urn:epcglobal:cbv:btt:desadvid=_:event2 diff --git a/tests/examples/epcisDocWithSensorDataObjectEvent.hashes b/tests/examples/epcisDocWithSensorDataObjectEvent.hashes index 53fecf5..2fe825d 100644 --- a/tests/examples/epcisDocWithSensorDataObjectEvent.hashes +++ b/tests/examples/epcisDocWithSensorDataObjectEvent.hashes @@ -1 +1 @@ -ni:///sha-256;665a51da93e2a52ced894282f600fce1e67162d683a9e997eaa0657e53da4909?ver=CBV2.0 +ni:///sha-256;84b0ae1153dcbf53836054f0c38376b5ca23e73218b53512e0dbce142002719e?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithSensorDataObjectEvent.prehashes b/tests/examples/epcisDocWithSensorDataObjectEvent.prehashes index bce89ab..9c6194b 100644 --- a/tests/examples/epcisDocWithSensorDataObjectEvent.prehashes +++ b/tests/examples/epcisDocWithSensorDataObjectEvent.prehashes @@ -1 +1 @@ -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatatime=2019-04-02T14:05:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.1uom=A93type=gs1:Illuminancevalue=800uom=LUXtype=gs1:Speedvalue=160uom=KMHtype=gs1:Temperaturevalue=26uom=CELsensorMetaDatatime=2019-04-02T14:35:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.2uom=A93type=gs1:Illuminancevalue=801uom=LUXtype=gs1:Speedvalue=161uom=KMHtype=gs1:Temperaturevalue=26.1uom=CELsensorMetaDatatime=2019-04-02T14:55:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.2uom=A93type=gs1:Illuminancevalue=802uom=LUXtype=gs1:Speedvalue=162uom=KMHtype=gs1:Temperaturevalue=26.2uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=time=2019-04-02T14:05:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.1uom=A93sensorReport=type=gs1:Illuminancevalue=800uom=LUXsensorReport=type=gs1:Speedvalue=160uom=KMHsensorReport=type=gs1:Temperaturevalue=26uom=CELsensorElement=sensorMetaData=time=2019-04-02T14:35:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.2uom=A93sensorReport=type=gs1:Illuminancevalue=801uom=LUXsensorReport=type=gs1:Speedvalue=161uom=KMHsensorReport=type=gs1:Temperaturevalue=26.1uom=CELsensorElement=sensorMetaData=time=2019-04-02T14:55:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.2uom=A93sensorReport=type=gs1:Illuminancevalue=802uom=LUXsensorReport=type=gs1:Speedvalue=162uom=KMHsensorReport=type=gs1:Temperaturevalue=26.2uom=CEL diff --git a/tests/examples/epcisDocWithShippingAndTransportingEvent.hashes b/tests/examples/epcisDocWithShippingAndTransportingEvent.hashes index bc6a668..a9159ff 100644 --- a/tests/examples/epcisDocWithShippingAndTransportingEvent.hashes +++ b/tests/examples/epcisDocWithShippingAndTransportingEvent.hashes @@ -1,2 +1,2 @@ -ni:///sha-256;b6c70f65cc4acaaf953802a6a755b5213946ecad3f925c801bca3604e649dabb?ver=CBV2.0 -ni:///sha-256;74e1f8e9334de002167ccefe8b2bb0ceaeea826264ac6b486188d3d41e48026a?ver=CBV2.0 +ni:///sha-256;35ade9553f6060db3fa7b4b732187ef99afa17594ae966ded658e5b5db9facdc?ver=CBV2.0 +ni:///sha-256;577e4256c47cc467180b0600c70cfd54c8c88ee44bd808bb514f33ff694938c4?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithShippingAndTransportingEvent.prehashes b/tests/examples/epcisDocWithShippingAndTransportingEvent.prehashes index 80acbd3..a6f8522 100644 --- a/tests/examples/epcisDocWithShippingAndTransportingEvent.prehashes +++ b/tests/examples/epcisDocWithShippingAndTransportingEvent.prehashes @@ -1,2 +1,2 @@ -eventType=ObjectEventeventTime=2020-02-20T11:50:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:4012345.1112223334action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPointid=urn:epc:id:sgln:4012345.00022.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345000009:ASN1099sourceListsource=urn:epc:id:sgln:4012345.00000.0destinationListdestination=urn:epc:id:sgln:4023333.00000.0 -eventType=ObjectEventeventTime=2020-02-20T15:50:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:4012345.1112223334action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:transportingreadPointid=geo:47.506694,11.104301 +eventType=ObjectEventeventTime=2020-02-20T11:50:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:4012345.1112223334action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPoint=id=urn:epc:id:sgln:4012345.00022.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345000009:ASN1099type=urn:epcglobal:cbv:btt:desadvsourceList=source=urn:epc:id:sgln:4012345.00000.0type=urn:epcglobal:cbv:sdt:possessing_partydestinationList=destination=urn:epc:id:sgln:4023333.00000.0type=urn:epcglobal:cbv:sdt:possessing_party +eventType=ObjectEventeventTime=2020-02-20T15:50:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:4012345.1112223334action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:transportingreadPoint=id=geo:47.506694,11.104301 diff --git a/tests/examples/epcisDocWithTransformationEventWithExtension.hashes b/tests/examples/epcisDocWithTransformationEventWithExtension.hashes index 72a77cf..1b5eb74 100644 --- a/tests/examples/epcisDocWithTransformationEventWithExtension.hashes +++ b/tests/examples/epcisDocWithTransformationEventWithExtension.hashes @@ -1 +1 @@ -ni:///sha-256;e35bdd723ce077e994b88851f089d6f518475141e66eea5d35eeb741b521c086?ver=CBV2.0 +ni:///sha-256;21ecc1f2c9309760a30a36f36512855f1392d31796da6d4cd0680a92fc22b0fc?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithTransformationEventWithExtension.prehashes b/tests/examples/epcisDocWithTransformationEventWithExtension.prehashes index 5547d5d..d65ab4a 100644 --- a/tests/examples/epcisDocWithTransformationEventWithExtension.prehashes +++ b/tests/examples/epcisDocWithTransformationEventWithExtension.prehashes @@ -1 +1 @@ -eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCListepc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged{https://circ4life.eecc.info/epcis}lifeTime=P3Y +eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCList=epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged{https://circ4life.eecc.info/epcis}lifeTime=P3Y diff --git a/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.hashes b/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.hashes index f4b0d91..b46e953 100644 --- a/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.hashes +++ b/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.hashes @@ -1 +1 @@ -ni:///sha-256;71bf4f5c0e26a92221dce50c2e2775eca3402169eaa46caf973f822b60e7698c?ver=CBV2.0 +ni:///sha-256;67d908f22f34026244656b87aa8e3889a2307219e46e3654db356e103f7b3a10?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.prehashes b/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.prehashes index 49c157b..a305db2 100644 --- a/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.prehashes +++ b/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.prehashes @@ -1 +1 @@ -eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCListepc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged{https://circ4life.eecc.info/epcis}lifeTime=P3Y{https://circ4life.eecc.info/epcis}resourceList{https://circ4life.eecc.info/epcis}epc=https://circ4life.eecc.info/recycling/bin/obj/1234567890119051400001112345{https://circ4life.eecc.info/epcis}quantityElementepcClass=http://circ4life.eecc.info/material/copperquantity=0.5uom=KGM{https://circ4life.eecc.info/epcis}resourceElement{https://circ4life.eecc.info/epcis}amount{https://circ4life.eecc.info/epcis}quantity=0.5{https://circ4life.eecc.info/epcis}uom=WHR{https://circ4life.eecc.info/epcis}resource=https://w3id.org/saref#Electricity{https://circ4life.eecc.info/epcis}source=http://semanco02.hs-albsig.de/repository/ontology-releases/eu/semanco/ontology/SEMANCO/SEMANCO.owl#Not-Renewable_Energy_Source{https://circ4life.eecc.info/epcis}wasteList{https://circ4life.eecc.info/epcis}wasteElement{https://circ4life.eecc.info/epcis}amount{https://circ4life.eecc.info/epcis}quantity=0.5{https://circ4life.eecc.info/epcis}uom=KGM{https://circ4life.eecc.info/epcis}sink=http://circ4life.eecc.info/sink/landfill{https://circ4life.eecc.info/epcis}waste=http://circ4life.eecc.info/material/plastics +eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCList=epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged{https://circ4life.eecc.info/epcis}lifeTime=P3Y{https://circ4life.eecc.info/epcis}resourceList={https://circ4life.eecc.info/epcis}epc=https://circ4life.eecc.info/recycling/bin/obj/1234567890119051400001112345{https://circ4life.eecc.info/epcis}quantityElement=epcClass=http://circ4life.eecc.info/material/copperquantity=0.5uom=KGM{https://circ4life.eecc.info/epcis}resourceElement={https://circ4life.eecc.info/epcis}amount={https://circ4life.eecc.info/epcis}quantity=0.5{https://circ4life.eecc.info/epcis}uom=WHR{https://circ4life.eecc.info/epcis}resource=https://w3id.org/saref#Electricity{https://circ4life.eecc.info/epcis}source=http://semanco02.hs-albsig.de/repository/ontology-releases/eu/semanco/ontology/SEMANCO/SEMANCO.owl#Not-Renewable_Energy_Source{https://circ4life.eecc.info/epcis}wasteList={https://circ4life.eecc.info/epcis}wasteElement={https://circ4life.eecc.info/epcis}amount={https://circ4life.eecc.info/epcis}quantity=0.5{https://circ4life.eecc.info/epcis}uom=KGM{https://circ4life.eecc.info/epcis}sink=http://circ4life.eecc.info/sink/landfill{https://circ4life.eecc.info/epcis}waste=http://circ4life.eecc.info/material/plastics diff --git a/tests/examples/epcisDocWithVariousEventTypes.hashes b/tests/examples/epcisDocWithVariousEventTypes.hashes index b6aaa77..2f20bb5 100644 --- a/tests/examples/epcisDocWithVariousEventTypes.hashes +++ b/tests/examples/epcisDocWithVariousEventTypes.hashes @@ -1,13 +1,13 @@ -ni:///sha-256;ff0b5e8b296013c2cad79ca272f8d8234923dc18fed35e61340dabf1cc7d220c?ver=CBV2.0 -ni:///sha-256;aaa3148cb55473688f612bfe1b0acc50d11d46508bee73333670472f08417f22?ver=CBV2.0 -ni:///sha-256;fe6c8358e79313b5b5ce8825079317918b499e587c1b8c3e57eee7d389bc7000?ver=CBV2.0 -ni:///sha-256;d5ae14f012338dc0d8767bc2bbf2198a5371ae058357b7c3a5fe608ed5b080a0?ver=CBV2.0 -ni:///sha-256;3551e2ee02887209f958ee20fd021ce309a025976f53ff0b731c42ef5d07c744?ver=CBV2.0 -ni:///sha-256;292725a9f41237c3f52d0785a3064e5f4c56a239f1f69bb044dba7152a1bf002?ver=CBV2.0 -ni:///sha-256;99959ed2eacc03d835efd9c8e887f17fe2a01bfef360acfa282029253aaf46b9?ver=CBV2.0 -ni:///sha-256;e62a570f8d8886bf1d142a265736792677b16852b5a28f37e01031b4964f831e?ver=CBV2.0 -ni:///sha-256;53eeecb9d2deb8ac8492f9a69b26566a536e8902ab7792e0e8ead36d74a2f5aa?ver=CBV2.0 -ni:///sha-256;11b4d2069a125ccb6e85c1f0cc05eb45bc956e0465a6a68bc0d951398e904efb?ver=CBV2.0 -ni:///sha-256;790954c5d3a7c58156fb94538eb54c5b819db66996e6d0a4fa5d0210929fa61f?ver=CBV2.0 -ni:///sha-256;e3e688251c4347811e84c5e76b2012e291e0aaef13d962b3a9d029d68ac6569b?ver=CBV2.0 -ni:///sha-256;25da975e45a6c80b9a91a0957d549c512ad114fb83213b9987e7a82c282a794c?ver=CBV2.0 +ni:///sha-256;2b80465f08c01b2cd8b4f213fe98dbcebf44a0c397616baf787ff9f6773e6a17?ver=CBV2.0 +ni:///sha-256;8939aae74d800f9f255ad1b8ad45a092f939eccfcd19f2c9328f991f608554e5?ver=CBV2.0 +ni:///sha-256;6c83b99603e6e96d3e616391c5313d8e7ff5a2dacc7139eaad22090b14cfc848?ver=CBV2.0 +ni:///sha-256;a8294bd6e73338425948d94e2d132f7b139097b9442e16443e0aebbb5c7bac04?ver=CBV2.0 +ni:///sha-256;9c095d8f1b69c61166a2d449c29bc21a28e6447417a1379e4a258c7dd02a6c28?ver=CBV2.0 +ni:///sha-256;c800436ce6d5764f765879fb1b77f8e109a76ba9a86efb631c985765a42c73c7?ver=CBV2.0 +ni:///sha-256;6a3b8626c1f83da6aacaabd47c13b4443e4e2a26aa720e93cf06ae79fa488ab0?ver=CBV2.0 +ni:///sha-256;0f7a70e764b0436a48dd5fcc612798401b0988268810314eda8ef768689879a1?ver=CBV2.0 +ni:///sha-256;759a607812c8e27c733f0f089e7b6c6fef3fe083ca90a2a7754ef503cb959878?ver=CBV2.0 +ni:///sha-256;c8645474fac9d7879cf58c6f7c43cdf5c9e6df060a50dbadb1dc3dfeca989c5d?ver=CBV2.0 +ni:///sha-256;856ab8fae8933b648f272d94037bece6916d45ed31ddde9200f7b81ae098f927?ver=CBV2.0 +ni:///sha-256;790d79e2b92125d29c7075d19ee6397bf59fce06d825b852c0279dfa45c2a2b1?ver=CBV2.0 +ni:///sha-256;398f83c9e7352ebf395047b54820655372997ba7be9f1aaba4d92bcc5eaa4d77?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithVariousEventTypes.prehashes b/tests/examples/epcisDocWithVariousEventTypes.prehashes index e440a1d..67eefac 100644 --- a/tests/examples/epcisDocWithVariousEventTypes.prehashes +++ b/tests/examples/epcisDocWithVariousEventTypes.prehashes @@ -1,13 +1,13 @@ -eventType=ObjectEventeventTime=2019-10-21T10:00:30.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:5200001.0111111146action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPointid=urn:epc:id:sgln:5200001.99901.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:5200001000008:4711bizTransaction=urn:epcglobal:cbv:bt:5200001000008:RE1099sourceListsource=urn:epc:id:pgln:5200001.00000destinationListdestination=urn:epc:id:pgln:4000001.98765destination=urn:epc:id:sgln:4012345.00012.0 -eventType=ObjectEventeventTime=2019-10-21T11:00:30.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:5200001.0111111146action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingreadPointid=urn:epc:id:sgln:4012345.00012.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:5200001000008:4711bizTransaction=urn:epcglobal:cbv:bt:5200001000008:RE1099sourceListsource=urn:epc:id:pgln:4000001.00012source=urn:epc:id:pgln:4000001.00012destinationListdestination=urn:epc:id:pgln:4012345.00000destination=urn:epc:id:pgln:4012345.00000destination=urn:epc:id:sgln:4012345.00012.0 -eventType=ObjectEventeventTime=2019-10-21T14:45:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:4012345.0111111111action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingdisposition=urn:epcglobal:cbv:disp:in_progressreadPointid=urn:epc:id:sgln:4012345.00024.0 -eventType=ObjectEventeventTime=2019-10-21T12:58:56.000ZeventTimeZoneOffset=+02:00quantityListquantityElementepcClass=urn:epc:class:lgtin:4054739.099914.20160711quantity=600uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4054739.00001.0ilmd{urn:epcglobal:cbv:mda}bestBeforeDate=2019-10-21 -eventType=AggregationEventeventTime=2019-10-21T09:58:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4047023.0111111122childEPCsepc=urn:epc:id:sgtin:4047023.077551.107epc=urn:epc:id:sgtin:4047023.077551.109epc=urn:epc:id:sgtin:4047023.077551.97epc=urn:epc:id:sgtin:4047023.077551.98action=ADDbizStep=urn:epcglobal:cbv:bizstep:packingreadPointid=urn:epc:id:sgln:4047023.00012.0 -eventType=AggregationEventeventTime=2019-10-21T15:30:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0111111133childQuantityListquantityElementepcClass=urn:epc:class:lgtin:4054739.012345.lot2quantity=17epcClass=urn:epc:class:lgtin:4054739.099902.P2quantity=12uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:packingreadPointid=urn:epc:id:sgln:4012345.00025.0 -eventType=AggregationEventeventTime=2019-10-21T09:58:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0111111144action=DELETEbizStep=urn:epcglobal:cbv:bizstep:unpackingreadPointid=urn:epc:id:sgln:4012345.00025.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE1099 -eventType=AggregationEventeventTime=2019-10-21T12:02:56.000ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0998811122childEPCsepc=urn:epc:id:sscc:4012344.0998811123epc=urn:epc:id:sscc:4012344.0998811124epc=urn:epc:id:sscc:4012344.0998811125action=DELETEbizStep=urn:epcglobal:cbv:bizstep:unpackingreadPointid=urn:epc:id:sgln:4012345.00077.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:4711 -eventType=TransactionEventeventTime=2019-10-21T06:05:00.000ZeventTimeZoneOffset=-06:00epcListepc=urn:epc:id:sgtin:0614141.107340.1epc=urn:epc:id:sgtin:0614141.107340.2action=ADDbizStep=urn:epcglobal:cbv:bizstep:shippingreadPointid=urn:epc:id:sgln:4012345.00000.5bizLocationid=urn:epc:id:sgln:4012345.00000.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE100099 -eventType=TransactionEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00quantityListquantityElementepcClass=urn:epc:class:lgtin:4012345.099988.2014-02-10quantity=2030uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:holdingreadPointid=urn:epc:id:sgln:4012345.00025.0bizLocationid=urn:epc:id:sgln:4012345.00002.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE1099 -eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25outputEPCListepc=urn:epc:id:sgtin:4012345.077889.25epc=urn:epc:id:sgtin:4012345.077889.26epc=urn:epc:id:sgtin:4012345.077889.27epc=urn:epc:id:sgtin:4012345.077889.28transformationID=urn:epc:id:gdti:4012345.55555.1234bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4012345.00001.0ilmd{http://ns.example.com/epcis}batch=4711{http://ns.example.com/epcis}bestBeforeDate=2020-11-10 -eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25inputQuantityListquantityElementepcClass=urn:epc:class:lgtin:0614141.077777.987quantity=30epcClass=urn:epc:class:lgtin:4012345.011111.4444quantity=10uom=KGMepcClass=urn:epc:idpat:sgtin:4012345.066666.*quantity=220outputEPCListepc=urn:epc:id:sgtin:4012345.077889.25epc=urn:epc:id:sgtin:4012345.077889.26epc=urn:epc:id:sgtin:4012345.077889.27epc=urn:epc:id:sgtin:4012345.077889.28bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4012345.00001.0ilmd{http://ns.example.com/epcis}batch=XYZ{http://ns.example.com/epcis}bestBeforeDate=2015-11-10 -eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25outputQuantityListquantityElementepcClass=urn:epc:class:lgtin:4054739.099902.P20131121quantity=9520transformationID=urn:epc:id:gdti:4012345.55555.1234bizStep=http://epcis.example.com/user/vocab/bizstep/commissioningreadPointid=urn:epc:id:sgln:4012345.00001.0 +eventType=ObjectEventeventTime=2019-10-21T10:00:30.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:5200001.0111111146action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPoint=id=urn:epc:id:sgln:5200001.99901.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:5200001000008:4711type=urn:epcglobal:cbv:btt:desadvbizTransaction=urn:epcglobal:cbv:bt:5200001000008:RE1099type=urn:epcglobal:cbv:btt:invsourceList=source=urn:epc:id:pgln:5200001.00000type=urn:epcglobal:cbv:sdt:possessing_partydestinationList=destination=urn:epc:id:pgln:4000001.98765type=urn:epcglobal:cbv:sdt:possessing_partydestination=urn:epc:id:sgln:4012345.00012.0type=urn:epcglobal:cbv:sdt:location +eventType=ObjectEventeventTime=2019-10-21T11:00:30.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:5200001.0111111146action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingreadPoint=id=urn:epc:id:sgln:4012345.00012.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:5200001000008:4711type=urn:epcglobal:cbv:btt:desadvbizTransaction=urn:epcglobal:cbv:bt:5200001000008:RE1099type=urn:epcglobal:cbv:btt:invsourceList=source=urn:epc:id:pgln:4000001.00012type=urn:epcglobal:cbv:sdt:owning_partysource=urn:epc:id:pgln:4000001.00012type=urn:epcglobal:cbv:sdt:possessing_partydestinationList=destination=urn:epc:id:pgln:4012345.00000type=urn:epcglobal:cbv:sdt:owning_partydestination=urn:epc:id:pgln:4012345.00000type=urn:epcglobal:cbv:sdt:possessing_partydestination=urn:epc:id:sgln:4012345.00012.0type=urn:epcglobal:cbv:sdt:location +eventType=ObjectEventeventTime=2019-10-21T14:45:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:4012345.0111111111action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingdisposition=urn:epcglobal:cbv:disp:in_progressreadPoint=id=urn:epc:id:sgln:4012345.00024.0 +eventType=ObjectEventeventTime=2019-10-21T12:58:56.000ZeventTimeZoneOffset=+02:00quantityList=quantityElement=epcClass=urn:epc:class:lgtin:4054739.099914.20160711quantity=600uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4054739.00001.0ilmd={urn:epcglobal:cbv:mda}bestBeforeDate=2019-10-21 +eventType=AggregationEventeventTime=2019-10-21T09:58:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4047023.0111111122childEPCs=epc=urn:epc:id:sgtin:4047023.077551.107epc=urn:epc:id:sgtin:4047023.077551.109epc=urn:epc:id:sgtin:4047023.077551.97epc=urn:epc:id:sgtin:4047023.077551.98action=ADDbizStep=urn:epcglobal:cbv:bizstep:packingreadPoint=id=urn:epc:id:sgln:4047023.00012.0 +eventType=AggregationEventeventTime=2019-10-21T15:30:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0111111133childQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4054739.012345.lot2quantity=17quantityElement=epcClass=urn:epc:class:lgtin:4054739.099902.P2quantity=12uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:packingreadPoint=id=urn:epc:id:sgln:4012345.00025.0 +eventType=AggregationEventeventTime=2019-10-21T09:58:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0111111144action=DELETEbizStep=urn:epcglobal:cbv:bizstep:unpackingreadPoint=id=urn:epc:id:sgln:4012345.00025.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE1099type=urn:epcglobal:cbv:btt:inv +eventType=AggregationEventeventTime=2019-10-21T12:02:56.000ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0998811122childEPCs=epc=urn:epc:id:sscc:4012344.0998811123epc=urn:epc:id:sscc:4012344.0998811124epc=urn:epc:id:sscc:4012344.0998811125action=DELETEbizStep=urn:epcglobal:cbv:bizstep:unpackingreadPoint=id=urn:epc:id:sgln:4012345.00077.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:4711type=urn:epcglobal:cbv:btt:inv +eventType=TransactionEventeventTime=2019-10-21T06:05:00.000ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107340.1epc=urn:epc:id:sgtin:0614141.107340.2action=ADDbizStep=urn:epcglobal:cbv:bizstep:shippingreadPoint=id=urn:epc:id:sgln:4012345.00000.5bizLocation=id=urn:epc:id:sgln:4012345.00000.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE100099type=urn:epcglobal:cbv:btt:po +eventType=TransactionEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00quantityList=quantityElement=epcClass=urn:epc:class:lgtin:4012345.099988.2014-02-10quantity=2030uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:holdingreadPoint=id=urn:epc:id:sgln:4012345.00025.0bizLocation=id=urn:epc:id:sgln:4012345.00002.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE1099type=urn:epcglobal:cbv:btt:inv +eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25outputEPCList=epc=urn:epc:id:sgtin:4012345.077889.25epc=urn:epc:id:sgtin:4012345.077889.26epc=urn:epc:id:sgtin:4012345.077889.27epc=urn:epc:id:sgtin:4012345.077889.28transformationID=urn:epc:id:gdti:4012345.55555.1234bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4012345.00001.0ilmd={http://ns.example.com/epcis}batch=4711{http://ns.example.com/epcis}bestBeforeDate=2020-11-10 +eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25inputQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:0614141.077777.987quantity=30quantityElement=epcClass=urn:epc:class:lgtin:4012345.011111.4444quantity=10uom=KGMquantityElement=epcClass=urn:epc:idpat:sgtin:4012345.066666.*quantity=220outputEPCList=epc=urn:epc:id:sgtin:4012345.077889.25epc=urn:epc:id:sgtin:4012345.077889.26epc=urn:epc:id:sgtin:4012345.077889.27epc=urn:epc:id:sgtin:4012345.077889.28bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4012345.00001.0ilmd={http://ns.example.com/epcis}batch=XYZ{http://ns.example.com/epcis}bestBeforeDate=2015-11-10 +eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25outputQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4054739.099902.P20131121quantity=9520transformationID=urn:epc:id:gdti:4012345.55555.1234bizStep=http://epcis.example.com/user/vocab/bizstep/commissioningreadPoint=id=urn:epc:id:sgln:4012345.00001.0 diff --git a/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.hashes b/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.hashes index 1383dd6..9040b8d 100644 --- a/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.hashes +++ b/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.hashes @@ -1 +1 @@ -ni:///sha-256;89737847d210cfa6936a5978250fc0b739db6ad816bea243318ebcd175370c80?ver=CBV2.0 +ni:///sha-256;347e0494863281c266af55d0a998462e88089be3453976b200bf874027400acb?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.prehashes b/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.prehashes index 197621b..c233cdb 100644 --- a/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.prehashes +++ b/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.prehashes @@ -1 +1 @@ -eventType=TransformationEventeventTime=2020-01-13T23:00:00.000ZeventTimeZoneOffset=+01:00errorDeclarationdeclarationTime=2020-01-14T23:00:00.000Zreason=urn:epcglobal:cbv:er:incorrect_datainputEPCListepc=urn:epc:id:sgtin:4012345.011111.987inputQuantityListquantityElementepcClass=urn:epc:class:lgtin:4012345.022222.87545GHGHoutputEPCListepc=urn:epc:id:sgtin:4012345.033333.AGHFGoutputQuantityListquantityElementepcClass=urn:epc:idpat:sgtin:4012345.044444.*quantity=452uom=KGMbizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4012345.00000.0eventID=urn:uuid:374d95fc-9457-4a51-bd6a-0bba133845a8 +eventType=TransformationEventeventTime=2020-01-13T23:00:00.000ZeventTimeZoneOffset=+01:00errorDeclaration=declarationTime=2020-01-14T23:00:00.000Zreason=urn:epcglobal:cbv:er:incorrect_datainputEPCList=epc=urn:epc:id:sgtin:4012345.011111.987inputQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4012345.022222.87545GHGHoutputEPCList=epc=urn:epc:id:sgtin:4012345.033333.AGHFGoutputQuantityList=quantityElement=epcClass=urn:epc:idpat:sgtin:4012345.044444.*quantity=452uom=KGMbizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4012345.00000.0errorDeclaration={http://ns.example.com/epcis}vendorExtension=Test1eventID=urn:uuid:374d95fc-9457-4a51-bd6a-0bba133845a8 From 7e02ca379488240bfe79e4bcbec802e3aefa49e8 Mon Sep 17 00:00:00 2001 From: Sebastian Schmittner Date: Mon, 7 Dec 2020 15:28:45 +0100 Subject: [PATCH 4/7] no = infornt of mother elements without text --- epcis_event_hash_generator/hash_generator.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/epcis_event_hash_generator/hash_generator.py b/epcis_event_hash_generator/hash_generator.py index ecb852b..5c5e618 100644 --- a/epcis_event_hash_generator/hash_generator.py +++ b/epcis_event_hash_generator/hash_generator.py @@ -88,10 +88,12 @@ def recurse_through_children_in_order(child_list, child_order): else: text = format_if_numeric(text) + if text: + text = "=" + text logging.debug("Adding text '%s'", text) if text or grand_child_text: - list_of_values.append(child_name + "=" + text + grand_child_text) + list_of_values.append(child_name + text + grand_child_text) else: logging.debug("Empty element ignored: %s", child) @@ -130,7 +132,10 @@ def generic_child_list_to_prehash_string(children): logging.debug("Parsing remaining elements in: %s", children) for child in children: - list_of_values.append(child[0] + "=" + child[1].strip() + generic_child_list_to_prehash_string(child[2])) + text = child[1].strip() + if text: + text = "=" + text + list_of_values.append(child[0] + text + generic_child_list_to_prehash_string(child[2])) list_of_values.sort() return JOIN_BY.join(list_of_values) @@ -193,7 +198,7 @@ def compute_prehash_from_events(events): logging.debug("prehashing event:\n%s", event) try: prehash_string_list.append("eventType=" + event[0] + JOIN_BY - + recurse_through_children_in_order(event[2], PROP_ORDER)+ JOIN_BY + + recurse_through_children_in_order(event[2], PROP_ORDER) + JOIN_BY + gather_elements_not_in_order(event[2], PROP_ORDER) ) except Exception as ex: From c728afacd5e7489332f323eb25a58694f04b36f5 Mon Sep 17 00:00:00 2001 From: Sebastian Schmittner Date: Mon, 7 Dec 2020 15:48:44 +0100 Subject: [PATCH 5/7] updated test hashes --- .../ReferenceEventHashAlgorithm.hashes | 2 +- .../ReferenceEventHashAlgorithm.prehashes | 2 +- .../ReferenceEventHashAlgorithm2.hashes | 2 +- .../ReferenceEventHashAlgorithm2.prehashes | 2 +- tests/examples/SensorDataExamples.hashes | 24 ++++++++--------- tests/examples/SensorDataExamples.prehashes | 24 ++++++++--------- ...cWith2DifferentTransformationEvents.hashes | 4 +-- ...th2DifferentTransformationEvents.prehashes | 4 +-- .../epcisDocWithCustomSchemaInContext.hashes | 4 +-- ...pcisDocWithCustomSchemaInContext.prehashes | 4 +-- .../epcisDocWithDefaultSchemaInContext.hashes | 4 +-- ...cisDocWithDefaultSchemaInContext.prehashes | 4 +-- .../epcisDocWithSensorDataObjectEvent.hashes | 2 +- ...pcisDocWithSensorDataObjectEvent.prehashes | 2 +- ...DocWithShippingAndTransportingEvent.hashes | 4 +-- ...WithShippingAndTransportingEvent.prehashes | 4 +-- ...ithTransformationEventWithExtension.hashes | 2 +- ...TransformationEventWithExtension.prehashes | 2 +- ...ormationEventWithMultipleExtensions.hashes | 2 +- ...ationEventWithMultipleExtensions.prehashes | 2 +- .../epcisDocWithVariousEventTypes.hashes | 26 +++++++++---------- .../epcisDocWithVariousEventTypes.prehashes | 26 +++++++++---------- ...cWithXMLstartTagAndErrorDeclaration.hashes | 2 +- ...thXMLstartTagAndErrorDeclaration.prehashes | 2 +- 24 files changed, 78 insertions(+), 78 deletions(-) diff --git a/tests/examples/ReferenceEventHashAlgorithm.hashes b/tests/examples/ReferenceEventHashAlgorithm.hashes index 0c0005e..731d707 100644 --- a/tests/examples/ReferenceEventHashAlgorithm.hashes +++ b/tests/examples/ReferenceEventHashAlgorithm.hashes @@ -1 +1 @@ -ni:///sha-256;9635bfeb9a3f2f36ba3312b15f364a69c9bd64aeedd01495e7ec2e7dd3757d1a?ver=CBV2.0 +ni:///sha-256;dfc41ef765fee23520de7ff7aa6c35bee38700ff536c987a44208685daf63f78?ver=CBV2.0 diff --git a/tests/examples/ReferenceEventHashAlgorithm.prehashes b/tests/examples/ReferenceEventHashAlgorithm.prehashes index fbcc537..44a2fc7 100644 --- a/tests/examples/ReferenceEventHashAlgorithm.prehashes +++ b/tests/examples/ReferenceEventHashAlgorithm.prehashes @@ -1 +1 @@ -eventType=ObjectEventeventTime=2020-03-04T10:00:30.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:4012345.0000000111epc=urn:epc:id:sscc:4012345.0000000222epc=urn:epc:id:sscc:4012345.0000000333action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPoint=id=urn:epc:id:sgln:4012345.00011.987{https://ns.example.com/epcis}myField1={https://ns.example.com/epcis}mySubField1=2{https://ns.example.com/epcis}mySubField2=5{https://ns.example.com/epcis}myField2=0{https://ns.example.com/epcis}myField3={https://ns.example.com/epcis}mySubField3=1{https://ns.example.com/epcis}mySubField3=3 +eventType=ObjectEventeventTime=2020-03-04T10:00:30.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:4012345.0000000111epc=urn:epc:id:sscc:4012345.0000000222epc=urn:epc:id:sscc:4012345.0000000333action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPointid=urn:epc:id:sgln:4012345.00011.987{https://ns.example.com/epcis}myField1{https://ns.example.com/epcis}mySubField1=2{https://ns.example.com/epcis}mySubField2=5{https://ns.example.com/epcis}myField2=0{https://ns.example.com/epcis}myField3{https://ns.example.com/epcis}mySubField3=1{https://ns.example.com/epcis}mySubField3=3 diff --git a/tests/examples/ReferenceEventHashAlgorithm2.hashes b/tests/examples/ReferenceEventHashAlgorithm2.hashes index 485c45c..f225f7a 100644 --- a/tests/examples/ReferenceEventHashAlgorithm2.hashes +++ b/tests/examples/ReferenceEventHashAlgorithm2.hashes @@ -1 +1 @@ -ni:///sha-256;babf9f54c3229b3df25612a6c2b2972bd439cc55e40acec14638381098523ae6?ver=CBV2.0 +ni:///sha-256;0974aa383919495ccff808b0a57123143545ea7f5f9e9177b0c547db1a1e6d70?ver=CBV2.0 diff --git a/tests/examples/ReferenceEventHashAlgorithm2.prehashes b/tests/examples/ReferenceEventHashAlgorithm2.prehashes index 512fe0c..486a4ce 100644 --- a/tests/examples/ReferenceEventHashAlgorithm2.prehashes +++ b/tests/examples/ReferenceEventHashAlgorithm2.prehashes @@ -1 +1 @@ -eventType=ObjectEventeventTime=2020-04-01T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111sensorReport=type=gs1:Humidityvalue=12.1uom=A93sensorReport=type=gs1:Molar_concentrationchemicalSubstance=urn:epcglobal:cbv:inchikey:CZMRCDWAGMRECN-UGDNZRGBSA-Nvalue=0.18uom=C35sensorReport=type=gs1:Molar_concentrationmicroorganism=https://www.ncbi.nlm.nih.gov/taxonomy/1126011value=0.05uom=C35sensorReport=type=gs1:Temperaturevalue=26sDev=0.1uom=CEL +eventType=ObjectEventeventTime=2020-04-01T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatadeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111sensorReporttype=gs1:Humidityvalue=12.1uom=A93sensorReporttype=gs1:Molar_concentrationchemicalSubstance=urn:epcglobal:cbv:inchikey:CZMRCDWAGMRECN-UGDNZRGBSA-Nvalue=0.18uom=C35sensorReporttype=gs1:Molar_concentrationmicroorganism=https://www.ncbi.nlm.nih.gov/taxonomy/1126011value=0.05uom=C35sensorReporttype=gs1:Temperaturevalue=26sDev=0.1uom=CEL diff --git a/tests/examples/SensorDataExamples.hashes b/tests/examples/SensorDataExamples.hashes index fef4837..5262b2e 100644 --- a/tests/examples/SensorDataExamples.hashes +++ b/tests/examples/SensorDataExamples.hashes @@ -1,12 +1,12 @@ -ni:///sha-256;84b0ae1153dcbf53836054f0c38376b5ca23e73218b53512e0dbce142002719e?ver=CBV2.0 -ni:///sha-256;6fa4700d03ed058fe7e996bcd0c6f54b3c86061aa863600fed0f51c611e8be60?ver=CBV2.0 -ni:///sha-256;5a03f995b3ef2380dc2aad035234f3a2cb56dee86bd8e93b2189123876cfef62?ver=CBV2.0 -ni:///sha-256;593c768a902b65ddeab2f60766fe383e8670ba96bef5f626bd6bc633b9b099c0?ver=CBV2.0 -ni:///sha-256;155795d13b538f9320b19d46b24e3d31dd58a8347bf3988d211499cad851d277?ver=CBV2.0 -ni:///sha-256;fae7eb20fdf591122fb4f16d03ac848396c90908f682daea07d2931b00a983ba?ver=CBV2.0 -ni:///sha-256;961836388c529bea098cf63ffc93cbdabe5a6d9d12092bcd3343b5834fb9027c?ver=CBV2.0 -ni:///sha-256;b3e71ed587051f01a40b48c17712e555307968bce8e330a881ea7cf091ab9179?ver=CBV2.0 -ni:///sha-256;f743c0463d897032b9d653b385ade3c39bc10b491611fc57605a91840a37fe07?ver=CBV2.0 -ni:///sha-256;5921370f6caed506bdc2edd6979e73063d60889d1e5cf6ce9c7035f21ca4a0a5?ver=CBV2.0 -ni:///sha-256;4095090821d58d1b68d3a1ebfd817690017c0d43b61898b68fb51656f10f3ced?ver=CBV2.0 -ni:///sha-256;3aa6f37d06618fb4afd69f156b2aac303ca30f686020568d0c9ef427f0bdec17?ver=CBV2.0 +ni:///sha-256;8bd609d4bbedfd7a2af38c6fbc222d66a83988859eee372ac50f3079795fe4b8?ver=CBV2.0 +ni:///sha-256;47818322cd49362b5ef8f0747f726ee21d02b2b381bf28f15522e09884a29e35?ver=CBV2.0 +ni:///sha-256;d6acbd943a9dd30b3f10b5e45fa64a0b21b1c91954cf24ab45d6d914e9e40c75?ver=CBV2.0 +ni:///sha-256;91c7021c96b5a5df2a174e487640d3e0b5ab1f3cf2ed2f518b2f662e1fd2c4bf?ver=CBV2.0 +ni:///sha-256;28b6d85591e631e9d7bd64e3dbe40d3e03384b29844e1648d130f1b390f08bbd?ver=CBV2.0 +ni:///sha-256;6a86564b861d2ce1d2d7273bec9363a311a7f727edaa828003965f10d384200b?ver=CBV2.0 +ni:///sha-256;63e2d119c69c91c653027895db05492bac2211dacee0d7f9239146fc566d2192?ver=CBV2.0 +ni:///sha-256;a84a793d7a9f823332f41118eb973caf86e673048e532a2b850616547bbbb4cf?ver=CBV2.0 +ni:///sha-256;546f0b817f058290745fbab2b28d6ff142b06207df8bfcc13b0bf72c609e84b1?ver=CBV2.0 +ni:///sha-256;1f560c5829e959cab2473ddc734ea90a088eb5202e3c611a3108a04897932f0a?ver=CBV2.0 +ni:///sha-256;8702ac80df8ac48d19cc0c8d19399249fc7037f8b752acb97baf7148960d2a17?ver=CBV2.0 +ni:///sha-256;6d13f864b06d22b4cd0a97251a21ae32d309ccb63457652ce946f5436a25a61b?ver=CBV2.0 diff --git a/tests/examples/SensorDataExamples.prehashes b/tests/examples/SensorDataExamples.prehashes index 776b401..e16ac80 100644 --- a/tests/examples/SensorDataExamples.prehashes +++ b/tests/examples/SensorDataExamples.prehashes @@ -1,12 +1,12 @@ -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=time=2019-04-02T14:05:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.1uom=A93sensorReport=type=gs1:Illuminancevalue=800uom=LUXsensorReport=type=gs1:Speedvalue=160uom=KMHsensorReport=type=gs1:Temperaturevalue=26uom=CELsensorElement=sensorMetaData=time=2019-04-02T14:35:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.2uom=A93sensorReport=type=gs1:Illuminancevalue=801uom=LUXsensorReport=type=gs1:Speedvalue=161uom=KMHsensorReport=type=gs1:Temperaturevalue=26.1uom=CELsensorElement=sensorMetaData=time=2019-04-02T14:55:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.2uom=A93sensorReport=type=gs1:Illuminancevalue=802uom=LUXsensorReport=type=gs1:Speedvalue=162uom=KMHsensorReport=type=gs1:Temperaturevalue=26.2uom=CEL -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-02T12:55:01.000ZendTime=2019-04-02T13:55:00.000ZdeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999bizRules=https://example.com/gdti/4012345000054987sensorReport=type=gs1:HumidityminValue=12.1maxValue=12.2uom=A93sensorReport=type=gs1:IlluminanceminValue=800maxValue=802uom=LUXsensorReport=type=gs1:SpeedminValue=160maxValue=162uom=KMHsensorReport=type=gs1:TemperatureminValue=26maxValue=26.2meanValue=26.1sDev=0.1uom=CEL -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReport=type=gs1:HumidityminValue=69.2maxValue=72.5uom=A93sensorReport=type=gs1:TemperatureminValue=12.4maxValue=13.8uom=CEL -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00quantityList=quantityElement=epcClass=urn:epc:class:lgtin:4023333.002000.2019-10-07quantity=150uom=KGMaction=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=time=2019-04-02T14:55:00.000+01:00sensorReport=type=gs1:HumiditydeviceID=urn:epc:id:giai:4000001.222deviceMetaData=https://id.gs1.org/giai/4000001222rawData=https://example.org/giai/401234599999value=12.1uom=A93sensorReport=type=gs1:IlluminancedeviceID=urn:epc:id:giai:4000001.444deviceMetaData=https://id.gs1.org/giai/4000001444rawData=https://example.org/giai/401234599999value=800uom=LUXsensorReport=type=gs1:SpeeddeviceID=urn:epc:id:giai:4000001.333deviceMetaData=https://id.gs1.org/giai/4000001333rawData=https://example.org/giai/401234599999value=160uom=KMHsensorReport=type=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999value=26uom=CEL -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111sensorReport=type=gs1:Temperaturevalue=26.1uom=CELsensorReport=type=gs1:Temperaturevalue=26.2uom=CELsensorReport=type=gs1:Temperaturevalue=26.3uom=CELsensorReport=type=gs1:Temperaturevalue=26.4uom=CELsensorReport=type=gs1:Temperaturevalue=26.5uom=CELsensorReport=type=gs1:Temperaturevalue=26uom=CELsensorElementList=sensorElement=sensorReport=time=2019-04-02T14:05:00.000+01:00sensorReport=time=2019-04-02T14:15:00.000+01:00sensorReport=time=2019-04-02T14:25:00.000+01:00sensorReport=time=2019-04-02T14:35:00.000+01:00sensorReport=time=2019-04-02T14:45:00.000+01:00sensorReport=time=2019-04-02T14:55:00.000+01:00 -eventType=ObjectEventeventTime=2019-10-07T14:00:00.000ZeventTimeZoneOffset=+01:00action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReport=type=example:someSensorPropertystringValue=someSensorOutputsensorReport=type=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELsensorElementList=sensorElement=sensorMetaData={https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport={https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData={https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987 -eventType=ObjectEventeventTime=2019-10-07T15:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=time=2019-07-19T14:00:00.000+01:00sensorReport=type=example:GhideviceID=urn:epc:id:giai:4000001.114stringValue=SomeStringsensorReport=type=example:JkldeviceID=urn:epc:id:giai:4000001.115hexBinaryValue=f0f0f0sensorReport=type=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111value=26uom=CELsensorReport=type=rail:AbcdeviceID=urn:epc:id:giai:4000001.112stringValue=111100001111000003641344sensorReport=type=rail:DefdeviceID=urn:epc:id:giai:4000001.113booleanValue=truesensorReport=type=rail:MnodeviceID=urn:epc:id:giai:4000001.116uriValue=https://example.org/rail/someSectorSpecificValue -eventType=AggregationEventeventTime=2019-10-07T14:30:00.000ZeventTimeZoneOffset=+01:00parentID=urn:epc:id:sscc:4012345.0111111111childQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4012345.011111.1234quantity=52uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:packingdisposition=urn:epcglobal:cbv:disp:in_progressreadPoint=id=urn:epc:id:sgln:4012345.00025.0sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReport=type=example:someSensorPropertystringValue=someSensorOutputsensorReport=type=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELsensorElement=sensorMetaData=time=2019-07-19T14:00:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999dataProcessingMethod=https://example.com/gdti/4012345000054987bizRules=https://example.org/gdti/4012345000054987sensorReport=type=gs1:Humidityvalue=12.1uom=A93sensorReport=type=gs1:Molar_concentrationchemicalSubstance=https://identifiers.org/inchikey:CZMRCDWAGMRECN-UGDNZRGBSA-Nvalue=0.18uom=C35sensorReport=type=gs1:Molar_concentrationmicroorganism=https://www.ncbi.nlm.nih.gov/taxonomy/1126011value=0.05uom=C35sensorElement=sensorReport=type=example:someSensorPropertystringValue=someSensorOutputsensorReport=type=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999dataProcessingMethod=https://example.com/gdti/4012345000054987uom=CELsensorElementList=sensorElement=sensorMetaData={https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport={https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData={https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987sensorElement=sensorReport=bizRules=https://example.org/gdti/4012345000054987time=2019-07-19T14:00:00.000+01:00 -eventType=ObjectEventeventTime=2020-05-07T15:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:sensor_reportingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorReport=type=gs1:AlarmConditionbooleanValue=truesensorReport=type=gs1:ErrorConditionuriValue=https://example.com/ErrorCode-A827 -eventType=ObjectEventeventTime=2020-05-08T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.022222.1234action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:sensor_reportingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorReport=type=gs1:Speedvalue=0uom=MTSsensorReport=type=gs1:Speedvalue=12.8uom=MTSsensorReport=type=gs1:Speedvalue=4.5uom=MTSsensorElementList=sensorElement=sensorReport=component=example:xsensorReport=component=example:ysensorReport=component=example:z -eventType=TransactionEventeventTime=2020-07-03T06:05:00.000ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107340.1epc=urn:epc:id:sgtin:0614141.107340.2action=ADDbizStep=urn:epcglobal:cbv:bizstep:inspectingdisposition=urn:epcglobal:cbv:disp:needs_replacementreadPoint=id=urn:epc:id:sgln:4012345.00000.5bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE100099type=urn:epcglobal:cbv:btt:posensorElementList=sensorElement=sensorReport=type=gs1:EffectiveDoseRatevalue=0.005uom=P71 -eventType=TransformationEventeventTime=2020-09-29T12:00:00.000ZeventTimeZoneOffset=+02:00errorDeclaration=declarationTime=2020-09-29T13:00:00.000ZinputQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4023333.055555.ABC123quantity=25uom=KGMoutputEPCList=epc=urn:epc:id:sgtin:4012345.012345.987epc=urn:epc:id:sgtin:4012345.012345.988bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4023333.00000.0bizLocation=id=urn:epc:id:sgln:4023333.00001.12sensorElementList=sensorElement=sensorMetaData=startTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReport=type=example:someSensorPropertystringValue=someSensorOutputsensorReport=type=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELbizLocation={https://ns.example.com/epcis}gs1ES=(414)4023333000017 (254)12errorDeclaration={https://ns.example.com/epcis}field={https://ns.example.com/epcis}furtherData=abcd1234{https://ns.example.com/epcis}issuer=Employee 123{https://ns.example3.com/epcis}errorCodes={https://ns.example3.com/epcis}value1=34{https://ns.example3.com/epcis}value44=66ilmd={https://ns.example.com/epcis}grading=A{https://ns.example2.com/epcis}userMasterData={https://ns.example2.com/epcis}sizeCode=B-2{urn:epcglobal:cbv:mda}lotNumber=LOTABCreadPoint={https://ns.example.com/epcis}gs1ES=(414)4023333000000sensorElementList=sensorElement=sensorMetaData={https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport={https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData={https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987{https://ns.example.com/epcis}someUserField=abc123{https://ns.example.com/epcis}internalData={https://ns.example.com/epcis}machine=urn:epc:id:giai:4012345.ABC{https://ns.example.com/epcis}procedure=A-1{https://ns.example2.com/epcis}furtherData={https://ns.example2.com/epcis}assemblyLine=2{https://ns.example2.com/epcis}workingShift=1{https://ns.example4.com/epcis}otherThings=some text +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatatime=2019-04-02T14:05:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.1uom=A93sensorReporttype=gs1:Illuminancevalue=800uom=LUXsensorReporttype=gs1:Speedvalue=160uom=KMHsensorReporttype=gs1:Temperaturevalue=26uom=CELsensorElementsensorMetaDatatime=2019-04-02T14:35:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.2uom=A93sensorReporttype=gs1:Illuminancevalue=801uom=LUXsensorReporttype=gs1:Speedvalue=161uom=KMHsensorReporttype=gs1:Temperaturevalue=26.1uom=CELsensorElementsensorMetaDatatime=2019-04-02T14:55:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.2uom=A93sensorReporttype=gs1:Illuminancevalue=802uom=LUXsensorReporttype=gs1:Speedvalue=162uom=KMHsensorReporttype=gs1:Temperaturevalue=26.2uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatastartTime=2019-04-02T12:55:01.000ZendTime=2019-04-02T13:55:00.000ZdeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999bizRules=https://example.com/gdti/4012345000054987sensorReporttype=gs1:HumidityminValue=12.1maxValue=12.2uom=A93sensorReporttype=gs1:IlluminanceminValue=800maxValue=802uom=LUXsensorReporttype=gs1:SpeedminValue=160maxValue=162uom=KMHsensorReporttype=gs1:TemperatureminValue=26maxValue=26.2meanValue=26.1sDev=0.1uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatastartTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReporttype=gs1:HumidityminValue=69.2maxValue=72.5uom=A93sensorReporttype=gs1:TemperatureminValue=12.4maxValue=13.8uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00quantityListquantityElementepcClass=urn:epc:class:lgtin:4023333.002000.2019-10-07quantity=150uom=KGMaction=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatatime=2019-04-02T14:55:00.000+01:00sensorReporttype=gs1:HumiditydeviceID=urn:epc:id:giai:4000001.222deviceMetaData=https://id.gs1.org/giai/4000001222rawData=https://example.org/giai/401234599999value=12.1uom=A93sensorReporttype=gs1:IlluminancedeviceID=urn:epc:id:giai:4000001.444deviceMetaData=https://id.gs1.org/giai/4000001444rawData=https://example.org/giai/401234599999value=800uom=LUXsensorReporttype=gs1:SpeeddeviceID=urn:epc:id:giai:4000001.333deviceMetaData=https://id.gs1.org/giai/4000001333rawData=https://example.org/giai/401234599999value=160uom=KMHsensorReporttype=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999value=26uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatadeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111sensorReporttype=gs1:Temperaturevalue=26.1uom=CELsensorReporttype=gs1:Temperaturevalue=26.2uom=CELsensorReporttype=gs1:Temperaturevalue=26.3uom=CELsensorReporttype=gs1:Temperaturevalue=26.4uom=CELsensorReporttype=gs1:Temperaturevalue=26.5uom=CELsensorReporttype=gs1:Temperaturevalue=26uom=CELsensorElementListsensorElementsensorReporttime=2019-04-02T14:05:00.000+01:00sensorReporttime=2019-04-02T14:15:00.000+01:00sensorReporttime=2019-04-02T14:25:00.000+01:00sensorReporttime=2019-04-02T14:35:00.000+01:00sensorReporttime=2019-04-02T14:45:00.000+01:00sensorReporttime=2019-04-02T14:55:00.000+01:00 +eventType=ObjectEventeventTime=2019-10-07T14:00:00.000ZeventTimeZoneOffset=+01:00action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatastartTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReporttype=example:someSensorPropertystringValue=someSensorOutputsensorReporttype=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELsensorElementListsensorElementsensorMetaData{https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport{https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData{https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987 +eventType=ObjectEventeventTime=2019-10-07T15:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatatime=2019-07-19T14:00:00.000+01:00sensorReporttype=example:GhideviceID=urn:epc:id:giai:4000001.114stringValue=SomeStringsensorReporttype=example:JkldeviceID=urn:epc:id:giai:4000001.115hexBinaryValue=f0f0f0sensorReporttype=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111value=26uom=CELsensorReporttype=rail:AbcdeviceID=urn:epc:id:giai:4000001.112stringValue=111100001111000003641344sensorReporttype=rail:DefdeviceID=urn:epc:id:giai:4000001.113booleanValue=truesensorReporttype=rail:MnodeviceID=urn:epc:id:giai:4000001.116uriValue=https://example.org/rail/someSectorSpecificValue +eventType=AggregationEventeventTime=2019-10-07T14:30:00.000ZeventTimeZoneOffset=+01:00parentID=urn:epc:id:sscc:4012345.0111111111childQuantityListquantityElementepcClass=urn:epc:class:lgtin:4012345.011111.1234quantity=52uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:packingdisposition=urn:epcglobal:cbv:disp:in_progressreadPointid=urn:epc:id:sgln:4012345.00025.0sensorElementListsensorElementsensorMetaDatastartTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReporttype=example:someSensorPropertystringValue=someSensorOutputsensorReporttype=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELsensorElementsensorMetaDatatime=2019-07-19T14:00:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999dataProcessingMethod=https://example.com/gdti/4012345000054987bizRules=https://example.org/gdti/4012345000054987sensorReporttype=gs1:Humidityvalue=12.1uom=A93sensorReporttype=gs1:Molar_concentrationchemicalSubstance=https://identifiers.org/inchikey:CZMRCDWAGMRECN-UGDNZRGBSA-Nvalue=0.18uom=C35sensorReporttype=gs1:Molar_concentrationmicroorganism=https://www.ncbi.nlm.nih.gov/taxonomy/1126011value=0.05uom=C35sensorElementsensorReporttype=example:someSensorPropertystringValue=someSensorOutputsensorReporttype=gs1:TemperaturedeviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999dataProcessingMethod=https://example.com/gdti/4012345000054987uom=CELsensorElementListsensorElementsensorMetaData{https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport{https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData{https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987sensorElementsensorReportbizRules=https://example.org/gdti/4012345000054987time=2019-07-19T14:00:00.000+01:00 +eventType=ObjectEventeventTime=2020-05-07T15:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:sensor_reportingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorReporttype=gs1:AlarmConditionbooleanValue=truesensorReporttype=gs1:ErrorConditionuriValue=https://example.com/ErrorCode-A827 +eventType=ObjectEventeventTime=2020-05-08T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.022222.1234action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:sensor_reportingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorReporttype=gs1:Speedvalue=0uom=MTSsensorReporttype=gs1:Speedvalue=12.8uom=MTSsensorReporttype=gs1:Speedvalue=4.5uom=MTSsensorElementListsensorElementsensorReportcomponent=example:xsensorReportcomponent=example:ysensorReportcomponent=example:z +eventType=TransactionEventeventTime=2020-07-03T06:05:00.000ZeventTimeZoneOffset=-06:00epcListepc=urn:epc:id:sgtin:0614141.107340.1epc=urn:epc:id:sgtin:0614141.107340.2action=ADDbizStep=urn:epcglobal:cbv:bizstep:inspectingdisposition=urn:epcglobal:cbv:disp:needs_replacementreadPointid=urn:epc:id:sgln:4012345.00000.5bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE100099type=urn:epcglobal:cbv:btt:posensorElementListsensorElementsensorReporttype=gs1:EffectiveDoseRatevalue=0.005uom=P71 +eventType=TransformationEventeventTime=2020-09-29T12:00:00.000ZeventTimeZoneOffset=+02:00errorDeclarationdeclarationTime=2020-09-29T13:00:00.000ZinputQuantityListquantityElementepcClass=urn:epc:class:lgtin:4023333.055555.ABC123quantity=25uom=KGMoutputEPCListepc=urn:epc:id:sgtin:4012345.012345.987epc=urn:epc:id:sgtin:4012345.012345.988bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4023333.00000.0bizLocationid=urn:epc:id:sgln:4023333.00001.12sensorElementListsensorElementsensorMetaDatastartTime=2019-04-01T14:00:00.000ZendTime=2019-04-02T13:59:59.999ZsensorReporttype=example:someSensorPropertystringValue=someSensorOutputsensorReporttype=gs1:TemperatureminValue=12.4maxValue=13.8meanValue=13.2sDev=0.41percRank=50percValue=12.7uom=CELbizLocation{https://ns.example.com/epcis}gs1ES=(414)4023333000017 (254)12errorDeclaration{https://ns.example.com/epcis}field{https://ns.example.com/epcis}furtherData=abcd1234{https://ns.example.com/epcis}issuer=Employee 123{https://ns.example3.com/epcis}errorCodes{https://ns.example3.com/epcis}value1=34{https://ns.example3.com/epcis}value44=66ilmd{https://ns.example.com/epcis}grading=A{https://ns.example2.com/epcis}userMasterData{https://ns.example2.com/epcis}sizeCode=B-2{urn:epcglobal:cbv:mda}lotNumber=LOTABCreadPoint{https://ns.example.com/epcis}gs1ES=(414)4023333000000sensorElementListsensorElementsensorMetaData{https://ns.example.com/epcis}someFurtherMetaData=someTextsensorReport{https://ns.example.com/epcis}cv=123{https://ns.example.com/epcis}furtherSensorData{https://ns.example.com/epcis}measure1=123.5{https://ns.example.com/epcis}measure2=0.987{https://ns.example.com/epcis}someUserField=abc123{https://ns.example.com/epcis}internalData{https://ns.example.com/epcis}machine=urn:epc:id:giai:4012345.ABC{https://ns.example.com/epcis}procedure=A-1{https://ns.example2.com/epcis}furtherData{https://ns.example2.com/epcis}assemblyLine=2{https://ns.example2.com/epcis}workingShift=1{https://ns.example4.com/epcis}otherThings=some text diff --git a/tests/examples/epcisDocWith2DifferentTransformationEvents.hashes b/tests/examples/epcisDocWith2DifferentTransformationEvents.hashes index ee5d8a6..cc360b1 100644 --- a/tests/examples/epcisDocWith2DifferentTransformationEvents.hashes +++ b/tests/examples/epcisDocWith2DifferentTransformationEvents.hashes @@ -1,2 +1,2 @@ -ni:///sha-256;7a34ce2874adff757195665f75756b374a11ad12bb57ee0ab88f6c49f6ab6fcf?ver=CBV2.0 -ni:///sha-256;321790f9441ce746c7418aff54f1ebdb6578e609fee26b5107de90b282eeb0a8?ver=CBV2.0 +ni:///sha-256;a08d084721d1b64cbf67d089c084dfffc20b82885c2d291943e926f7115cf01d?ver=CBV2.0 +ni:///sha-256;55b957d87a6d88c7b298bcfb54ccf7a947c1f12a8f0feeb5fb5e36d2c2bde2e7?ver=CBV2.0 diff --git a/tests/examples/epcisDocWith2DifferentTransformationEvents.prehashes b/tests/examples/epcisDocWith2DifferentTransformationEvents.prehashes index 9e6a2ed..0a92cd9 100644 --- a/tests/examples/epcisDocWith2DifferentTransformationEvents.prehashes +++ b/tests/examples/epcisDocWith2DifferentTransformationEvents.prehashes @@ -1,2 +1,2 @@ -eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCList=epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged -eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4047111.012345.1111outputEPCList=epc=urn:epc:id:sgtin:4047111.012345.2222epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged +eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCListepc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged +eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4047111.012345.1111outputEPCListepc=urn:epc:id:sgtin:4047111.012345.2222epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged diff --git a/tests/examples/epcisDocWithCustomSchemaInContext.hashes b/tests/examples/epcisDocWithCustomSchemaInContext.hashes index 46c6042..1616fce 100644 --- a/tests/examples/epcisDocWithCustomSchemaInContext.hashes +++ b/tests/examples/epcisDocWithCustomSchemaInContext.hashes @@ -1,2 +1,2 @@ -ni:///sha-256;2426270506e9efb2010c65a8ecee8a3ba2727a38c1e5be23ff109af5c851e546?ver=CBV2.0 -ni:///sha-256;581c4e2b36e4c74dd21e24c2745f8dea23e196d35fd4e27cd5cb9f3a8ae35e71?ver=CBV2.0 +ni:///sha-256;e480d6a5c8a1bd1b6ab1aff7c73d0f4a8db779728a7bed1197f93c2b1c82a200?ver=CBV2.0 +ni:///sha-256;7754c45e4b75496294f69013954e6a9923ce4f249cdcbc2665b3dc8eb2982dfd?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithCustomSchemaInContext.prehashes b/tests/examples/epcisDocWithCustomSchemaInContext.prehashes index a806e95..b35a8b2 100644 --- a/tests/examples/epcisDocWithCustomSchemaInContext.prehashes +++ b/tests/examples/epcisDocWithCustomSchemaInContext.prehashes @@ -1,2 +1,2 @@ -eventType=ObjectEventeventTime=2005-04-04T02:33:31.116ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107346.2017epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:shippingdisposition=urn:epcglobal:cbv:disp:in_transitreadPoint=id=urn:epc:id:sgln:0614141.07346.1234bizTransactionList=bizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pohttp://ns.example.com/epcis/myField=myValueid=_:event1 -eventType=ObjectEventeventTime=2005-04-05T02:33:31.116ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingdisposition=urn:epcglobal:cbv:disp:in_progressreadPoint=id=urn:epc:id:sgln:0012345.11111.400bizLocation=id=urn:epc:id:sgln:0012345.11111.0bizTransactionList=bizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pobizTransaction=urn:epcglobal:cbv:bt:0614141073467:1152type=urn:epcglobal:cbv:btt:desadvhttp://ns.example.com/epcis/myField2=myValue2id=_:event2 +eventType=ObjectEventeventTime=2005-04-04T02:33:31.116ZeventTimeZoneOffset=-06:00epcListepc=urn:epc:id:sgtin:0614141.107346.2017epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:shippingdisposition=urn:epcglobal:cbv:disp:in_transitreadPointid=urn:epc:id:sgln:0614141.07346.1234bizTransactionListbizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pohttp://ns.example.com/epcis/myField=myValueid=_:event1 +eventType=ObjectEventeventTime=2005-04-05T02:33:31.116ZeventTimeZoneOffset=-06:00epcListepc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingdisposition=urn:epcglobal:cbv:disp:in_progressreadPointid=urn:epc:id:sgln:0012345.11111.400bizLocationid=urn:epc:id:sgln:0012345.11111.0bizTransactionListbizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pobizTransaction=urn:epcglobal:cbv:bt:0614141073467:1152type=urn:epcglobal:cbv:btt:desadvhttp://ns.example.com/epcis/myField2=myValue2id=_:event2 diff --git a/tests/examples/epcisDocWithDefaultSchemaInContext.hashes b/tests/examples/epcisDocWithDefaultSchemaInContext.hashes index 46644a3..15b7dfa 100644 --- a/tests/examples/epcisDocWithDefaultSchemaInContext.hashes +++ b/tests/examples/epcisDocWithDefaultSchemaInContext.hashes @@ -1,2 +1,2 @@ -ni:///sha-256;e7bf57bb771499db0666d47a9a9ecf041f513a06df1ee912c7eb79d7d9f99a0b?ver=CBV2.0 -ni:///sha-256;b754182b801e94e5e85eff3046d680e889650138433ce6b5826e82729b4f4d5b?ver=CBV2.0 +ni:///sha-256;1266630962013866d8a95495ef1f7378c01f1bb52f4b384a6bf7778316c0c461?ver=CBV2.0 +ni:///sha-256;a51af0c3dbe3041b7349a34c84eb390bcc014b70c118dacb91bb38d25c279fa7?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithDefaultSchemaInContext.prehashes b/tests/examples/epcisDocWithDefaultSchemaInContext.prehashes index d39e7a5..bb3c392 100644 --- a/tests/examples/epcisDocWithDefaultSchemaInContext.prehashes +++ b/tests/examples/epcisDocWithDefaultSchemaInContext.prehashes @@ -1,2 +1,2 @@ -eventType=ObjectEventeventTime=2005-04-04T02:33:31.116ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107346.2017epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:shippingdisposition=urn:epcglobal:cbv:disp:in_transitreadPoint=id=urn:epc:id:sgln:0614141.07346.1234bizTransactionList=bizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:poid=_:event1 -eventType=ObjectEventeventTime=2005-04-05T02:33:31.116ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingdisposition=urn:epcglobal:cbv:disp:in_progressreadPoint=id=urn:epc:id:sgln:0012345.11111.400bizLocation=id=urn:epc:id:sgln:0012345.11111.0bizTransactionList=bizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pobizTransaction=urn:epcglobal:cbv:bt:0614141073467:1152type=urn:epcglobal:cbv:btt:desadvid=_:event2 +eventType=ObjectEventeventTime=2005-04-04T02:33:31.116ZeventTimeZoneOffset=-06:00epcListepc=urn:epc:id:sgtin:0614141.107346.2017epc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:shippingdisposition=urn:epcglobal:cbv:disp:in_transitreadPointid=urn:epc:id:sgln:0614141.07346.1234bizTransactionListbizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:poid=_:event1 +eventType=ObjectEventeventTime=2005-04-05T02:33:31.116ZeventTimeZoneOffset=-06:00epcListepc=urn:epc:id:sgtin:0614141.107346.2018action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingdisposition=urn:epcglobal:cbv:disp:in_progressreadPointid=urn:epc:id:sgln:0012345.11111.400bizLocationid=urn:epc:id:sgln:0012345.11111.0bizTransactionListbizTransaction=http://transaction.acme.com/po/12345678type=urn:epcglobal:cbv:btt:pobizTransaction=urn:epcglobal:cbv:bt:0614141073467:1152type=urn:epcglobal:cbv:btt:desadvid=_:event2 diff --git a/tests/examples/epcisDocWithSensorDataObjectEvent.hashes b/tests/examples/epcisDocWithSensorDataObjectEvent.hashes index 2fe825d..c759c83 100644 --- a/tests/examples/epcisDocWithSensorDataObjectEvent.hashes +++ b/tests/examples/epcisDocWithSensorDataObjectEvent.hashes @@ -1 +1 @@ -ni:///sha-256;84b0ae1153dcbf53836054f0c38376b5ca23e73218b53512e0dbce142002719e?ver=CBV2.0 +ni:///sha-256;8bd609d4bbedfd7a2af38c6fbc222d66a83988859eee372ac50f3079795fe4b8?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithSensorDataObjectEvent.prehashes b/tests/examples/epcisDocWithSensorDataObjectEvent.prehashes index 9c6194b..82b8446 100644 --- a/tests/examples/epcisDocWithSensorDataObjectEvent.prehashes +++ b/tests/examples/epcisDocWithSensorDataObjectEvent.prehashes @@ -1 +1 @@ -eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPoint=id=urn:epc:id:sgln:4012345.00005.0sensorElementList=sensorElement=sensorMetaData=time=2019-04-02T14:05:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.1uom=A93sensorReport=type=gs1:Illuminancevalue=800uom=LUXsensorReport=type=gs1:Speedvalue=160uom=KMHsensorReport=type=gs1:Temperaturevalue=26uom=CELsensorElement=sensorMetaData=time=2019-04-02T14:35:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.2uom=A93sensorReport=type=gs1:Illuminancevalue=801uom=LUXsensorReport=type=gs1:Speedvalue=161uom=KMHsensorReport=type=gs1:Temperaturevalue=26.1uom=CELsensorElement=sensorMetaData=time=2019-04-02T14:55:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReport=type=gs1:Humidityvalue=12.2uom=A93sensorReport=type=gs1:Illuminancevalue=802uom=LUXsensorReport=type=gs1:Speedvalue=162uom=KMHsensorReport=type=gs1:Temperaturevalue=26.2uom=CEL +eventType=ObjectEventeventTime=2019-04-02T14:00:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sgtin:4012345.011111.9876action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingreadPointid=urn:epc:id:sgln:4012345.00005.0sensorElementListsensorElementsensorMetaDatatime=2019-04-02T14:05:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.1uom=A93sensorReporttype=gs1:Illuminancevalue=800uom=LUXsensorReporttype=gs1:Speedvalue=160uom=KMHsensorReporttype=gs1:Temperaturevalue=26uom=CELsensorElementsensorMetaDatatime=2019-04-02T14:35:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.2uom=A93sensorReporttype=gs1:Illuminancevalue=801uom=LUXsensorReporttype=gs1:Speedvalue=161uom=KMHsensorReporttype=gs1:Temperaturevalue=26.1uom=CELsensorElementsensorMetaDatatime=2019-04-02T14:55:00.000+01:00deviceID=urn:epc:id:giai:4000001.111deviceMetaData=https://id.gs1.org/giai/4000001111rawData=https://example.org/giai/401234599999sensorReporttype=gs1:Humidityvalue=12.2uom=A93sensorReporttype=gs1:Illuminancevalue=802uom=LUXsensorReporttype=gs1:Speedvalue=162uom=KMHsensorReporttype=gs1:Temperaturevalue=26.2uom=CEL diff --git a/tests/examples/epcisDocWithShippingAndTransportingEvent.hashes b/tests/examples/epcisDocWithShippingAndTransportingEvent.hashes index a9159ff..6438998 100644 --- a/tests/examples/epcisDocWithShippingAndTransportingEvent.hashes +++ b/tests/examples/epcisDocWithShippingAndTransportingEvent.hashes @@ -1,2 +1,2 @@ -ni:///sha-256;35ade9553f6060db3fa7b4b732187ef99afa17594ae966ded658e5b5db9facdc?ver=CBV2.0 -ni:///sha-256;577e4256c47cc467180b0600c70cfd54c8c88ee44bd808bb514f33ff694938c4?ver=CBV2.0 +ni:///sha-256;60723f4845836da8ecc473e7e5250c1087226fc8c870d189956f37fb8b1b8592?ver=CBV2.0 +ni:///sha-256;74e1f8e9334de002167ccefe8b2bb0ceaeea826264ac6b486188d3d41e48026a?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithShippingAndTransportingEvent.prehashes b/tests/examples/epcisDocWithShippingAndTransportingEvent.prehashes index a6f8522..349fb5c 100644 --- a/tests/examples/epcisDocWithShippingAndTransportingEvent.prehashes +++ b/tests/examples/epcisDocWithShippingAndTransportingEvent.prehashes @@ -1,2 +1,2 @@ -eventType=ObjectEventeventTime=2020-02-20T11:50:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:4012345.1112223334action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPoint=id=urn:epc:id:sgln:4012345.00022.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345000009:ASN1099type=urn:epcglobal:cbv:btt:desadvsourceList=source=urn:epc:id:sgln:4012345.00000.0type=urn:epcglobal:cbv:sdt:possessing_partydestinationList=destination=urn:epc:id:sgln:4023333.00000.0type=urn:epcglobal:cbv:sdt:possessing_party -eventType=ObjectEventeventTime=2020-02-20T15:50:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:4012345.1112223334action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:transportingreadPoint=id=geo:47.506694,11.104301 +eventType=ObjectEventeventTime=2020-02-20T11:50:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:4012345.1112223334action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPointid=urn:epc:id:sgln:4012345.00022.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345000009:ASN1099type=urn:epcglobal:cbv:btt:desadvsourceListsource=urn:epc:id:sgln:4012345.00000.0type=urn:epcglobal:cbv:sdt:possessing_partydestinationListdestination=urn:epc:id:sgln:4023333.00000.0type=urn:epcglobal:cbv:sdt:possessing_party +eventType=ObjectEventeventTime=2020-02-20T15:50:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:4012345.1112223334action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:transportingreadPointid=geo:47.506694,11.104301 diff --git a/tests/examples/epcisDocWithTransformationEventWithExtension.hashes b/tests/examples/epcisDocWithTransformationEventWithExtension.hashes index 1b5eb74..72a77cf 100644 --- a/tests/examples/epcisDocWithTransformationEventWithExtension.hashes +++ b/tests/examples/epcisDocWithTransformationEventWithExtension.hashes @@ -1 +1 @@ -ni:///sha-256;21ecc1f2c9309760a30a36f36512855f1392d31796da6d4cd0680a92fc22b0fc?ver=CBV2.0 +ni:///sha-256;e35bdd723ce077e994b88851f089d6f518475141e66eea5d35eeb741b521c086?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithTransformationEventWithExtension.prehashes b/tests/examples/epcisDocWithTransformationEventWithExtension.prehashes index d65ab4a..5547d5d 100644 --- a/tests/examples/epcisDocWithTransformationEventWithExtension.prehashes +++ b/tests/examples/epcisDocWithTransformationEventWithExtension.prehashes @@ -1 +1 @@ -eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCList=epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged{https://circ4life.eecc.info/epcis}lifeTime=P3Y +eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCListepc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged{https://circ4life.eecc.info/epcis}lifeTime=P3Y diff --git a/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.hashes b/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.hashes index b46e953..f4b0d91 100644 --- a/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.hashes +++ b/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.hashes @@ -1 +1 @@ -ni:///sha-256;67d908f22f34026244656b87aa8e3889a2307219e46e3654db356e103f7b3a10?ver=CBV2.0 +ni:///sha-256;71bf4f5c0e26a92221dce50c2e2775eca3402169eaa46caf973f822b60e7698c?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.prehashes b/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.prehashes index a305db2..49c157b 100644 --- a/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.prehashes +++ b/tests/examples/epcisDocWithTransformationEventWithMultipleExtensions.prehashes @@ -1 +1 @@ -eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCList=epc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged{https://circ4life.eecc.info/epcis}lifeTime=P3Y{https://circ4life.eecc.info/epcis}resourceList={https://circ4life.eecc.info/epcis}epc=https://circ4life.eecc.info/recycling/bin/obj/1234567890119051400001112345{https://circ4life.eecc.info/epcis}quantityElement=epcClass=http://circ4life.eecc.info/material/copperquantity=0.5uom=KGM{https://circ4life.eecc.info/epcis}resourceElement={https://circ4life.eecc.info/epcis}amount={https://circ4life.eecc.info/epcis}quantity=0.5{https://circ4life.eecc.info/epcis}uom=WHR{https://circ4life.eecc.info/epcis}resource=https://w3id.org/saref#Electricity{https://circ4life.eecc.info/epcis}source=http://semanco02.hs-albsig.de/repository/ontology-releases/eu/semanco/ontology/SEMANCO/SEMANCO.owl#Not-Renewable_Energy_Source{https://circ4life.eecc.info/epcis}wasteList={https://circ4life.eecc.info/epcis}wasteElement={https://circ4life.eecc.info/epcis}amount={https://circ4life.eecc.info/epcis}quantity=0.5{https://circ4life.eecc.info/epcis}uom=KGM{https://circ4life.eecc.info/epcis}sink=http://circ4life.eecc.info/sink/landfill{https://circ4life.eecc.info/epcis}waste=http://circ4life.eecc.info/material/plastics +eventType=TransformationEventeventTime=2019-09-10T08:40:21.314ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4047111.012345.1111epc=urn:epc:id:sgtin:4047111.012345.2222outputEPCListepc=urn:epc:id:sgtin:4047111.012345.3333bizStep=urn:epcglobal:cbv:bizstep:repairingdisposition=urn:epcglobal:cbv:disp:damaged{https://circ4life.eecc.info/epcis}lifeTime=P3Y{https://circ4life.eecc.info/epcis}resourceList{https://circ4life.eecc.info/epcis}epc=https://circ4life.eecc.info/recycling/bin/obj/1234567890119051400001112345{https://circ4life.eecc.info/epcis}quantityElementepcClass=http://circ4life.eecc.info/material/copperquantity=0.5uom=KGM{https://circ4life.eecc.info/epcis}resourceElement{https://circ4life.eecc.info/epcis}amount{https://circ4life.eecc.info/epcis}quantity=0.5{https://circ4life.eecc.info/epcis}uom=WHR{https://circ4life.eecc.info/epcis}resource=https://w3id.org/saref#Electricity{https://circ4life.eecc.info/epcis}source=http://semanco02.hs-albsig.de/repository/ontology-releases/eu/semanco/ontology/SEMANCO/SEMANCO.owl#Not-Renewable_Energy_Source{https://circ4life.eecc.info/epcis}wasteList{https://circ4life.eecc.info/epcis}wasteElement{https://circ4life.eecc.info/epcis}amount{https://circ4life.eecc.info/epcis}quantity=0.5{https://circ4life.eecc.info/epcis}uom=KGM{https://circ4life.eecc.info/epcis}sink=http://circ4life.eecc.info/sink/landfill{https://circ4life.eecc.info/epcis}waste=http://circ4life.eecc.info/material/plastics diff --git a/tests/examples/epcisDocWithVariousEventTypes.hashes b/tests/examples/epcisDocWithVariousEventTypes.hashes index 2f20bb5..9cbae62 100644 --- a/tests/examples/epcisDocWithVariousEventTypes.hashes +++ b/tests/examples/epcisDocWithVariousEventTypes.hashes @@ -1,13 +1,13 @@ -ni:///sha-256;2b80465f08c01b2cd8b4f213fe98dbcebf44a0c397616baf787ff9f6773e6a17?ver=CBV2.0 -ni:///sha-256;8939aae74d800f9f255ad1b8ad45a092f939eccfcd19f2c9328f991f608554e5?ver=CBV2.0 -ni:///sha-256;6c83b99603e6e96d3e616391c5313d8e7ff5a2dacc7139eaad22090b14cfc848?ver=CBV2.0 -ni:///sha-256;a8294bd6e73338425948d94e2d132f7b139097b9442e16443e0aebbb5c7bac04?ver=CBV2.0 -ni:///sha-256;9c095d8f1b69c61166a2d449c29bc21a28e6447417a1379e4a258c7dd02a6c28?ver=CBV2.0 -ni:///sha-256;c800436ce6d5764f765879fb1b77f8e109a76ba9a86efb631c985765a42c73c7?ver=CBV2.0 -ni:///sha-256;6a3b8626c1f83da6aacaabd47c13b4443e4e2a26aa720e93cf06ae79fa488ab0?ver=CBV2.0 -ni:///sha-256;0f7a70e764b0436a48dd5fcc612798401b0988268810314eda8ef768689879a1?ver=CBV2.0 -ni:///sha-256;759a607812c8e27c733f0f089e7b6c6fef3fe083ca90a2a7754ef503cb959878?ver=CBV2.0 -ni:///sha-256;c8645474fac9d7879cf58c6f7c43cdf5c9e6df060a50dbadb1dc3dfeca989c5d?ver=CBV2.0 -ni:///sha-256;856ab8fae8933b648f272d94037bece6916d45ed31ddde9200f7b81ae098f927?ver=CBV2.0 -ni:///sha-256;790d79e2b92125d29c7075d19ee6397bf59fce06d825b852c0279dfa45c2a2b1?ver=CBV2.0 -ni:///sha-256;398f83c9e7352ebf395047b54820655372997ba7be9f1aaba4d92bcc5eaa4d77?ver=CBV2.0 +ni:///sha-256;43b5fcd4eb97ab7580b197a1c8ee12d28d75183353337a6d55f5bba534e561ee?ver=CBV2.0 +ni:///sha-256;551e24c227b5040c688bc056fde58b991697c2343fb7b38c9247db7838c54044?ver=CBV2.0 +ni:///sha-256;fe6c8358e79313b5b5ce8825079317918b499e587c1b8c3e57eee7d389bc7000?ver=CBV2.0 +ni:///sha-256;d5ae14f012338dc0d8767bc2bbf2198a5371ae058357b7c3a5fe608ed5b080a0?ver=CBV2.0 +ni:///sha-256;3551e2ee02887209f958ee20fd021ce309a025976f53ff0b731c42ef5d07c744?ver=CBV2.0 +ni:///sha-256;9d4440e28dee1a33fddbf0cb6ab2c5660bad19b9eb6a61aded28888de243881f?ver=CBV2.0 +ni:///sha-256;a1e1ac4bc347678c75f6727ca6d98158ee137306abcf060b191eb91aca8f9a06?ver=CBV2.0 +ni:///sha-256;86ce1d2cdd309a5664bac22546d46d9582c833c6b1b571a261030dca2ffe9fe0?ver=CBV2.0 +ni:///sha-256;f23959d28dab6018f5464ea61b21b01f9aa0c52724da74cb98c22367d9941f57?ver=CBV2.0 +ni:///sha-256;c91b214688d43674217e920cc6a7f941649b6cc8f38b15767c75ac3cda96e3e4?ver=CBV2.0 +ni:///sha-256;790954c5d3a7c58156fb94538eb54c5b819db66996e6d0a4fa5d0210929fa61f?ver=CBV2.0 +ni:///sha-256;2530b50f2540ab8bbe9fd6d60b95ffef154970d2c4d55085edafc9a047d5088f?ver=CBV2.0 +ni:///sha-256;25da975e45a6c80b9a91a0957d549c512ad114fb83213b9987e7a82c282a794c?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithVariousEventTypes.prehashes b/tests/examples/epcisDocWithVariousEventTypes.prehashes index 67eefac..e224afd 100644 --- a/tests/examples/epcisDocWithVariousEventTypes.prehashes +++ b/tests/examples/epcisDocWithVariousEventTypes.prehashes @@ -1,13 +1,13 @@ -eventType=ObjectEventeventTime=2019-10-21T10:00:30.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:5200001.0111111146action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPoint=id=urn:epc:id:sgln:5200001.99901.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:5200001000008:4711type=urn:epcglobal:cbv:btt:desadvbizTransaction=urn:epcglobal:cbv:bt:5200001000008:RE1099type=urn:epcglobal:cbv:btt:invsourceList=source=urn:epc:id:pgln:5200001.00000type=urn:epcglobal:cbv:sdt:possessing_partydestinationList=destination=urn:epc:id:pgln:4000001.98765type=urn:epcglobal:cbv:sdt:possessing_partydestination=urn:epc:id:sgln:4012345.00012.0type=urn:epcglobal:cbv:sdt:location -eventType=ObjectEventeventTime=2019-10-21T11:00:30.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:5200001.0111111146action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingreadPoint=id=urn:epc:id:sgln:4012345.00012.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:5200001000008:4711type=urn:epcglobal:cbv:btt:desadvbizTransaction=urn:epcglobal:cbv:bt:5200001000008:RE1099type=urn:epcglobal:cbv:btt:invsourceList=source=urn:epc:id:pgln:4000001.00012type=urn:epcglobal:cbv:sdt:owning_partysource=urn:epc:id:pgln:4000001.00012type=urn:epcglobal:cbv:sdt:possessing_partydestinationList=destination=urn:epc:id:pgln:4012345.00000type=urn:epcglobal:cbv:sdt:owning_partydestination=urn:epc:id:pgln:4012345.00000type=urn:epcglobal:cbv:sdt:possessing_partydestination=urn:epc:id:sgln:4012345.00012.0type=urn:epcglobal:cbv:sdt:location -eventType=ObjectEventeventTime=2019-10-21T14:45:00.000ZeventTimeZoneOffset=+01:00epcList=epc=urn:epc:id:sscc:4012345.0111111111action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingdisposition=urn:epcglobal:cbv:disp:in_progressreadPoint=id=urn:epc:id:sgln:4012345.00024.0 -eventType=ObjectEventeventTime=2019-10-21T12:58:56.000ZeventTimeZoneOffset=+02:00quantityList=quantityElement=epcClass=urn:epc:class:lgtin:4054739.099914.20160711quantity=600uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4054739.00001.0ilmd={urn:epcglobal:cbv:mda}bestBeforeDate=2019-10-21 -eventType=AggregationEventeventTime=2019-10-21T09:58:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4047023.0111111122childEPCs=epc=urn:epc:id:sgtin:4047023.077551.107epc=urn:epc:id:sgtin:4047023.077551.109epc=urn:epc:id:sgtin:4047023.077551.97epc=urn:epc:id:sgtin:4047023.077551.98action=ADDbizStep=urn:epcglobal:cbv:bizstep:packingreadPoint=id=urn:epc:id:sgln:4047023.00012.0 -eventType=AggregationEventeventTime=2019-10-21T15:30:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0111111133childQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4054739.012345.lot2quantity=17quantityElement=epcClass=urn:epc:class:lgtin:4054739.099902.P2quantity=12uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:packingreadPoint=id=urn:epc:id:sgln:4012345.00025.0 -eventType=AggregationEventeventTime=2019-10-21T09:58:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0111111144action=DELETEbizStep=urn:epcglobal:cbv:bizstep:unpackingreadPoint=id=urn:epc:id:sgln:4012345.00025.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE1099type=urn:epcglobal:cbv:btt:inv -eventType=AggregationEventeventTime=2019-10-21T12:02:56.000ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0998811122childEPCs=epc=urn:epc:id:sscc:4012344.0998811123epc=urn:epc:id:sscc:4012344.0998811124epc=urn:epc:id:sscc:4012344.0998811125action=DELETEbizStep=urn:epcglobal:cbv:bizstep:unpackingreadPoint=id=urn:epc:id:sgln:4012345.00077.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:4711type=urn:epcglobal:cbv:btt:inv -eventType=TransactionEventeventTime=2019-10-21T06:05:00.000ZeventTimeZoneOffset=-06:00epcList=epc=urn:epc:id:sgtin:0614141.107340.1epc=urn:epc:id:sgtin:0614141.107340.2action=ADDbizStep=urn:epcglobal:cbv:bizstep:shippingreadPoint=id=urn:epc:id:sgln:4012345.00000.5bizLocation=id=urn:epc:id:sgln:4012345.00000.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE100099type=urn:epcglobal:cbv:btt:po -eventType=TransactionEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00quantityList=quantityElement=epcClass=urn:epc:class:lgtin:4012345.099988.2014-02-10quantity=2030uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:holdingreadPoint=id=urn:epc:id:sgln:4012345.00025.0bizLocation=id=urn:epc:id:sgln:4012345.00002.0bizTransactionList=bizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE1099type=urn:epcglobal:cbv:btt:inv -eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25outputEPCList=epc=urn:epc:id:sgtin:4012345.077889.25epc=urn:epc:id:sgtin:4012345.077889.26epc=urn:epc:id:sgtin:4012345.077889.27epc=urn:epc:id:sgtin:4012345.077889.28transformationID=urn:epc:id:gdti:4012345.55555.1234bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4012345.00001.0ilmd={http://ns.example.com/epcis}batch=4711{http://ns.example.com/epcis}bestBeforeDate=2020-11-10 -eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25inputQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:0614141.077777.987quantity=30quantityElement=epcClass=urn:epc:class:lgtin:4012345.011111.4444quantity=10uom=KGMquantityElement=epcClass=urn:epc:idpat:sgtin:4012345.066666.*quantity=220outputEPCList=epc=urn:epc:id:sgtin:4012345.077889.25epc=urn:epc:id:sgtin:4012345.077889.26epc=urn:epc:id:sgtin:4012345.077889.27epc=urn:epc:id:sgtin:4012345.077889.28bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4012345.00001.0ilmd={http://ns.example.com/epcis}batch=XYZ{http://ns.example.com/epcis}bestBeforeDate=2015-11-10 -eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCList=epc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25outputQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4054739.099902.P20131121quantity=9520transformationID=urn:epc:id:gdti:4012345.55555.1234bizStep=http://epcis.example.com/user/vocab/bizstep/commissioningreadPoint=id=urn:epc:id:sgln:4012345.00001.0 +eventType=ObjectEventeventTime=2019-10-21T10:00:30.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:5200001.0111111146action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:departingreadPointid=urn:epc:id:sgln:5200001.99901.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:5200001000008:4711type=urn:epcglobal:cbv:btt:desadvbizTransaction=urn:epcglobal:cbv:bt:5200001000008:RE1099type=urn:epcglobal:cbv:btt:invsourceListsource=urn:epc:id:pgln:5200001.00000type=urn:epcglobal:cbv:sdt:possessing_partydestinationListdestination=urn:epc:id:pgln:4000001.98765type=urn:epcglobal:cbv:sdt:possessing_partydestination=urn:epc:id:sgln:4012345.00012.0type=urn:epcglobal:cbv:sdt:location +eventType=ObjectEventeventTime=2019-10-21T11:00:30.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:5200001.0111111146action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:receivingreadPointid=urn:epc:id:sgln:4012345.00012.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:5200001000008:4711type=urn:epcglobal:cbv:btt:desadvbizTransaction=urn:epcglobal:cbv:bt:5200001000008:RE1099type=urn:epcglobal:cbv:btt:invsourceListsource=urn:epc:id:pgln:4000001.00012type=urn:epcglobal:cbv:sdt:owning_partysource=urn:epc:id:pgln:4000001.00012type=urn:epcglobal:cbv:sdt:possessing_partydestinationListdestination=urn:epc:id:pgln:4012345.00000type=urn:epcglobal:cbv:sdt:owning_partydestination=urn:epc:id:pgln:4012345.00000type=urn:epcglobal:cbv:sdt:possessing_partydestination=urn:epc:id:sgln:4012345.00012.0type=urn:epcglobal:cbv:sdt:location +eventType=ObjectEventeventTime=2019-10-21T14:45:00.000ZeventTimeZoneOffset=+01:00epcListepc=urn:epc:id:sscc:4012345.0111111111action=OBSERVEbizStep=urn:epcglobal:cbv:bizstep:inspectingdisposition=urn:epcglobal:cbv:disp:in_progressreadPointid=urn:epc:id:sgln:4012345.00024.0 +eventType=ObjectEventeventTime=2019-10-21T12:58:56.000ZeventTimeZoneOffset=+02:00quantityListquantityElementepcClass=urn:epc:class:lgtin:4054739.099914.20160711quantity=600uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4054739.00001.0ilmd{urn:epcglobal:cbv:mda}bestBeforeDate=2019-10-21 +eventType=AggregationEventeventTime=2019-10-21T09:58:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4047023.0111111122childEPCsepc=urn:epc:id:sgtin:4047023.077551.107epc=urn:epc:id:sgtin:4047023.077551.109epc=urn:epc:id:sgtin:4047023.077551.97epc=urn:epc:id:sgtin:4047023.077551.98action=ADDbizStep=urn:epcglobal:cbv:bizstep:packingreadPointid=urn:epc:id:sgln:4047023.00012.0 +eventType=AggregationEventeventTime=2019-10-21T15:30:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0111111133childQuantityListquantityElementepcClass=urn:epc:class:lgtin:4054739.012345.lot2quantity=17quantityElementepcClass=urn:epc:class:lgtin:4054739.099902.P2quantity=12uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:packingreadPointid=urn:epc:id:sgln:4012345.00025.0 +eventType=AggregationEventeventTime=2019-10-21T09:58:56.591ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0111111144action=DELETEbizStep=urn:epcglobal:cbv:bizstep:unpackingreadPointid=urn:epc:id:sgln:4012345.00025.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE1099type=urn:epcglobal:cbv:btt:inv +eventType=AggregationEventeventTime=2019-10-21T12:02:56.000ZeventTimeZoneOffset=+02:00parentID=urn:epc:id:sscc:4012344.0998811122childEPCsepc=urn:epc:id:sscc:4012344.0998811123epc=urn:epc:id:sscc:4012344.0998811124epc=urn:epc:id:sscc:4012344.0998811125action=DELETEbizStep=urn:epcglobal:cbv:bizstep:unpackingreadPointid=urn:epc:id:sgln:4012345.00077.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:4711type=urn:epcglobal:cbv:btt:inv +eventType=TransactionEventeventTime=2019-10-21T06:05:00.000ZeventTimeZoneOffset=-06:00epcListepc=urn:epc:id:sgtin:0614141.107340.1epc=urn:epc:id:sgtin:0614141.107340.2action=ADDbizStep=urn:epcglobal:cbv:bizstep:shippingreadPointid=urn:epc:id:sgln:4012345.00000.5bizLocationid=urn:epc:id:sgln:4012345.00000.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE100099type=urn:epcglobal:cbv:btt:po +eventType=TransactionEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00quantityListquantityElementepcClass=urn:epc:class:lgtin:4012345.099988.2014-02-10quantity=2030uom=KGMaction=ADDbizStep=urn:epcglobal:cbv:bizstep:holdingreadPointid=urn:epc:id:sgln:4012345.00025.0bizLocationid=urn:epc:id:sgln:4012345.00002.0bizTransactionListbizTransaction=urn:epcglobal:cbv:bt:4012345123456:RE1099type=urn:epcglobal:cbv:btt:inv +eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25outputEPCListepc=urn:epc:id:sgtin:4012345.077889.25epc=urn:epc:id:sgtin:4012345.077889.26epc=urn:epc:id:sgtin:4012345.077889.27epc=urn:epc:id:sgtin:4012345.077889.28transformationID=urn:epc:id:gdti:4012345.55555.1234bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4012345.00001.0ilmd{http://ns.example.com/epcis}batch=4711{http://ns.example.com/epcis}bestBeforeDate=2020-11-10 +eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25inputQuantityListquantityElementepcClass=urn:epc:class:lgtin:0614141.077777.987quantity=30quantityElementepcClass=urn:epc:class:lgtin:4012345.011111.4444quantity=10uom=KGMquantityElementepcClass=urn:epc:idpat:sgtin:4012345.066666.*quantity=220outputEPCListepc=urn:epc:id:sgtin:4012345.077889.25epc=urn:epc:id:sgtin:4012345.077889.26epc=urn:epc:id:sgtin:4012345.077889.27epc=urn:epc:id:sgtin:4012345.077889.28bizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4012345.00001.0ilmd{http://ns.example.com/epcis}batch=XYZ{http://ns.example.com/epcis}bestBeforeDate=2015-11-10 +eventType=TransformationEventeventTime=2019-10-21T12:58:56.591ZeventTimeZoneOffset=+02:00inputEPCListepc=urn:epc:id:sgtin:4000001.065432.99886655epc=urn:epc:id:sgtin:4012345.011122.25outputQuantityListquantityElementepcClass=urn:epc:class:lgtin:4054739.099902.P20131121quantity=9520transformationID=urn:epc:id:gdti:4012345.55555.1234bizStep=http://epcis.example.com/user/vocab/bizstep/commissioningreadPointid=urn:epc:id:sgln:4012345.00001.0 diff --git a/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.hashes b/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.hashes index 9040b8d..19d8f60 100644 --- a/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.hashes +++ b/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.hashes @@ -1 +1 @@ -ni:///sha-256;347e0494863281c266af55d0a998462e88089be3453976b200bf874027400acb?ver=CBV2.0 +ni:///sha-256;dd8a6c0d57abb3c0e2f6e3d7de161b4f8e94acd39f37d9295fb7ef7ef4d9e9f0?ver=CBV2.0 diff --git a/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.prehashes b/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.prehashes index c233cdb..ea48353 100644 --- a/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.prehashes +++ b/tests/examples/epcisDocWithXMLstartTagAndErrorDeclaration.prehashes @@ -1 +1 @@ -eventType=TransformationEventeventTime=2020-01-13T23:00:00.000ZeventTimeZoneOffset=+01:00errorDeclaration=declarationTime=2020-01-14T23:00:00.000Zreason=urn:epcglobal:cbv:er:incorrect_datainputEPCList=epc=urn:epc:id:sgtin:4012345.011111.987inputQuantityList=quantityElement=epcClass=urn:epc:class:lgtin:4012345.022222.87545GHGHoutputEPCList=epc=urn:epc:id:sgtin:4012345.033333.AGHFGoutputQuantityList=quantityElement=epcClass=urn:epc:idpat:sgtin:4012345.044444.*quantity=452uom=KGMbizStep=urn:epcglobal:cbv:bizstep:commissioningreadPoint=id=urn:epc:id:sgln:4012345.00000.0errorDeclaration={http://ns.example.com/epcis}vendorExtension=Test1eventID=urn:uuid:374d95fc-9457-4a51-bd6a-0bba133845a8 +eventType=TransformationEventeventTime=2020-01-13T23:00:00.000ZeventTimeZoneOffset=+01:00errorDeclarationdeclarationTime=2020-01-14T23:00:00.000Zreason=urn:epcglobal:cbv:er:incorrect_datainputEPCListepc=urn:epc:id:sgtin:4012345.011111.987inputQuantityListquantityElementepcClass=urn:epc:class:lgtin:4012345.022222.87545GHGHoutputEPCListepc=urn:epc:id:sgtin:4012345.033333.AGHFGoutputQuantityListquantityElementepcClass=urn:epc:idpat:sgtin:4012345.044444.*quantity=452uom=KGMbizStep=urn:epcglobal:cbv:bizstep:commissioningreadPointid=urn:epc:id:sgln:4012345.00000.0errorDeclaration{http://ns.example.com/epcis}vendorExtension=Test1eventID=urn:uuid:374d95fc-9457-4a51-bd6a-0bba133845a8 From e73898026818fd845dfb4d53161a7aa58f56ffa8 Mon Sep 17 00:00:00 2001 From: Sebastian Schmittner Date: Mon, 7 Dec 2020 15:48:59 +0100 Subject: [PATCH 6/7] code style --- epcis_event_hash_generator/__init__.py | 5 ++- epcis_event_hash_generator/hash_generator.py | 47 ++++++++++++-------- epcis_event_hash_generator/main.py | 3 +- tests/test_all_values_present.py | 11 ++--- 4 files changed, 39 insertions(+), 27 deletions(-) diff --git a/epcis_event_hash_generator/__init__.py b/epcis_event_hash_generator/__init__.py index f05f4e2..b27df21 100644 --- a/epcis_event_hash_generator/__init__.py +++ b/epcis_event_hash_generator/__init__.py @@ -2,8 +2,9 @@ JOIN_BY = "" """ -Join the substrings to the pre hash string using this deliminator. -By the specification in https://github.com/RalphTro/epcis-event-hash-generator this is to be the empty string, but using e.g. newline might be helpful for debugging. +Join the substrings to the pre hash string using this deliminator. +By the specification in https://github.com/RalphTro/epcis-event-hash-generator this is to be the empty string, +but using e.g. newline might be helpful for debugging. When using the command line utility, this can be changed via the -j flag. """ diff --git a/epcis_event_hash_generator/hash_generator.py b/epcis_event_hash_generator/hash_generator.py index 5c5e618..24f78ba 100644 --- a/epcis_event_hash_generator/hash_generator.py +++ b/epcis_event_hash_generator/hash_generator.py @@ -59,11 +59,33 @@ def fix_time_stamp_format(timestamp): return fixed +def child_to_pre_hash_string(child, sub_child_order): + text = "" + grand_child_text = "" + if sub_child_order: + grand_child_text = recurse_through_children_in_order(child[2], sub_child_order) + if child[1]: + text = child[1].strip() + if child[0].lower().find("time") > 0 and child[0].lower().find("offset") < 0: + text = fix_time_stamp_format(text) + else: + text = format_if_numeric(text) + + if text: + text = "=" + text + logging.debug("Adding text '%s'", text) + + if text or grand_child_text: + return child[0] + text + grand_child_text + + return "" + + def recurse_through_children_in_order(child_list, child_order): """ Loop over child order, look for a child of root with matching key and build the pre-hash string (mostly key=value) Recurse through the grand children applying the sub order. - All elements added to the returned pre hash string are removed from the tree below the root. + All elements added to the returned pre hash string are removed from the tree below the root. After the recursion completes, only elements NOT added to the pre-hash string are left in the tree. `child_list` is to be a list of simple python object, i.e. triples of two strings (key/value) and a list of @@ -74,26 +96,13 @@ def recurse_through_children_in_order(child_list, child_order): pre_hash = "" logging.debug("Calculating pre hash for child list %s \nWith order %s", child_list, child_order) for (child_name, sub_child_order) in child_order: - list_of_values = [] children = [x for x in child_list if x[0] == child_name] # elements with the same name + list_of_values = [] + for child in children: - text = "" - grand_child_text = "" - if sub_child_order: - grand_child_text = recurse_through_children_in_order(child[2], sub_child_order) - if child[1]: - text = child[1].strip() - if child_name.lower().find("time") > 0 and child_name.lower().find("offset") < 0: - text = fix_time_stamp_format(text) - else: - text = format_if_numeric(text) - - if text: - text = "=" + text - logging.debug("Adding text '%s'", text) - - if text or grand_child_text: - list_of_values.append(child_name + text + grand_child_text) + child_pre_hash = child_to_pre_hash_string(child, sub_child_order) + if child_pre_hash: + list_of_values.append(child_pre_hash) else: logging.debug("Empty element ignored: %s", child) diff --git a/epcis_event_hash_generator/main.py b/epcis_event_hash_generator/main.py index 506672b..c099087 100755 --- a/epcis_event_hash_generator/main.py +++ b/epcis_event_hash_generator/main.py @@ -68,7 +68,8 @@ def command_line_parsing(): parser.add_argument( "-j", "--join", - help="String used to join the pre hash string. Defaults to empty string as specified. Values like '\\n' might be useful for debugging.", + help="String used to join the pre hash string." + + " Defaults to empty string as specified. Values like '\\n' might be useful for debugging.", default="") args = parser.parse_args() diff --git a/tests/test_all_values_present.py b/tests/test_all_values_present.py index e52427a..7a71650 100644 --- a/tests/test_all_values_present.py +++ b/tests/test_all_values_present.py @@ -39,11 +39,12 @@ def _check_values(filename): for (py_obj, prehash_string) in zip(events[2], prehash_string_list): key_values = _py_to_value_list(py_obj) for key, value in key_values: - assert prehash_string.find( - value) >= 0, "Value '{}' for key '{}' not contained in prehash string\n{}\n for file {}".format(value, - key, - prehash_string, - filename) + msg = "Value '{}' for key '{}' not contained in prehash string\n{}\n for file {}".format(value, + key, + prehash_string, + filename) + assert prehash_string.find(value) >= 0, msg + return True From aa8e3a7173fef6f5e1dc2a8a9522c639ce21ab53 Mon Sep 17 00:00:00 2001 From: Sebastian Schmittner Date: Mon, 7 Dec 2020 15:51:03 +0100 Subject: [PATCH 7/7] autopep --- epcis_event_hash_generator/context.py | 3 +-- epcis_event_hash_generator/hash_generator.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/epcis_event_hash_generator/context.py b/epcis_event_hash_generator/context.py index 913be06..df8b0df 100644 --- a/epcis_event_hash_generator/context.py +++ b/epcis_event_hash_generator/context.py @@ -1,6 +1,5 @@ +import epcis_event_hash_generator import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) - -import epcis_event_hash_generator diff --git a/epcis_event_hash_generator/hash_generator.py b/epcis_event_hash_generator/hash_generator.py index 24f78ba..2686da0 100644 --- a/epcis_event_hash_generator/hash_generator.py +++ b/epcis_event_hash_generator/hash_generator.py @@ -74,7 +74,7 @@ def child_to_pre_hash_string(child, sub_child_order): if text: text = "=" + text logging.debug("Adding text '%s'", text) - + if text or grand_child_text: return child[0] + text + grand_child_text