diff --git a/docs/ast/source/matchers/TaxonomicUnitMatcher.js.json b/docs/ast/source/matchers/TaxonomicUnitMatcher.js.json index 6f3d7491..41ed6f2c 100644 --- a/docs/ast/source/matchers/TaxonomicUnitMatcher.js.json +++ b/docs/ast/source/matchers/TaxonomicUnitMatcher.js.json @@ -70,9 +70,9 @@ "line": 1, "column": 25 }, - "identifierName": "LXL9JK4849P6M" + "identifierName": "M50HFXTXLX50B" }, - "name": "LXL9JK4849P6M" + "name": "M50HFXTXLX50B" } } ], @@ -211,9 +211,9 @@ "line": 2, "column": 46 }, - "identifierName": "LXL9JK4849P6M" + "identifierName": "M50HFXTXLX50B" }, - "name": "LXL9JK4849P6M" + "name": "M50HFXTXLX50B" } } ], @@ -261,9 +261,9 @@ "line": 3, "column": 25 }, - "identifierName": "LXL9JK48UIGO0" + "identifierName": "M50HFXTXWY9DG" }, - "name": "LXL9JK48UIGO0" + "name": "M50HFXTXWY9DG" } } ], @@ -402,9 +402,9 @@ "line": 4, "column": 45 }, - "identifierName": "LXL9JK48UIGO0" + "identifierName": "M50HFXTXWY9DG" }, - "name": "LXL9JK48UIGO0" + "name": "M50HFXTXWY9DG" } } ], @@ -452,9 +452,9 @@ "line": 5, "column": 25 }, - "identifierName": "LXL9JK48T1OMI" + "identifierName": "M50HFXTXA2PM8" }, - "name": "LXL9JK48T1OMI" + "name": "M50HFXTXA2PM8" } } ], @@ -593,9 +593,9 @@ "line": 6, "column": 41 }, - "identifierName": "LXL9JK48T1OMI" + "identifierName": "M50HFXTXA2PM8" }, - "name": "LXL9JK48T1OMI" + "name": "M50HFXTXA2PM8" } } ], @@ -13549,7 +13549,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK4849P6M", + "value": "M50HFXTXLX50B", "start": 12, "end": 25, "loc": { @@ -13785,7 +13785,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK4849P6M", + "value": "M50HFXTXLX50B", "start": 101, "end": 114, "loc": { @@ -13918,7 +13918,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK48UIGO0", + "value": "M50HFXTXWY9DG", "start": 128, "end": 141, "loc": { @@ -14154,7 +14154,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK48UIGO0", + "value": "M50HFXTXWY9DG", "start": 215, "end": 228, "loc": { @@ -14287,7 +14287,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK48T1OMI", + "value": "M50HFXTXA2PM8", "start": 242, "end": 255, "loc": { @@ -14523,7 +14523,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK48T1OMI", + "value": "M50HFXTXA2PM8", "start": 321, "end": 334, "loc": { diff --git a/docs/ast/source/wrappers/CitationWrapper.js.json b/docs/ast/source/wrappers/CitationWrapper.js.json index 249461ff..f2422e7f 100644 --- a/docs/ast/source/wrappers/CitationWrapper.js.json +++ b/docs/ast/source/wrappers/CitationWrapper.js.json @@ -70,9 +70,9 @@ "line": 6, "column": 25 }, - "identifierName": "LXL9JK4VB2TPD" + "identifierName": "M50HFXU6F0NKU" }, - "name": "LXL9JK4VB2TPD", + "name": "M50HFXU6F0NKU", "leadingComments": null }, "leadingComments": null @@ -286,9 +286,9 @@ "line": 7, "column": 38 }, - "identifierName": "LXL9JK4VB2TPD" + "identifierName": "M50HFXU6F0NKU" }, - "name": "LXL9JK4VB2TPD" + "name": "M50HFXU6F0NKU" } } ], @@ -24283,7 +24283,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK4VB2TPD", + "value": "M50HFXU6F0NKU", "start": 142, "end": 155, "loc": { @@ -24571,7 +24571,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK4VB2TPD", + "value": "M50HFXU6F0NKU", "start": 197, "end": 210, "loc": { diff --git a/docs/ast/source/wrappers/PhylogenyWrapper.js.json b/docs/ast/source/wrappers/PhylogenyWrapper.js.json index 173f9f75..07a62bbe 100644 --- a/docs/ast/source/wrappers/PhylogenyWrapper.js.json +++ b/docs/ast/source/wrappers/PhylogenyWrapper.js.json @@ -70,9 +70,9 @@ "line": 5, "column": 25 }, - "identifierName": "LXL9JK5MY9Z3Z" + "identifierName": "M50HFXUGMZEIO" }, - "name": "LXL9JK5MY9Z3Z", + "name": "M50HFXUGMZEIO", "leadingComments": null }, "leadingComments": null @@ -286,9 +286,9 @@ "line": 9, "column": 17 }, - "identifierName": "LXL9JK5MY9Z3Z" + "identifierName": "M50HFXUGMZEIO" }, - "name": "LXL9JK5MY9Z3Z" + "name": "M50HFXUGMZEIO" } } ], @@ -550,9 +550,9 @@ "line": 17, "column": 25 }, - "identifierName": "LXL9JK5M3VRPM" + "identifierName": "M50HFXUGA4T4Y" }, - "name": "LXL9JK5M3VRPM" + "name": "M50HFXUGA4T4Y" } } ], @@ -691,9 +691,9 @@ "line": 18, "column": 46 }, - "identifierName": "LXL9JK5M3VRPM" + "identifierName": "M50HFXUGA4T4Y" }, - "name": "LXL9JK5M3VRPM" + "name": "M50HFXUGA4T4Y" } } ], @@ -741,9 +741,9 @@ "line": 19, "column": 25 }, - "identifierName": "LXL9JK5M475GC" + "identifierName": "M50HFXUGG4ABQ" }, - "name": "LXL9JK5M475GC" + "name": "M50HFXUGG4ABQ" } } ], @@ -882,9 +882,9 @@ "line": 20, "column": 46 }, - "identifierName": "LXL9JK5M475GC" + "identifierName": "M50HFXUGG4ABQ" }, - "name": "LXL9JK5M475GC" + "name": "M50HFXUGG4ABQ" } } ], @@ -932,9 +932,9 @@ "line": 21, "column": 25 }, - "identifierName": "LXL9JK5MUANAE" + "identifierName": "M50HFXUGUZ2JB" }, - "name": "LXL9JK5MUANAE" + "name": "M50HFXUGUZ2JB" } } ], @@ -1073,9 +1073,9 @@ "line": 22, "column": 41 }, - "identifierName": "LXL9JK5MUANAE" + "identifierName": "M50HFXUGUZ2JB" }, - "name": "LXL9JK5MUANAE" + "name": "M50HFXUGUZ2JB" } } ], @@ -51102,7 +51102,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK5MY9Z3Z", + "value": "M50HFXUGMZEIO", "start": 41, "end": 54, "loc": { @@ -51416,7 +51416,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK5MY9Z3Z", + "value": "M50HFXUGMZEIO", "start": 103, "end": 116, "loc": { @@ -51847,7 +51847,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK5M3VRPM", + "value": "M50HFXUGA4T4Y", "start": 280, "end": 293, "loc": { @@ -52083,7 +52083,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK5M3VRPM", + "value": "M50HFXUGA4T4Y", "start": 359, "end": 372, "loc": { @@ -52216,7 +52216,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK5M475GC", + "value": "M50HFXUGG4ABQ", "start": 386, "end": 399, "loc": { @@ -52452,7 +52452,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK5M475GC", + "value": "M50HFXUGG4ABQ", "start": 475, "end": 488, "loc": { @@ -52585,7 +52585,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK5MUANAE", + "value": "M50HFXUGUZ2JB", "start": 502, "end": 515, "loc": { @@ -52821,7 +52821,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK5MUANAE", + "value": "M50HFXUGUZ2JB", "start": 571, "end": 584, "loc": { diff --git a/docs/ast/source/wrappers/PhylorefWrapper.js.json b/docs/ast/source/wrappers/PhylorefWrapper.js.json index f5ecc04b..bed7e903 100644 --- a/docs/ast/source/wrappers/PhylorefWrapper.js.json +++ b/docs/ast/source/wrappers/PhylorefWrapper.js.json @@ -159,9 +159,9 @@ "line": 3, "column": 25 }, - "identifierName": "LXL9JK6ODIPBD" + "identifierName": "M50HFXUVFVB42" }, - "name": "LXL9JK6ODIPBD" + "name": "M50HFXUVFVB42" } } ], @@ -410,9 +410,9 @@ "line": 4, "column": 46 }, - "identifierName": "LXL9JK6ODIPBD" + "identifierName": "M50HFXUVFVB42" }, - "name": "LXL9JK6ODIPBD" + "name": "M50HFXUVFVB42" } } ], @@ -529,9 +529,9 @@ "line": 7, "column": 25 }, - "identifierName": "LXL9JK6OWJB6S" + "identifierName": "M50HFXUVZ5Q9F" }, - "name": "LXL9JK6OWJB6S" + "name": "M50HFXUVZ5Q9F" } } ], @@ -670,9 +670,9 @@ "line": 8, "column": 46 }, - "identifierName": "LXL9JK6OWJB6S" + "identifierName": "M50HFXUVZ5Q9F" }, - "name": "LXL9JK6OWJB6S" + "name": "M50HFXUVZ5Q9F" } } ], @@ -720,9 +720,9 @@ "line": 9, "column": 25 }, - "identifierName": "LXL9JK6OL1ASK" + "identifierName": "M50HFXUVBS4RX" }, - "name": "LXL9JK6OL1ASK" + "name": "M50HFXUVBS4RX" } } ], @@ -861,9 +861,9 @@ "line": 10, "column": 45 }, - "identifierName": "LXL9JK6OL1ASK" + "identifierName": "M50HFXUVBS4RX" }, - "name": "LXL9JK6OL1ASK" + "name": "M50HFXUVBS4RX" } } ], @@ -911,9 +911,9 @@ "line": 11, "column": 25 }, - "identifierName": "LXL9JK6ORWVVE" + "identifierName": "M50HFXUV9876D" }, - "name": "LXL9JK6ORWVVE" + "name": "M50HFXUV9876D" } } ], @@ -1052,9 +1052,9 @@ "line": 12, "column": 42 }, - "identifierName": "LXL9JK6ORWVVE" + "identifierName": "M50HFXUV9876D" }, - "name": "LXL9JK6ORWVVE" + "name": "M50HFXUV9876D" } } ], @@ -1102,9 +1102,9 @@ "line": 13, "column": 25 }, - "identifierName": "LXL9JK6O9OPUJ" + "identifierName": "M50HFXUVEI6GD" }, - "name": "LXL9JK6O9OPUJ" + "name": "M50HFXUVEI6GD" } } ], @@ -1243,9 +1243,9 @@ "line": 14, "column": 41 }, - "identifierName": "LXL9JK6O9OPUJ" + "identifierName": "M50HFXUVEI6GD" }, - "name": "LXL9JK6O9OPUJ" + "name": "M50HFXUVEI6GD" } } ], @@ -85266,7 +85266,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6ODIPBD", + "value": "M50HFXUVFVB42", "start": 96, "end": 109, "loc": { @@ -85606,7 +85606,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6ODIPBD", + "value": "M50HFXUVFVB42", "start": 159, "end": 172, "loc": { @@ -85872,7 +85872,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6OWJB6S", + "value": "M50HFXUVZ5Q9F", "start": 229, "end": 242, "loc": { @@ -86108,7 +86108,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6OWJB6S", + "value": "M50HFXUVZ5Q9F", "start": 308, "end": 321, "loc": { @@ -86241,7 +86241,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6OL1ASK", + "value": "M50HFXUVBS4RX", "start": 335, "end": 348, "loc": { @@ -86477,7 +86477,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6OL1ASK", + "value": "M50HFXUVBS4RX", "start": 412, "end": 425, "loc": { @@ -86610,7 +86610,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6ORWVVE", + "value": "M50HFXUV9876D", "start": 439, "end": 452, "loc": { @@ -86846,7 +86846,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6ORWVVE", + "value": "M50HFXUV9876D", "start": 510, "end": 523, "loc": { @@ -86979,7 +86979,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6O9OPUJ", + "value": "M50HFXUVEI6GD", "start": 537, "end": 550, "loc": { @@ -87215,7 +87215,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK6O9OPUJ", + "value": "M50HFXUVEI6GD", "start": 606, "end": 619, "loc": { diff --git a/docs/ast/source/wrappers/PhyxWrapper.js.json b/docs/ast/source/wrappers/PhyxWrapper.js.json index 13fa994e..52f46b8d 100644 --- a/docs/ast/source/wrappers/PhyxWrapper.js.json +++ b/docs/ast/source/wrappers/PhyxWrapper.js.json @@ -226,9 +226,9 @@ "line": 5, "column": 25 }, - "identifierName": "LXL9JK83PH1BW" + "identifierName": "M50HFXVL6ZOI3" }, - "name": "LXL9JK83PH1BW", + "name": "M50HFXVL6ZOI3", "leadingComments": null }, "leadingComments": null @@ -497,9 +497,9 @@ "line": 6, "column": 46 }, - "identifierName": "LXL9JK83PH1BW" + "identifierName": "M50HFXVL6ZOI3" }, - "name": "LXL9JK83PH1BW" + "name": "M50HFXVL6ZOI3" } } ], @@ -723,9 +723,9 @@ "line": 13, "column": 25 }, - "identifierName": "LXL9JK836PI9S" + "identifierName": "M50HFXVL4VN6M" }, - "name": "LXL9JK836PI9S" + "name": "M50HFXVL4VN6M" } } ], @@ -864,9 +864,9 @@ "line": 14, "column": 41 }, - "identifierName": "LXL9JK836PI9S" + "identifierName": "M50HFXVL4VN6M" }, - "name": "LXL9JK836PI9S" + "name": "M50HFXVL4VN6M" } } ], @@ -914,9 +914,9 @@ "line": 15, "column": 25 }, - "identifierName": "LXL9JK830DC8M" + "identifierName": "M50HFXVLNRV2S" }, - "name": "LXL9JK830DC8M" + "name": "M50HFXVLNRV2S" } } ], @@ -1055,9 +1055,9 @@ "line": 16, "column": 42 }, - "identifierName": "LXL9JK830DC8M" + "identifierName": "M50HFXVLNRV2S" }, - "name": "LXL9JK830DC8M" + "name": "M50HFXVLNRV2S" } } ], @@ -1105,9 +1105,9 @@ "line": 17, "column": 25 }, - "identifierName": "LXL9JK83OXXQ2" + "identifierName": "M50HFXVLF02HT" }, - "name": "LXL9JK83OXXQ2" + "name": "M50HFXVLF02HT" } } ], @@ -1246,9 +1246,9 @@ "line": 18, "column": 41 }, - "identifierName": "LXL9JK83OXXQ2" + "identifierName": "M50HFXVLF02HT" }, - "name": "LXL9JK83OXXQ2" + "name": "M50HFXVLF02HT" } } ], @@ -33226,7 +33226,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK83PH1BW", + "value": "M50HFXVL6ZOI3", "start": 94, "end": 107, "loc": { @@ -33566,7 +33566,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK83PH1BW", + "value": "M50HFXVL6ZOI3", "start": 157, "end": 170, "loc": { @@ -33981,7 +33981,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK836PI9S", + "value": "M50HFXVL4VN6M", "start": 284, "end": 297, "loc": { @@ -34217,7 +34217,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK836PI9S", + "value": "M50HFXVL4VN6M", "start": 353, "end": 366, "loc": { @@ -34350,7 +34350,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK830DC8M", + "value": "M50HFXVLNRV2S", "start": 380, "end": 393, "loc": { @@ -34586,7 +34586,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK830DC8M", + "value": "M50HFXVLNRV2S", "start": 451, "end": 464, "loc": { @@ -34719,7 +34719,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK83OXXQ2", + "value": "M50HFXVLF02HT", "start": 478, "end": 491, "loc": { @@ -34955,7 +34955,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK83OXXQ2", + "value": "M50HFXVLF02HT", "start": 547, "end": 560, "loc": { diff --git a/docs/ast/source/wrappers/SpecimenWrapper.js.json b/docs/ast/source/wrappers/SpecimenWrapper.js.json index 5b102473..af4a2f6d 100644 --- a/docs/ast/source/wrappers/SpecimenWrapper.js.json +++ b/docs/ast/source/wrappers/SpecimenWrapper.js.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 8867, + "end": 8773, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 8867, + "end": 8773, "loc": { "start": { "line": 1, @@ -70,9 +70,9 @@ "line": 1, "column": 25 }, - "identifierName": "LXL9JK8J7MTDE" + "identifierName": "M50HFXVTJPWM5" }, - "name": "LXL9JK8J7MTDE" + "name": "M50HFXVTJPWM5" } } ], @@ -211,9 +211,9 @@ "line": 2, "column": 29 }, - "identifierName": "LXL9JK8J7MTDE" + "identifierName": "M50HFXVTJPWM5" }, - "name": "LXL9JK8J7MTDE" + "name": "M50HFXVTJPWM5" } } ], @@ -261,9 +261,9 @@ "line": 3, "column": 25 }, - "identifierName": "LXL9JK8JTNLQE" + "identifierName": "M50HFXVT2CD2B" }, - "name": "LXL9JK8JTNLQE" + "name": "M50HFXVT2CD2B" } } ], @@ -402,9 +402,9 @@ "line": 4, "column": 45 }, - "identifierName": "LXL9JK8JTNLQE" + "identifierName": "M50HFXVT2CD2B" }, - "name": "LXL9JK8JTNLQE" + "name": "M50HFXVT2CD2B" } } ], @@ -521,9 +521,9 @@ "line": 6, "column": 25 }, - "identifierName": "LXL9JK8JDZPL7" + "identifierName": "M50HFXVT6MY40" }, - "name": "LXL9JK8JDZPL7" + "name": "M50HFXVT6MY40" } } ], @@ -662,9 +662,9 @@ "line": 7, "column": 42 }, - "identifierName": "LXL9JK8JDZPL7" + "identifierName": "M50HFXVT6MY40" }, - "name": "LXL9JK8JDZPL7" + "name": "M50HFXVT6MY40" } } ], @@ -672,9 +672,9 @@ "trailingComments": [ { "type": "CommentBlock", - "value": "*\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a dwc:occurrenceID with the occurrence identifier.\n * - Should have a dwc:basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n ", + "value": "*\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a occurrenceID with the occurrence identifier.\n * - Should have a basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n ", "start": 325, - "end": 1088, + "end": 1080, "loc": { "start": { "line": 9, @@ -690,8 +690,8 @@ }, { "type": "Identifier", - "start": 1089, - "end": 8836, + "start": 1081, + "end": 8742, "loc": { "start": { "line": 24, @@ -704,8 +704,8 @@ }, "id": { "type": "Identifier", - "start": 1095, - "end": 1110, + "start": 1087, + "end": 1102, "loc": { "start": { "line": 24, @@ -723,8 +723,8 @@ "superClass": null, "body": { "type": "ClassBody", - "start": 1111, - "end": 8836, + "start": 1103, + "end": 8742, "loc": { "start": { "line": 24, @@ -738,8 +738,8 @@ "body": [ { "type": "ClassMethod", - "start": 1170, - "end": 1238, + "start": 1162, + "end": 1230, "loc": { "start": { "line": 26, @@ -754,8 +754,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1181, - "end": 1194, + "start": 1173, + "end": 1186, "loc": { "start": { "line": 26, @@ -777,8 +777,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 1197, - "end": 1238, + "start": 1189, + "end": 1230, "loc": { "start": { "line": 26, @@ -792,8 +792,8 @@ "body": [ { "type": "ReturnStatement", - "start": 1203, - "end": 1234, + "start": 1195, + "end": 1226, "loc": { "start": { "line": 27, @@ -806,8 +806,8 @@ }, "argument": { "type": "MemberExpression", - "start": 1210, - "end": 1233, + "start": 1202, + "end": 1225, "loc": { "start": { "line": 27, @@ -820,8 +820,8 @@ }, "object": { "type": "Identifier", - "start": 1210, - "end": 1218, + "start": 1202, + "end": 1210, "loc": { "start": { "line": 27, @@ -837,8 +837,8 @@ }, "property": { "type": "Identifier", - "start": 1219, - "end": 1233, + "start": 1211, + "end": 1225, "loc": { "start": { "line": 27, @@ -863,8 +863,8 @@ { "type": "CommentBlock", "value": "* The '@type' of specimens in JSON-LD document. ", - "start": 1115, - "end": 1167, + "start": 1107, + "end": 1159, "loc": { "start": { "line": 25, @@ -881,8 +881,8 @@ { "type": "CommentBlock", "value": "* Construct a wrapper around a specimen. ", - "start": 1242, - "end": 1287, + "start": 1234, + "end": 1279, "loc": { "start": { "line": 30, @@ -898,8 +898,8 @@ }, { "type": "ClassMethod", - "start": 1290, - "end": 1347, + "start": 1282, + "end": 1339, "loc": { "start": { "line": 31, @@ -914,8 +914,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1290, - "end": 1301, + "start": 1282, + "end": 1293, "loc": { "start": { "line": 31, @@ -938,8 +938,8 @@ "params": [ { "type": "Identifier", - "start": 1302, - "end": 1310, + "start": 1294, + "end": 1302, "loc": { "start": { "line": 31, @@ -956,8 +956,8 @@ ], "body": { "type": "BlockStatement", - "start": 1312, - "end": 1347, + "start": 1304, + "end": 1339, "loc": { "start": { "line": 31, @@ -971,8 +971,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 1318, - "end": 1343, + "start": 1310, + "end": 1335, "loc": { "start": { "line": 32, @@ -985,8 +985,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 1318, - "end": 1342, + "start": 1310, + "end": 1334, "loc": { "start": { "line": 32, @@ -1000,8 +1000,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 1318, - "end": 1331, + "start": 1310, + "end": 1323, "loc": { "start": { "line": 32, @@ -1014,8 +1014,8 @@ }, "object": { "type": "ThisExpression", - "start": 1318, - "end": 1322, + "start": 1310, + "end": 1314, "loc": { "start": { "line": 32, @@ -1029,8 +1029,8 @@ }, "property": { "type": "Identifier", - "start": 1323, - "end": 1331, + "start": 1315, + "end": 1323, "loc": { "start": { "line": 32, @@ -1048,8 +1048,8 @@ }, "right": { "type": "Identifier", - "start": 1334, - "end": 1342, + "start": 1326, + "end": 1334, "loc": { "start": { "line": 32, @@ -1073,8 +1073,8 @@ { "type": "CommentBlock", "value": "* Construct a wrapper around a specimen. ", - "start": 1242, - "end": 1287, + "start": 1234, + "end": 1279, "loc": { "start": { "line": 30, @@ -1091,8 +1091,8 @@ { "type": "CommentBlock", "value": "*\n * Normalize the specified specimen.\n * @param specimen A specimen to be normalized.\n ", - "start": 1351, - "end": 1449, + "start": 1343, + "end": 1441, "loc": { "start": { "line": 35, @@ -1108,8 +1108,8 @@ }, { "type": "ClassMethod", - "start": 1452, - "end": 1982, + "start": 1444, + "end": 1968, "loc": { "start": { "line": 39, @@ -1124,8 +1124,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1459, - "end": 1468, + "start": 1451, + "end": 1460, "loc": { "start": { "line": 39, @@ -1147,8 +1147,8 @@ "params": [ { "type": "Identifier", - "start": 1469, - "end": 1477, + "start": 1461, + "end": 1469, "loc": { "start": { "line": 39, @@ -1165,8 +1165,8 @@ ], "body": { "type": "BlockStatement", - "start": 1479, - "end": 1982, + "start": 1471, + "end": 1968, "loc": { "start": { "line": 39, @@ -1180,8 +1180,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 1485, - "end": 1531, + "start": 1477, + "end": 1523, "loc": { "start": { "line": 40, @@ -1195,8 +1195,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 1491, - "end": 1530, + "start": 1483, + "end": 1522, "loc": { "start": { "line": 40, @@ -1209,8 +1209,8 @@ }, "id": { "type": "Identifier", - "start": 1491, - "end": 1498, + "start": 1483, + "end": 1490, "loc": { "start": { "line": 40, @@ -1226,8 +1226,8 @@ }, "init": { "type": "NewExpression", - "start": 1501, - "end": 1530, + "start": 1493, + "end": 1522, "loc": { "start": { "line": 40, @@ -1240,8 +1240,8 @@ }, "callee": { "type": "Identifier", - "start": 1505, - "end": 1520, + "start": 1497, + "end": 1512, "loc": { "start": { "line": 40, @@ -1258,8 +1258,8 @@ "arguments": [ { "type": "Identifier", - "start": 1521, - "end": 1529, + "start": 1513, + "end": 1521, "loc": { "start": { "line": 40, @@ -1281,8 +1281,8 @@ }, { "type": "VariableDeclaration", - "start": 1536, - "end": 1875, + "start": 1528, + "end": 1861, "loc": { "start": { "line": 41, @@ -1296,8 +1296,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 1542, - "end": 1874, + "start": 1534, + "end": 1860, "loc": { "start": { "line": 41, @@ -1310,8 +1310,8 @@ }, "id": { "type": "Identifier", - "start": 1542, - "end": 1560, + "start": 1534, + "end": 1552, "loc": { "start": { "line": 41, @@ -1327,8 +1327,8 @@ }, "init": { "type": "ObjectExpression", - "start": 1563, - "end": 1874, + "start": 1555, + "end": 1860, "loc": { "start": { "line": 41, @@ -1342,8 +1342,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1571, - "end": 1609, + "start": 1563, + "end": 1601, "loc": { "start": { "line": 42, @@ -1359,8 +1359,8 @@ "computed": false, "key": { "type": "StringLiteral", - "start": 1571, - "end": 1578, + "start": 1563, + "end": 1570, "loc": { "start": { "line": 42, @@ -1379,8 +1379,8 @@ }, "value": { "type": "MemberExpression", - "start": 1580, - "end": 1609, + "start": 1572, + "end": 1601, "loc": { "start": { "line": 42, @@ -1393,8 +1393,8 @@ }, "object": { "type": "Identifier", - "start": 1580, - "end": 1595, + "start": 1572, + "end": 1587, "loc": { "start": { "line": 42, @@ -1410,8 +1410,8 @@ }, "property": { "type": "Identifier", - "start": 1596, - "end": 1609, + "start": 1588, + "end": 1601, "loc": { "start": { "line": 42, @@ -1430,8 +1430,8 @@ }, { "type": "ObjectProperty", - "start": 1617, - "end": 1637, + "start": 1609, + "end": 1629, "loc": { "start": { "line": 43, @@ -1447,8 +1447,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1617, - "end": 1622, + "start": 1609, + "end": 1614, "loc": { "start": { "line": 43, @@ -1464,8 +1464,8 @@ }, "value": { "type": "MemberExpression", - "start": 1624, - "end": 1637, + "start": 1616, + "end": 1629, "loc": { "start": { "line": 43, @@ -1478,8 +1478,8 @@ }, "object": { "type": "Identifier", - "start": 1624, - "end": 1631, + "start": 1616, + "end": 1623, "loc": { "start": { "line": 43, @@ -1495,8 +1495,8 @@ }, "property": { "type": "Identifier", - "start": 1632, - "end": 1637, + "start": 1624, + "end": 1629, "loc": { "start": { "line": 43, @@ -1515,8 +1515,8 @@ }, { "type": "ObjectProperty", - "start": 1645, - "end": 1687, + "start": 1637, + "end": 1673, "loc": { "start": { "line": 44, @@ -1524,16 +1524,16 @@ }, "end": { "line": 44, - "column": 48 + "column": 42 } }, "method": false, "shorthand": false, "computed": false, "key": { - "type": "StringLiteral", - "start": 1645, - "end": 1664, + "type": "Identifier", + "start": 1637, + "end": 1650, "loc": { "start": { "line": 44, @@ -1541,41 +1541,38 @@ }, "end": { "line": 44, - "column": 25 - } - }, - "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "column": 19 + }, + "identifierName": "basisOfRecord" }, - "value": "dwc:basisOfRecord" + "name": "basisOfRecord" }, "value": { "type": "MemberExpression", - "start": 1666, - "end": 1687, + "start": 1652, + "end": 1673, "loc": { "start": { "line": 44, - "column": 27 + "column": 21 }, "end": { "line": 44, - "column": 48 + "column": 42 } }, "object": { "type": "Identifier", - "start": 1666, - "end": 1673, + "start": 1652, + "end": 1659, "loc": { "start": { "line": 44, - "column": 27 + "column": 21 }, "end": { "line": 44, - "column": 34 + "column": 28 }, "identifierName": "wrapped" }, @@ -1583,16 +1580,16 @@ }, "property": { "type": "Identifier", - "start": 1674, - "end": 1687, + "start": 1660, + "end": 1673, "loc": { "start": { "line": 44, - "column": 35 + "column": 29 }, "end": { "line": 44, - "column": 48 + "column": 42 }, "identifierName": "basisOfRecord" }, @@ -1603,8 +1600,8 @@ }, { "type": "ObjectProperty", - "start": 1695, - "end": 1729, + "start": 1681, + "end": 1715, "loc": { "start": { "line": 45, @@ -1620,8 +1617,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1695, - "end": 1707, + "start": 1681, + "end": 1693, "loc": { "start": { "line": 45, @@ -1637,8 +1634,8 @@ }, "value": { "type": "MemberExpression", - "start": 1709, - "end": 1729, + "start": 1695, + "end": 1715, "loc": { "start": { "line": 45, @@ -1651,8 +1648,8 @@ }, "object": { "type": "Identifier", - "start": 1709, - "end": 1716, + "start": 1695, + "end": 1702, "loc": { "start": { "line": 45, @@ -1668,8 +1665,8 @@ }, "property": { "type": "Identifier", - "start": 1717, - "end": 1729, + "start": 1703, + "end": 1715, "loc": { "start": { "line": 45, @@ -1688,8 +1685,8 @@ }, { "type": "ObjectProperty", - "start": 1737, - "end": 1773, + "start": 1723, + "end": 1759, "loc": { "start": { "line": 46, @@ -1705,8 +1702,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1737, - "end": 1750, + "start": 1723, + "end": 1736, "loc": { "start": { "line": 46, @@ -1722,8 +1719,8 @@ }, "value": { "type": "MemberExpression", - "start": 1752, - "end": 1773, + "start": 1738, + "end": 1759, "loc": { "start": { "line": 46, @@ -1736,8 +1733,8 @@ }, "object": { "type": "Identifier", - "start": 1752, - "end": 1759, + "start": 1738, + "end": 1745, "loc": { "start": { "line": 46, @@ -1753,8 +1750,8 @@ }, "property": { "type": "Identifier", - "start": 1760, - "end": 1773, + "start": 1746, + "end": 1759, "loc": { "start": { "line": 46, @@ -1773,8 +1770,8 @@ }, { "type": "ObjectProperty", - "start": 1781, - "end": 1821, + "start": 1767, + "end": 1807, "loc": { "start": { "line": 47, @@ -1790,8 +1787,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1781, - "end": 1796, + "start": 1767, + "end": 1782, "loc": { "start": { "line": 47, @@ -1807,8 +1804,8 @@ }, "value": { "type": "MemberExpression", - "start": 1798, - "end": 1821, + "start": 1784, + "end": 1807, "loc": { "start": { "line": 47, @@ -1821,8 +1818,8 @@ }, "object": { "type": "Identifier", - "start": 1798, - "end": 1805, + "start": 1784, + "end": 1791, "loc": { "start": { "line": 47, @@ -1838,8 +1835,8 @@ }, "property": { "type": "Identifier", - "start": 1806, - "end": 1821, + "start": 1792, + "end": 1807, "loc": { "start": { "line": 47, @@ -1858,8 +1855,8 @@ }, { "type": "ObjectProperty", - "start": 1829, - "end": 1867, + "start": 1815, + "end": 1853, "loc": { "start": { "line": 48, @@ -1875,8 +1872,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1829, - "end": 1843, + "start": 1815, + "end": 1829, "loc": { "start": { "line": 48, @@ -1892,8 +1889,8 @@ }, "value": { "type": "MemberExpression", - "start": 1845, - "end": 1867, + "start": 1831, + "end": 1853, "loc": { "start": { "line": 48, @@ -1906,8 +1903,8 @@ }, "object": { "type": "Identifier", - "start": 1845, - "end": 1852, + "start": 1831, + "end": 1838, "loc": { "start": { "line": 48, @@ -1923,8 +1920,8 @@ }, "property": { "type": "Identifier", - "start": 1853, - "end": 1867, + "start": 1839, + "end": 1853, "loc": { "start": { "line": 48, @@ -1949,8 +1946,8 @@ }, { "type": "IfStatement", - "start": 1880, - "end": 1947, + "start": 1866, + "end": 1933, "loc": { "start": { "line": 50, @@ -1963,8 +1960,8 @@ }, "test": { "type": "BinaryExpression", - "start": 1884, - "end": 1901, + "start": 1870, + "end": 1887, "loc": { "start": { "line": 50, @@ -1977,8 +1974,8 @@ }, "left": { "type": "StringLiteral", - "start": 1884, - "end": 1889, + "start": 1870, + "end": 1875, "loc": { "start": { "line": 50, @@ -1998,8 +1995,8 @@ "operator": "in", "right": { "type": "Identifier", - "start": 1893, - "end": 1901, + "start": 1879, + "end": 1887, "loc": { "start": { "line": 50, @@ -2016,8 +2013,8 @@ }, "consequent": { "type": "ExpressionStatement", - "start": 1903, - "end": 1947, + "start": 1889, + "end": 1933, "loc": { "start": { "line": 50, @@ -2030,8 +2027,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 1903, - "end": 1946, + "start": 1889, + "end": 1932, "loc": { "start": { "line": 50, @@ -2045,8 +2042,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 1903, - "end": 1928, + "start": 1889, + "end": 1914, "loc": { "start": { "line": 50, @@ -2059,8 +2056,8 @@ }, "object": { "type": "Identifier", - "start": 1903, - "end": 1921, + "start": 1889, + "end": 1907, "loc": { "start": { "line": 50, @@ -2076,8 +2073,8 @@ }, "property": { "type": "StringLiteral", - "start": 1922, - "end": 1927, + "start": 1908, + "end": 1913, "loc": { "start": { "line": 50, @@ -2098,8 +2095,8 @@ }, "right": { "type": "MemberExpression", - "start": 1931, - "end": 1946, + "start": 1917, + "end": 1932, "loc": { "start": { "line": 50, @@ -2112,8 +2109,8 @@ }, "object": { "type": "Identifier", - "start": 1931, - "end": 1939, + "start": 1917, + "end": 1925, "loc": { "start": { "line": 50, @@ -2129,8 +2126,8 @@ }, "property": { "type": "StringLiteral", - "start": 1940, - "end": 1945, + "start": 1926, + "end": 1931, "loc": { "start": { "line": 50, @@ -2155,8 +2152,8 @@ }, { "type": "ReturnStatement", - "start": 1952, - "end": 1978, + "start": 1938, + "end": 1964, "loc": { "start": { "line": 51, @@ -2169,8 +2166,8 @@ }, "argument": { "type": "Identifier", - "start": 1959, - "end": 1977, + "start": 1945, + "end": 1963, "loc": { "start": { "line": 51, @@ -2193,8 +2190,8 @@ { "type": "CommentBlock", "value": "*\n * Normalize the specified specimen.\n * @param specimen A specimen to be normalized.\n ", - "start": 1351, - "end": 1449, + "start": 1343, + "end": 1441, "loc": { "start": { "line": 35, @@ -2211,8 +2208,8 @@ { "type": "CommentBlock", "value": "*\n * Parse the provided occurrence ID. The two expected formats are:\n * - 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]'\n * (in which case, we ignore the first two \"components\" here)\n * - '[institutionCode]:[collectionCode]:[catalogNumber]'\n ", - "start": 1986, - "end": 2267, + "start": 1972, + "end": 2253, "loc": { "start": { "line": 54, @@ -2228,8 +2225,8 @@ }, { "type": "ClassMethod", - "start": 2270, - "end": 4105, + "start": 2256, + "end": 4073, "loc": { "start": { "line": 60, @@ -2244,8 +2241,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2277, - "end": 2293, + "start": 2263, + "end": 2279, "loc": { "start": { "line": 60, @@ -2267,8 +2264,8 @@ "params": [ { "type": "Identifier", - "start": 2294, - "end": 2306, + "start": 2280, + "end": 2292, "loc": { "start": { "line": 60, @@ -2284,8 +2281,8 @@ }, { "type": "AssignmentPattern", - "start": 2308, - "end": 2343, + "start": 2294, + "end": 2329, "loc": { "start": { "line": 60, @@ -2298,8 +2295,8 @@ }, "left": { "type": "Identifier", - "start": 2308, - "end": 2321, + "start": 2294, + "end": 2307, "loc": { "start": { "line": 60, @@ -2315,8 +2312,8 @@ }, "right": { "type": "StringLiteral", - "start": 2324, - "end": 2343, + "start": 2310, + "end": 2329, "loc": { "start": { "line": 60, @@ -2337,8 +2334,8 @@ ], "body": { "type": "BlockStatement", - "start": 2345, - "end": 4105, + "start": 2331, + "end": 4073, "loc": { "start": { "line": 60, @@ -2352,8 +2349,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 2417, - "end": 2444, + "start": 2403, + "end": 2430, "loc": { "start": { "line": 62, @@ -2367,8 +2364,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 2421, - "end": 2443, + "start": 2407, + "end": 2429, "loc": { "start": { "line": 62, @@ -2381,8 +2378,8 @@ }, "id": { "type": "Identifier", - "start": 2421, - "end": 2428, + "start": 2407, + "end": 2414, "loc": { "start": { "line": 62, @@ -2399,8 +2396,8 @@ }, "init": { "type": "Identifier", - "start": 2431, - "end": 2443, + "start": 2417, + "end": 2429, "loc": { "start": { "line": 62, @@ -2422,8 +2419,8 @@ { "type": "CommentLine", "value": " Copy the occurrence ID so we can truncate it if necessary.", - "start": 2351, - "end": 2412, + "start": 2337, + "end": 2398, "loc": { "start": { "line": 61, @@ -2439,8 +2436,8 @@ }, { "type": "IfStatement", - "start": 2449, - "end": 2518, + "start": 2435, + "end": 2507, "loc": { "start": { "line": 63, @@ -2448,13 +2445,13 @@ }, "end": { "line": 63, - "column": 73 + "column": 76 } }, "test": { "type": "CallExpression", - "start": 2453, - "end": 2487, + "start": 2439, + "end": 2473, "loc": { "start": { "line": 63, @@ -2467,8 +2464,8 @@ }, "callee": { "type": "MemberExpression", - "start": 2453, - "end": 2471, + "start": 2439, + "end": 2457, "loc": { "start": { "line": 63, @@ -2481,8 +2478,8 @@ }, "object": { "type": "Identifier", - "start": 2453, - "end": 2460, + "start": 2439, + "end": 2446, "loc": { "start": { "line": 63, @@ -2498,8 +2495,8 @@ }, "property": { "type": "Identifier", - "start": 2461, - "end": 2471, + "start": 2447, + "end": 2457, "loc": { "start": { "line": 63, @@ -2518,8 +2515,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 2472, - "end": 2486, + "start": 2458, + "end": 2472, "loc": { "start": { "line": 63, @@ -2540,8 +2537,8 @@ }, "consequent": { "type": "ExpressionStatement", - "start": 2489, - "end": 2518, + "start": 2475, + "end": 2507, "loc": { "start": { "line": 63, @@ -2549,13 +2546,13 @@ }, "end": { "line": 63, - "column": 73 + "column": 76 } }, "expression": { "type": "AssignmentExpression", - "start": 2489, - "end": 2517, + "start": 2475, + "end": 2506, "loc": { "start": { "line": 63, @@ -2563,14 +2560,14 @@ }, "end": { "line": 63, - "column": 72 + "column": 75 } }, "operator": "=", "left": { "type": "Identifier", - "start": 2489, - "end": 2496, + "start": 2475, + "end": 2482, "loc": { "start": { "line": 63, @@ -2586,8 +2583,8 @@ }, "right": { "type": "CallExpression", - "start": 2499, - "end": 2517, + "start": 2485, + "end": 2506, "loc": { "start": { "line": 63, @@ -2595,13 +2592,13 @@ }, "end": { "line": 63, - "column": 72 + "column": 75 } }, "callee": { "type": "MemberExpression", - "start": 2499, - "end": 2513, + "start": 2485, + "end": 2502, "loc": { "start": { "line": 63, @@ -2609,13 +2606,13 @@ }, "end": { "line": 63, - "column": 68 + "column": 71 } }, "object": { "type": "Identifier", - "start": 2499, - "end": 2506, + "start": 2485, + "end": 2492, "loc": { "start": { "line": 63, @@ -2631,8 +2628,8 @@ }, "property": { "type": "Identifier", - "start": 2507, - "end": 2513, + "start": 2493, + "end": 2502, "loc": { "start": { "line": 63, @@ -2640,27 +2637,27 @@ }, "end": { "line": 63, - "column": 68 + "column": 71 }, - "identifierName": "substr" + "identifierName": "substring" }, - "name": "substr" + "name": "substring" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", - "start": 2514, - "end": 2516, + "start": 2503, + "end": 2505, "loc": { "start": { "line": 63, - "column": 69 + "column": 72 }, "end": { "line": 63, - "column": 71 + "column": 74 } }, "extra": { @@ -2679,8 +2676,8 @@ { "type": "CommentLine", "value": " Prepare the specimen.", - "start": 2524, - "end": 2548, + "start": 2513, + "end": 2537, "loc": { "start": { "line": 65, @@ -2696,8 +2693,8 @@ }, { "type": "VariableDeclaration", - "start": 2553, - "end": 2695, + "start": 2542, + "end": 2663, "loc": { "start": { "line": 66, @@ -2711,8 +2708,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 2559, - "end": 2694, + "start": 2548, + "end": 2662, "loc": { "start": { "line": 66, @@ -2725,8 +2722,8 @@ }, "id": { "type": "Identifier", - "start": 2559, - "end": 2567, + "start": 2548, + "end": 2556, "loc": { "start": { "line": 66, @@ -2743,8 +2740,8 @@ }, "init": { "type": "ObjectExpression", - "start": 2570, - "end": 2694, + "start": 2559, + "end": 2662, "loc": { "start": { "line": 66, @@ -2758,8 +2755,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 2578, - "end": 2616, + "start": 2567, + "end": 2605, "loc": { "start": { "line": 67, @@ -2775,8 +2772,8 @@ "computed": false, "key": { "type": "StringLiteral", - "start": 2578, - "end": 2585, + "start": 2567, + "end": 2574, "loc": { "start": { "line": 67, @@ -2795,8 +2792,8 @@ }, "value": { "type": "MemberExpression", - "start": 2587, - "end": 2616, + "start": 2576, + "end": 2605, "loc": { "start": { "line": 67, @@ -2809,8 +2806,8 @@ }, "object": { "type": "Identifier", - "start": 2587, - "end": 2602, + "start": 2576, + "end": 2591, "loc": { "start": { "line": 67, @@ -2826,8 +2823,8 @@ }, "property": { "type": "Identifier", - "start": 2603, - "end": 2616, + "start": 2592, + "end": 2605, "loc": { "start": { "line": 67, @@ -2846,8 +2843,8 @@ }, { "type": "ObjectProperty", - "start": 2624, - "end": 2658, + "start": 2613, + "end": 2626, "loc": { "start": { "line": 68, @@ -2855,16 +2852,16 @@ }, "end": { "line": 68, - "column": 40 + "column": 19 } }, "method": false, - "shorthand": false, + "shorthand": true, "computed": false, "key": { - "type": "StringLiteral", - "start": 2624, - "end": 2643, + "type": "Identifier", + "start": 2613, + "end": 2626, "loc": { "start": { "line": 68, @@ -2872,37 +2869,37 @@ }, "end": { "line": 68, - "column": 25 - } - }, - "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "column": 19 + }, + "identifierName": "basisOfRecord" }, - "value": "dwc:basisOfRecord" + "name": "basisOfRecord" }, "value": { "type": "Identifier", - "start": 2645, - "end": 2658, + "start": 2613, + "end": 2626, "loc": { "start": { "line": 68, - "column": 27 + "column": 6 }, "end": { "line": 68, - "column": 40 + "column": 19 }, "identifierName": "basisOfRecord" }, "name": "basisOfRecord" + }, + "extra": { + "shorthand": true } }, { "type": "ObjectProperty", - "start": 2666, - "end": 2687, + "start": 2634, + "end": 2655, "loc": { "start": { "line": 69, @@ -2918,8 +2915,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2666, - "end": 2678, + "start": 2634, + "end": 2646, "loc": { "start": { "line": 69, @@ -2935,8 +2932,8 @@ }, "value": { "type": "Identifier", - "start": 2680, - "end": 2687, + "start": 2648, + "end": 2655, "loc": { "start": { "line": 69, @@ -2961,8 +2958,8 @@ { "type": "CommentLine", "value": " Prepare the specimen.", - "start": 2524, - "end": 2548, + "start": 2513, + "end": 2537, "loc": { "start": { "line": 65, @@ -2979,8 +2976,8 @@ { "type": "CommentLine", "value": " Look for certain prefixes that suggest that we've been passed a URN or", - "start": 2701, - "end": 2774, + "start": 2669, + "end": 2742, "loc": { "start": { "line": 72, @@ -2995,8 +2992,8 @@ { "type": "CommentLine", "value": " URL instead. If so, don't do any further processing!", - "start": 2779, - "end": 2834, + "start": 2747, + "end": 2802, "loc": { "start": { "line": 73, @@ -3012,8 +3009,8 @@ }, { "type": "VariableDeclaration", - "start": 2839, - "end": 2971, + "start": 2807, + "end": 2939, "loc": { "start": { "line": 74, @@ -3027,8 +3024,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 2845, - "end": 2970, + "start": 2813, + "end": 2938, "loc": { "start": { "line": 74, @@ -3041,8 +3038,8 @@ }, "id": { "type": "Identifier", - "start": 2845, - "end": 2861, + "start": 2813, + "end": 2829, "loc": { "start": { "line": 74, @@ -3059,8 +3056,8 @@ }, "init": { "type": "ArrayExpression", - "start": 2864, - "end": 2970, + "start": 2832, + "end": 2938, "loc": { "start": { "line": 74, @@ -3074,8 +3071,8 @@ "elements": [ { "type": "StringLiteral", - "start": 2872, - "end": 2881, + "start": 2840, + "end": 2849, "loc": { "start": { "line": 75, @@ -3094,8 +3091,8 @@ }, { "type": "StringLiteral", - "start": 2889, - "end": 2899, + "start": 2857, + "end": 2867, "loc": { "start": { "line": 76, @@ -3114,8 +3111,8 @@ }, { "type": "StringLiteral", - "start": 2907, - "end": 2915, + "start": 2875, + "end": 2883, "loc": { "start": { "line": 77, @@ -3134,8 +3131,8 @@ }, { "type": "StringLiteral", - "start": 2923, - "end": 2932, + "start": 2891, + "end": 2900, "loc": { "start": { "line": 78, @@ -3154,8 +3151,8 @@ }, { "type": "StringLiteral", - "start": 2940, - "end": 2949, + "start": 2908, + "end": 2917, "loc": { "start": { "line": 79, @@ -3174,8 +3171,8 @@ }, { "type": "StringLiteral", - "start": 2957, - "end": 2963, + "start": 2925, + "end": 2931, "loc": { "start": { "line": 80, @@ -3202,8 +3199,8 @@ { "type": "CommentLine", "value": " Look for certain prefixes that suggest that we've been passed a URN or", - "start": 2701, - "end": 2774, + "start": 2669, + "end": 2742, "loc": { "start": { "line": 72, @@ -3218,8 +3215,8 @@ { "type": "CommentLine", "value": " URL instead. If so, don't do any further processing!", - "start": 2779, - "end": 2834, + "start": 2747, + "end": 2802, "loc": { "start": { "line": 73, @@ -3235,8 +3232,8 @@ }, { "type": "IfStatement", - "start": 2976, - "end": 3098, + "start": 2944, + "end": 3066, "loc": { "start": { "line": 82, @@ -3249,8 +3246,8 @@ }, "test": { "type": "BinaryExpression", - "start": 2980, - "end": 3066, + "start": 2948, + "end": 3034, "loc": { "start": { "line": 82, @@ -3263,8 +3260,8 @@ }, "left": { "type": "MemberExpression", - "start": 2980, - "end": 3062, + "start": 2948, + "end": 3030, "loc": { "start": { "line": 82, @@ -3277,8 +3274,8 @@ }, "object": { "type": "CallExpression", - "start": 2980, - "end": 3055, + "start": 2948, + "end": 3023, "loc": { "start": { "line": 82, @@ -3291,8 +3288,8 @@ }, "callee": { "type": "MemberExpression", - "start": 2980, - "end": 3003, + "start": 2948, + "end": 2971, "loc": { "start": { "line": 82, @@ -3305,8 +3302,8 @@ }, "object": { "type": "Identifier", - "start": 2980, - "end": 2996, + "start": 2948, + "end": 2964, "loc": { "start": { "line": 82, @@ -3322,8 +3319,8 @@ }, "property": { "type": "Identifier", - "start": 2997, - "end": 3003, + "start": 2965, + "end": 2971, "loc": { "start": { "line": 82, @@ -3342,8 +3339,8 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 3004, - "end": 3054, + "start": 2972, + "end": 3022, "loc": { "start": { "line": 82, @@ -3361,8 +3358,8 @@ "params": [ { "type": "Identifier", - "start": 3004, - "end": 3010, + "start": 2972, + "end": 2978, "loc": { "start": { "line": 82, @@ -3379,8 +3376,8 @@ ], "body": { "type": "CallExpression", - "start": 3014, - "end": 3054, + "start": 2982, + "end": 3022, "loc": { "start": { "line": 82, @@ -3393,8 +3390,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3014, - "end": 3046, + "start": 2982, + "end": 3014, "loc": { "start": { "line": 82, @@ -3407,8 +3404,8 @@ }, "object": { "type": "CallExpression", - "start": 3014, - "end": 3035, + "start": 2982, + "end": 3003, "loc": { "start": { "line": 82, @@ -3421,8 +3418,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3014, - "end": 3033, + "start": 2982, + "end": 3001, "loc": { "start": { "line": 82, @@ -3435,8 +3432,8 @@ }, "object": { "type": "Identifier", - "start": 3014, - "end": 3021, + "start": 2982, + "end": 2989, "loc": { "start": { "line": 82, @@ -3452,8 +3449,8 @@ }, "property": { "type": "Identifier", - "start": 3022, - "end": 3033, + "start": 2990, + "end": 3001, "loc": { "start": { "line": 82, @@ -3473,8 +3470,8 @@ }, "property": { "type": "Identifier", - "start": 3036, - "end": 3046, + "start": 3004, + "end": 3014, "loc": { "start": { "line": 82, @@ -3493,8 +3490,8 @@ "arguments": [ { "type": "Identifier", - "start": 3047, - "end": 3053, + "start": 3015, + "end": 3021, "loc": { "start": { "line": 82, @@ -3515,8 +3512,8 @@ }, "property": { "type": "Identifier", - "start": 3056, - "end": 3062, + "start": 3024, + "end": 3030, "loc": { "start": { "line": 82, @@ -3535,8 +3532,8 @@ "operator": ">", "right": { "type": "NumericLiteral", - "start": 3065, - "end": 3066, + "start": 3033, + "end": 3034, "loc": { "start": { "line": 82, @@ -3556,8 +3553,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3068, - "end": 3098, + "start": 3036, + "end": 3066, "loc": { "start": { "line": 82, @@ -3571,8 +3568,8 @@ "body": [ { "type": "ReturnStatement", - "start": 3076, - "end": 3092, + "start": 3044, + "end": 3060, "loc": { "start": { "line": 83, @@ -3585,8 +3582,8 @@ }, "argument": { "type": "Identifier", - "start": 3083, - "end": 3091, + "start": 3051, + "end": 3059, "loc": { "start": { "line": 83, @@ -3610,8 +3607,8 @@ { "type": "CommentLine", "value": " Parsing an occurrence ID takes some time, so we should memoize it.", - "start": 3104, - "end": 3173, + "start": 3072, + "end": 3141, "loc": { "start": { "line": 86, @@ -3627,8 +3624,8 @@ }, { "type": "IfStatement", - "start": 3178, - "end": 3338, + "start": 3146, + "end": 3306, "loc": { "start": { "line": 87, @@ -3641,8 +3638,8 @@ }, "test": { "type": "CallExpression", - "start": 3182, - "end": 3248, + "start": 3150, + "end": 3216, "loc": { "start": { "line": 87, @@ -3655,8 +3652,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3182, - "end": 3202, + "start": 3150, + "end": 3170, "loc": { "start": { "line": 87, @@ -3669,8 +3666,8 @@ }, "object": { "type": "Identifier", - "start": 3182, - "end": 3198, + "start": 3150, + "end": 3166, "loc": { "start": { "line": 87, @@ -3687,8 +3684,8 @@ }, "property": { "type": "Identifier", - "start": 3199, - "end": 3202, + "start": 3167, + "end": 3170, "loc": { "start": { "line": 87, @@ -3708,8 +3705,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 3203, - "end": 3238, + "start": 3171, + "end": 3206, "loc": { "start": { "line": 87, @@ -3728,8 +3725,8 @@ }, { "type": "Identifier", - "start": 3240, - "end": 3247, + "start": 3208, + "end": 3215, "loc": { "start": { "line": 87, @@ -3748,8 +3745,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3250, - "end": 3338, + "start": 3218, + "end": 3306, "loc": { "start": { "line": 87, @@ -3763,8 +3760,8 @@ "body": [ { "type": "ReturnStatement", - "start": 3258, - "end": 3332, + "start": 3226, + "end": 3300, "loc": { "start": { "line": 88, @@ -3777,8 +3774,8 @@ }, "argument": { "type": "CallExpression", - "start": 3265, - "end": 3331, + "start": 3233, + "end": 3299, "loc": { "start": { "line": 88, @@ -3791,8 +3788,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3265, - "end": 3285, + "start": 3233, + "end": 3253, "loc": { "start": { "line": 88, @@ -3805,8 +3802,8 @@ }, "object": { "type": "Identifier", - "start": 3265, - "end": 3281, + "start": 3233, + "end": 3249, "loc": { "start": { "line": 88, @@ -3822,8 +3819,8 @@ }, "property": { "type": "Identifier", - "start": 3282, - "end": 3285, + "start": 3250, + "end": 3253, "loc": { "start": { "line": 88, @@ -3842,8 +3839,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 3286, - "end": 3321, + "start": 3254, + "end": 3289, "loc": { "start": { "line": 88, @@ -3862,8 +3859,8 @@ }, { "type": "Identifier", - "start": 3323, - "end": 3330, + "start": 3291, + "end": 3298, "loc": { "start": { "line": 88, @@ -3889,8 +3886,8 @@ { "type": "CommentLine", "value": " Parsing an occurrence ID takes some time, so we should memoize it.", - "start": 3104, - "end": 3173, + "start": 3072, + "end": 3141, "loc": { "start": { "line": 86, @@ -3907,8 +3904,8 @@ { "type": "CommentLine", "value": " Split the occurrence ID into components, and store them in the appropriate fields.", - "start": 3344, - "end": 3429, + "start": 3312, + "end": 3397, "loc": { "start": { "line": 91, @@ -3924,8 +3921,8 @@ }, { "type": "VariableDeclaration", - "start": 3434, - "end": 3467, + "start": 3402, + "end": 3435, "loc": { "start": { "line": 92, @@ -3939,8 +3936,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 3440, - "end": 3466, + "start": 3408, + "end": 3434, "loc": { "start": { "line": 92, @@ -3953,8 +3950,8 @@ }, "id": { "type": "Identifier", - "start": 3440, - "end": 3445, + "start": 3408, + "end": 3413, "loc": { "start": { "line": 92, @@ -3971,8 +3968,8 @@ }, "init": { "type": "CallExpression", - "start": 3448, - "end": 3466, + "start": 3416, + "end": 3434, "loc": { "start": { "line": 92, @@ -3985,8 +3982,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3448, - "end": 3461, + "start": 3416, + "end": 3429, "loc": { "start": { "line": 92, @@ -3999,8 +3996,8 @@ }, "object": { "type": "Identifier", - "start": 3448, - "end": 3455, + "start": 3416, + "end": 3423, "loc": { "start": { "line": 92, @@ -4016,8 +4013,8 @@ }, "property": { "type": "Identifier", - "start": 3456, - "end": 3461, + "start": 3424, + "end": 3429, "loc": { "start": { "line": 92, @@ -4036,8 +4033,8 @@ "arguments": [ { "type": "RegExpLiteral", - "start": 3462, - "end": 3465, + "start": 3430, + "end": 3433, "loc": { "start": { "line": 92, @@ -4064,8 +4061,8 @@ { "type": "CommentLine", "value": " Split the occurrence ID into components, and store them in the appropriate fields.", - "start": 3344, - "end": 3429, + "start": 3312, + "end": 3397, "loc": { "start": { "line": 91, @@ -4081,8 +4078,8 @@ }, { "type": "IfStatement", - "start": 3472, - "end": 3997, + "start": 3440, + "end": 3965, "loc": { "start": { "line": 93, @@ -4095,8 +4092,8 @@ }, "test": { "type": "BinaryExpression", - "start": 3476, - "end": 3494, + "start": 3444, + "end": 3462, "loc": { "start": { "line": 93, @@ -4109,8 +4106,8 @@ }, "left": { "type": "MemberExpression", - "start": 3476, - "end": 3488, + "start": 3444, + "end": 3456, "loc": { "start": { "line": 93, @@ -4123,8 +4120,8 @@ }, "object": { "type": "Identifier", - "start": 3476, - "end": 3481, + "start": 3444, + "end": 3449, "loc": { "start": { "line": 93, @@ -4140,8 +4137,8 @@ }, "property": { "type": "Identifier", - "start": 3482, - "end": 3488, + "start": 3450, + "end": 3456, "loc": { "start": { "line": 93, @@ -4160,8 +4157,8 @@ "operator": "===", "right": { "type": "NumericLiteral", - "start": 3493, - "end": 3494, + "start": 3461, + "end": 3462, "loc": { "start": { "line": 93, @@ -4181,8 +4178,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3496, - "end": 3636, + "start": 3464, + "end": 3604, "loc": { "start": { "line": 93, @@ -4196,8 +4193,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 3597, - "end": 3630, + "start": 3565, + "end": 3598, "loc": { "start": { "line": 96, @@ -4210,8 +4207,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3597, - "end": 3629, + "start": 3565, + "end": 3597, "loc": { "start": { "line": 96, @@ -4225,8 +4222,8 @@ "operator": "=", "left": { "type": "ArrayPattern", - "start": 3597, - "end": 3621, + "start": 3565, + "end": 3589, "loc": { "start": { "line": 96, @@ -4240,8 +4237,8 @@ "elements": [ { "type": "MemberExpression", - "start": 3598, - "end": 3620, + "start": 3566, + "end": 3588, "loc": { "start": { "line": 96, @@ -4254,8 +4251,8 @@ }, "object": { "type": "Identifier", - "start": 3598, - "end": 3606, + "start": 3566, + "end": 3574, "loc": { "start": { "line": 96, @@ -4272,8 +4269,8 @@ }, "property": { "type": "Identifier", - "start": 3607, - "end": 3620, + "start": 3575, + "end": 3588, "loc": { "start": { "line": 96, @@ -4295,8 +4292,8 @@ }, "right": { "type": "Identifier", - "start": 3624, - "end": 3629, + "start": 3592, + "end": 3597, "loc": { "start": { "line": 96, @@ -4316,8 +4313,8 @@ { "type": "CommentLine", "value": " specimen.institutionCode = undefined;", - "start": 3504, - "end": 3544, + "start": 3472, + "end": 3512, "loc": { "start": { "line": 94, @@ -4332,8 +4329,8 @@ { "type": "CommentLine", "value": " specimen.collectionCode = undefined;", - "start": 3551, - "end": 3590, + "start": 3519, + "end": 3558, "loc": { "start": { "line": 95, @@ -4352,8 +4349,8 @@ }, "alternate": { "type": "IfStatement", - "start": 3642, - "end": 3997, + "start": 3610, + "end": 3965, "loc": { "start": { "line": 97, @@ -4366,8 +4363,8 @@ }, "test": { "type": "BinaryExpression", - "start": 3646, - "end": 3664, + "start": 3614, + "end": 3632, "loc": { "start": { "line": 97, @@ -4380,8 +4377,8 @@ }, "left": { "type": "MemberExpression", - "start": 3646, - "end": 3658, + "start": 3614, + "end": 3626, "loc": { "start": { "line": 97, @@ -4394,8 +4391,8 @@ }, "object": { "type": "Identifier", - "start": 3646, - "end": 3651, + "start": 3614, + "end": 3619, "loc": { "start": { "line": 97, @@ -4411,8 +4408,8 @@ }, "property": { "type": "Identifier", - "start": 3652, - "end": 3658, + "start": 3620, + "end": 3626, "loc": { "start": { "line": 97, @@ -4431,8 +4428,8 @@ "operator": "===", "right": { "type": "NumericLiteral", - "start": 3663, - "end": 3664, + "start": 3631, + "end": 3632, "loc": { "start": { "line": 97, @@ -4452,8 +4449,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3666, - "end": 3739, + "start": 3634, + "end": 3707, "loc": { "start": { "line": 97, @@ -4467,8 +4464,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 3674, - "end": 3733, + "start": 3642, + "end": 3701, "loc": { "start": { "line": 98, @@ -4481,8 +4478,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3674, - "end": 3732, + "start": 3642, + "end": 3700, "loc": { "start": { "line": 98, @@ -4496,8 +4493,8 @@ "operator": "=", "left": { "type": "ArrayPattern", - "start": 3674, - "end": 3724, + "start": 3642, + "end": 3692, "loc": { "start": { "line": 98, @@ -4511,8 +4508,8 @@ "elements": [ { "type": "MemberExpression", - "start": 3675, - "end": 3699, + "start": 3643, + "end": 3667, "loc": { "start": { "line": 98, @@ -4525,8 +4522,8 @@ }, "object": { "type": "Identifier", - "start": 3675, - "end": 3683, + "start": 3643, + "end": 3651, "loc": { "start": { "line": 98, @@ -4542,8 +4539,8 @@ }, "property": { "type": "Identifier", - "start": 3684, - "end": 3699, + "start": 3652, + "end": 3667, "loc": { "start": { "line": 98, @@ -4561,8 +4558,8 @@ }, { "type": "MemberExpression", - "start": 3701, - "end": 3723, + "start": 3669, + "end": 3691, "loc": { "start": { "line": 98, @@ -4575,8 +4572,8 @@ }, "object": { "type": "Identifier", - "start": 3701, - "end": 3709, + "start": 3669, + "end": 3677, "loc": { "start": { "line": 98, @@ -4592,8 +4589,8 @@ }, "property": { "type": "Identifier", - "start": 3710, - "end": 3723, + "start": 3678, + "end": 3691, "loc": { "start": { "line": 98, @@ -4613,8 +4610,8 @@ }, "right": { "type": "Identifier", - "start": 3727, - "end": 3732, + "start": 3695, + "end": 3700, "loc": { "start": { "line": 98, @@ -4635,8 +4632,8 @@ }, "alternate": { "type": "IfStatement", - "start": 3745, - "end": 3997, + "start": 3713, + "end": 3965, "loc": { "start": { "line": 99, @@ -4649,8 +4646,8 @@ }, "test": { "type": "BinaryExpression", - "start": 3749, - "end": 3766, + "start": 3717, + "end": 3734, "loc": { "start": { "line": 99, @@ -4663,8 +4660,8 @@ }, "left": { "type": "MemberExpression", - "start": 3749, - "end": 3761, + "start": 3717, + "end": 3729, "loc": { "start": { "line": 99, @@ -4677,8 +4674,8 @@ }, "object": { "type": "Identifier", - "start": 3749, - "end": 3754, + "start": 3717, + "end": 3722, "loc": { "start": { "line": 99, @@ -4694,8 +4691,8 @@ }, "property": { "type": "Identifier", - "start": 3755, - "end": 3761, + "start": 3723, + "end": 3729, "loc": { "start": { "line": 99, @@ -4714,8 +4711,8 @@ "operator": ">=", "right": { "type": "NumericLiteral", - "start": 3765, - "end": 3766, + "start": 3733, + "end": 3734, "loc": { "start": { "line": 99, @@ -4735,8 +4732,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3768, - "end": 3997, + "start": 3736, + "end": 3965, "loc": { "start": { "line": 99, @@ -4750,8 +4747,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 3776, - "end": 3802, + "start": 3744, + "end": 3770, "loc": { "start": { "line": 100, @@ -4765,8 +4762,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 3780, - "end": 3801, + "start": 3748, + "end": 3769, "loc": { "start": { "line": 100, @@ -4779,8 +4776,8 @@ }, "id": { "type": "Identifier", - "start": 3780, - "end": 3796, + "start": 3748, + "end": 3764, "loc": { "start": { "line": 100, @@ -4796,8 +4793,8 @@ }, "init": { "type": "ArrayExpression", - "start": 3799, - "end": 3801, + "start": 3767, + "end": 3769, "loc": { "start": { "line": 100, @@ -4817,8 +4814,8 @@ { "type": "CommentLine", "value": " Store all split catalog number values.", - "start": 3803, - "end": 3844, + "start": 3771, + "end": 3812, "loc": { "start": { "line": 100, @@ -4834,8 +4831,8 @@ }, { "type": "ExpressionStatement", - "start": 3851, - "end": 3932, + "start": 3819, + "end": 3900, "loc": { "start": { "line": 101, @@ -4848,8 +4845,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3851, - "end": 3931, + "start": 3819, + "end": 3899, "loc": { "start": { "line": 101, @@ -4863,8 +4860,8 @@ "operator": "=", "left": { "type": "ArrayPattern", - "start": 3851, - "end": 3923, + "start": 3819, + "end": 3891, "loc": { "start": { "line": 101, @@ -4878,8 +4875,8 @@ "elements": [ { "type": "MemberExpression", - "start": 3852, - "end": 3876, + "start": 3820, + "end": 3844, "loc": { "start": { "line": 101, @@ -4892,8 +4889,8 @@ }, "object": { "type": "Identifier", - "start": 3852, - "end": 3860, + "start": 3820, + "end": 3828, "loc": { "start": { "line": 101, @@ -4910,8 +4907,8 @@ }, "property": { "type": "Identifier", - "start": 3861, - "end": 3876, + "start": 3829, + "end": 3844, "loc": { "start": { "line": 101, @@ -4930,8 +4927,8 @@ }, { "type": "MemberExpression", - "start": 3878, - "end": 3901, + "start": 3846, + "end": 3869, "loc": { "start": { "line": 101, @@ -4944,8 +4941,8 @@ }, "object": { "type": "Identifier", - "start": 3878, - "end": 3886, + "start": 3846, + "end": 3854, "loc": { "start": { "line": 101, @@ -4961,8 +4958,8 @@ }, "property": { "type": "Identifier", - "start": 3887, - "end": 3901, + "start": 3855, + "end": 3869, "loc": { "start": { "line": 101, @@ -4980,8 +4977,8 @@ }, { "type": "RestElement", - "start": 3903, - "end": 3922, + "start": 3871, + "end": 3890, "loc": { "start": { "line": 101, @@ -4994,8 +4991,8 @@ }, "argument": { "type": "Identifier", - "start": 3906, - "end": 3922, + "start": 3874, + "end": 3890, "loc": { "start": { "line": 101, @@ -5015,8 +5012,8 @@ }, "right": { "type": "Identifier", - "start": 3926, - "end": 3931, + "start": 3894, + "end": 3899, "loc": { "start": { "line": 101, @@ -5036,8 +5033,8 @@ { "type": "CommentLine", "value": " Store all split catalog number values.", - "start": 3803, - "end": 3844, + "start": 3771, + "end": 3812, "loc": { "start": { "line": 100, @@ -5053,8 +5050,8 @@ }, { "type": "ExpressionStatement", - "start": 3939, - "end": 3991, + "start": 3907, + "end": 3959, "loc": { "start": { "line": 102, @@ -5067,8 +5064,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3939, - "end": 3990, + "start": 3907, + "end": 3958, "loc": { "start": { "line": 102, @@ -5082,8 +5079,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 3939, - "end": 3961, + "start": 3907, + "end": 3929, "loc": { "start": { "line": 102, @@ -5096,8 +5093,8 @@ }, "object": { "type": "Identifier", - "start": 3939, - "end": 3947, + "start": 3907, + "end": 3915, "loc": { "start": { "line": 102, @@ -5113,8 +5110,8 @@ }, "property": { "type": "Identifier", - "start": 3948, - "end": 3961, + "start": 3916, + "end": 3929, "loc": { "start": { "line": 102, @@ -5132,8 +5129,8 @@ }, "right": { "type": "CallExpression", - "start": 3964, - "end": 3990, + "start": 3932, + "end": 3958, "loc": { "start": { "line": 102, @@ -5146,8 +5143,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3964, - "end": 3985, + "start": 3932, + "end": 3953, "loc": { "start": { "line": 102, @@ -5160,8 +5157,8 @@ }, "object": { "type": "Identifier", - "start": 3964, - "end": 3980, + "start": 3932, + "end": 3948, "loc": { "start": { "line": 102, @@ -5177,8 +5174,8 @@ }, "property": { "type": "Identifier", - "start": 3981, - "end": 3985, + "start": 3949, + "end": 3953, "loc": { "start": { "line": 102, @@ -5197,8 +5194,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 3986, - "end": 3989, + "start": 3954, + "end": 3957, "loc": { "start": { "line": 102, @@ -5228,8 +5225,8 @@ }, { "type": "ExpressionStatement", - "start": 4003, - "end": 4080, + "start": 3971, + "end": 4048, "loc": { "start": { "line": 105, @@ -5242,8 +5239,8 @@ }, "expression": { "type": "CallExpression", - "start": 4003, - "end": 4079, + "start": 3971, + "end": 4047, "loc": { "start": { "line": 105, @@ -5256,8 +5253,8 @@ }, "callee": { "type": "MemberExpression", - "start": 4003, - "end": 4023, + "start": 3971, + "end": 3991, "loc": { "start": { "line": 105, @@ -5270,8 +5267,8 @@ }, "object": { "type": "Identifier", - "start": 4003, - "end": 4019, + "start": 3971, + "end": 3987, "loc": { "start": { "line": 105, @@ -5287,8 +5284,8 @@ }, "property": { "type": "Identifier", - "start": 4020, - "end": 4023, + "start": 3988, + "end": 3991, "loc": { "start": { "line": 105, @@ -5307,8 +5304,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 4024, - "end": 4059, + "start": 3992, + "end": 4027, "loc": { "start": { "line": 105, @@ -5327,8 +5324,8 @@ }, { "type": "Identifier", - "start": 4061, - "end": 4068, + "start": 4029, + "end": 4036, "loc": { "start": { "line": 105, @@ -5344,8 +5341,8 @@ }, { "type": "Identifier", - "start": 4070, - "end": 4078, + "start": 4038, + "end": 4046, "loc": { "start": { "line": 105, @@ -5364,8 +5361,8 @@ }, { "type": "ReturnStatement", - "start": 4085, - "end": 4101, + "start": 4053, + "end": 4069, "loc": { "start": { "line": 106, @@ -5378,8 +5375,8 @@ }, "argument": { "type": "Identifier", - "start": 4092, - "end": 4100, + "start": 4060, + "end": 4068, "loc": { "start": { "line": 106, @@ -5402,8 +5399,8 @@ { "type": "CommentBlock", "value": "*\n * Parse the provided occurrence ID. The two expected formats are:\n * - 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]'\n * (in which case, we ignore the first two \"components\" here)\n * - '[institutionCode]:[collectionCode]:[catalogNumber]'\n ", - "start": 1986, - "end": 2267, + "start": 1972, + "end": 2253, "loc": { "start": { "line": 54, @@ -5420,8 +5417,8 @@ { "type": "CommentBlock", "value": "*\n * Get the catalogNumber if present.\n ", - "start": 4109, - "end": 4157, + "start": 4077, + "end": 4125, "loc": { "start": { "line": 109, @@ -5437,8 +5434,8 @@ }, { "type": "ClassMethod", - "start": 4160, - "end": 4675, + "start": 4128, + "end": 4643, "loc": { "start": { "line": 112, @@ -5453,8 +5450,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4164, - "end": 4177, + "start": 4132, + "end": 4145, "loc": { "start": { "line": 112, @@ -5476,8 +5473,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 4180, - "end": 4675, + "start": 4148, + "end": 4643, "loc": { "start": { "line": 112, @@ -5491,8 +5488,8 @@ "body": [ { "type": "IfStatement", - "start": 4253, - "end": 4329, + "start": 4221, + "end": 4297, "loc": { "start": { "line": 114, @@ -5505,8 +5502,8 @@ }, "test": { "type": "CallExpression", - "start": 4257, - "end": 4292, + "start": 4225, + "end": 4260, "loc": { "start": { "line": 114, @@ -5519,8 +5516,8 @@ }, "callee": { "type": "Identifier", - "start": 4257, - "end": 4260, + "start": 4225, + "end": 4228, "loc": { "start": { "line": 114, @@ -5538,8 +5535,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 4261, - "end": 4274, + "start": 4229, + "end": 4242, "loc": { "start": { "line": 114, @@ -5552,8 +5549,8 @@ }, "object": { "type": "ThisExpression", - "start": 4261, - "end": 4265, + "start": 4229, + "end": 4233, "loc": { "start": { "line": 114, @@ -5567,8 +5564,8 @@ }, "property": { "type": "Identifier", - "start": 4266, - "end": 4274, + "start": 4234, + "end": 4242, "loc": { "start": { "line": 114, @@ -5586,8 +5583,8 @@ }, { "type": "StringLiteral", - "start": 4276, - "end": 4291, + "start": 4244, + "end": 4259, "loc": { "start": { "line": 114, @@ -5609,8 +5606,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 4294, - "end": 4329, + "start": 4262, + "end": 4297, "loc": { "start": { "line": 114, @@ -5623,8 +5620,8 @@ }, "argument": { "type": "MemberExpression", - "start": 4301, - "end": 4328, + "start": 4269, + "end": 4296, "loc": { "start": { "line": 114, @@ -5637,8 +5634,8 @@ }, "object": { "type": "MemberExpression", - "start": 4301, - "end": 4314, + "start": 4269, + "end": 4282, "loc": { "start": { "line": 114, @@ -5651,8 +5648,8 @@ }, "object": { "type": "ThisExpression", - "start": 4301, - "end": 4305, + "start": 4269, + "end": 4273, "loc": { "start": { "line": 114, @@ -5666,8 +5663,8 @@ }, "property": { "type": "Identifier", - "start": 4306, - "end": 4314, + "start": 4274, + "end": 4282, "loc": { "start": { "line": 114, @@ -5685,8 +5682,8 @@ }, "property": { "type": "Identifier", - "start": 4315, - "end": 4328, + "start": 4283, + "end": 4296, "loc": { "start": { "line": 114, @@ -5709,8 +5706,8 @@ { "type": "CommentLine", "value": " Get the catalog number from the specimen object if present.", - "start": 4186, - "end": 4248, + "start": 4154, + "end": 4216, "loc": { "start": { "line": 113, @@ -5727,8 +5724,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract a", - "start": 4335, - "end": 4406, + "start": 4303, + "end": 4374, "loc": { "start": { "line": 116, @@ -5743,8 +5740,8 @@ { "type": "CommentLine", "value": " catalogNumber from there.", - "start": 4411, - "end": 4439, + "start": 4379, + "end": 4407, "loc": { "start": { "line": 117, @@ -5760,8 +5757,8 @@ }, { "type": "IfStatement", - "start": 4444, - "end": 4649, + "start": 4412, + "end": 4617, "loc": { "start": { "line": 118, @@ -5774,8 +5771,8 @@ }, "test": { "type": "CallExpression", - "start": 4448, - "end": 4482, + "start": 4416, + "end": 4450, "loc": { "start": { "line": 118, @@ -5788,8 +5785,8 @@ }, "callee": { "type": "Identifier", - "start": 4448, - "end": 4451, + "start": 4416, + "end": 4419, "loc": { "start": { "line": 118, @@ -5807,8 +5804,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 4452, - "end": 4465, + "start": 4420, + "end": 4433, "loc": { "start": { "line": 118, @@ -5821,8 +5818,8 @@ }, "object": { "type": "ThisExpression", - "start": 4452, - "end": 4456, + "start": 4420, + "end": 4424, "loc": { "start": { "line": 118, @@ -5836,8 +5833,8 @@ }, "property": { "type": "Identifier", - "start": 4457, - "end": 4465, + "start": 4425, + "end": 4433, "loc": { "start": { "line": 118, @@ -5855,8 +5852,8 @@ }, { "type": "StringLiteral", - "start": 4467, - "end": 4481, + "start": 4435, + "end": 4449, "loc": { "start": { "line": 118, @@ -5878,8 +5875,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 4484, - "end": 4649, + "start": 4452, + "end": 4617, "loc": { "start": { "line": 118, @@ -5893,8 +5890,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 4492, - "end": 4570, + "start": 4460, + "end": 4538, "loc": { "start": { "line": 119, @@ -5908,8 +5905,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 4498, - "end": 4569, + "start": 4466, + "end": 4537, "loc": { "start": { "line": 119, @@ -5922,8 +5919,8 @@ }, "id": { "type": "Identifier", - "start": 4498, - "end": 4506, + "start": 4466, + "end": 4474, "loc": { "start": { "line": 119, @@ -5939,8 +5936,8 @@ }, "init": { "type": "CallExpression", - "start": 4509, - "end": 4569, + "start": 4477, + "end": 4537, "loc": { "start": { "line": 119, @@ -5953,8 +5950,8 @@ }, "callee": { "type": "MemberExpression", - "start": 4509, - "end": 4541, + "start": 4477, + "end": 4509, "loc": { "start": { "line": 119, @@ -5967,8 +5964,8 @@ }, "object": { "type": "Identifier", - "start": 4509, - "end": 4524, + "start": 4477, + "end": 4492, "loc": { "start": { "line": 119, @@ -5984,8 +5981,8 @@ }, "property": { "type": "Identifier", - "start": 4525, - "end": 4541, + "start": 4493, + "end": 4509, "loc": { "start": { "line": 119, @@ -6004,8 +6001,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 4542, - "end": 4568, + "start": 4510, + "end": 4536, "loc": { "start": { "line": 119, @@ -6018,8 +6015,8 @@ }, "object": { "type": "MemberExpression", - "start": 4542, - "end": 4555, + "start": 4510, + "end": 4523, "loc": { "start": { "line": 119, @@ -6032,8 +6029,8 @@ }, "object": { "type": "ThisExpression", - "start": 4542, - "end": 4546, + "start": 4510, + "end": 4514, "loc": { "start": { "line": 119, @@ -6047,8 +6044,8 @@ }, "property": { "type": "Identifier", - "start": 4547, - "end": 4555, + "start": 4515, + "end": 4523, "loc": { "start": { "line": 119, @@ -6066,8 +6063,8 @@ }, "property": { "type": "Identifier", - "start": 4556, - "end": 4568, + "start": 4524, + "end": 4536, "loc": { "start": { "line": 119, @@ -6091,8 +6088,8 @@ }, { "type": "IfStatement", - "start": 4577, - "end": 4643, + "start": 4545, + "end": 4611, "loc": { "start": { "line": 120, @@ -6105,8 +6102,8 @@ }, "test": { "type": "CallExpression", - "start": 4581, - "end": 4611, + "start": 4549, + "end": 4579, "loc": { "start": { "line": 120, @@ -6119,8 +6116,8 @@ }, "callee": { "type": "Identifier", - "start": 4581, - "end": 4584, + "start": 4549, + "end": 4552, "loc": { "start": { "line": 120, @@ -6137,8 +6134,8 @@ "arguments": [ { "type": "Identifier", - "start": 4585, - "end": 4593, + "start": 4553, + "end": 4561, "loc": { "start": { "line": 120, @@ -6154,8 +6151,8 @@ }, { "type": "StringLiteral", - "start": 4595, - "end": 4610, + "start": 4563, + "end": 4578, "loc": { "start": { "line": 120, @@ -6176,8 +6173,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 4613, - "end": 4643, + "start": 4581, + "end": 4611, "loc": { "start": { "line": 120, @@ -6190,8 +6187,8 @@ }, "argument": { "type": "MemberExpression", - "start": 4620, - "end": 4642, + "start": 4588, + "end": 4610, "loc": { "start": { "line": 120, @@ -6204,8 +6201,8 @@ }, "object": { "type": "Identifier", - "start": 4620, - "end": 4628, + "start": 4588, + "end": 4596, "loc": { "start": { "line": 120, @@ -6221,8 +6218,8 @@ }, "property": { "type": "Identifier", - "start": 4629, - "end": 4642, + "start": 4597, + "end": 4610, "loc": { "start": { "line": 120, @@ -6249,8 +6246,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract a", - "start": 4335, - "end": 4406, + "start": 4303, + "end": 4374, "loc": { "start": { "line": 116, @@ -6265,8 +6262,8 @@ { "type": "CommentLine", "value": " catalogNumber from there.", - "start": 4411, - "end": 4439, + "start": 4379, + "end": 4407, "loc": { "start": { "line": 117, @@ -6282,8 +6279,8 @@ }, { "type": "ReturnStatement", - "start": 4654, - "end": 4671, + "start": 4622, + "end": 4639, "loc": { "start": { "line": 122, @@ -6296,8 +6293,8 @@ }, "argument": { "type": "Identifier", - "start": 4661, - "end": 4670, + "start": 4629, + "end": 4638, "loc": { "start": { "line": 122, @@ -6320,8 +6317,8 @@ { "type": "CommentBlock", "value": "*\n * Get the catalogNumber if present.\n ", - "start": 4109, - "end": 4157, + "start": 4077, + "end": 4125, "loc": { "start": { "line": 109, @@ -6338,8 +6335,8 @@ { "type": "CommentBlock", "value": "*\n * Get the institutionCode if present.\n ", - "start": 4679, - "end": 4729, + "start": 4647, + "end": 4697, "loc": { "start": { "line": 125, @@ -6355,8 +6352,8 @@ }, { "type": "ClassMethod", - "start": 4732, - "end": 5259, + "start": 4700, + "end": 5227, "loc": { "start": { "line": 128, @@ -6371,8 +6368,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4736, - "end": 4751, + "start": 4704, + "end": 4719, "loc": { "start": { "line": 128, @@ -6394,8 +6391,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 4754, - "end": 5259, + "start": 4722, + "end": 5227, "loc": { "start": { "line": 128, @@ -6409,8 +6406,8 @@ "body": [ { "type": "IfStatement", - "start": 4829, - "end": 4909, + "start": 4797, + "end": 4877, "loc": { "start": { "line": 130, @@ -6423,8 +6420,8 @@ }, "test": { "type": "CallExpression", - "start": 4833, - "end": 4870, + "start": 4801, + "end": 4838, "loc": { "start": { "line": 130, @@ -6437,8 +6434,8 @@ }, "callee": { "type": "Identifier", - "start": 4833, - "end": 4836, + "start": 4801, + "end": 4804, "loc": { "start": { "line": 130, @@ -6456,8 +6453,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 4837, - "end": 4850, + "start": 4805, + "end": 4818, "loc": { "start": { "line": 130, @@ -6470,8 +6467,8 @@ }, "object": { "type": "ThisExpression", - "start": 4837, - "end": 4841, + "start": 4805, + "end": 4809, "loc": { "start": { "line": 130, @@ -6485,8 +6482,8 @@ }, "property": { "type": "Identifier", - "start": 4842, - "end": 4850, + "start": 4810, + "end": 4818, "loc": { "start": { "line": 130, @@ -6504,8 +6501,8 @@ }, { "type": "StringLiteral", - "start": 4852, - "end": 4869, + "start": 4820, + "end": 4837, "loc": { "start": { "line": 130, @@ -6527,8 +6524,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 4872, - "end": 4909, + "start": 4840, + "end": 4877, "loc": { "start": { "line": 130, @@ -6541,8 +6538,8 @@ }, "argument": { "type": "MemberExpression", - "start": 4879, - "end": 4908, + "start": 4847, + "end": 4876, "loc": { "start": { "line": 130, @@ -6555,8 +6552,8 @@ }, "object": { "type": "MemberExpression", - "start": 4879, - "end": 4892, + "start": 4847, + "end": 4860, "loc": { "start": { "line": 130, @@ -6569,8 +6566,8 @@ }, "object": { "type": "ThisExpression", - "start": 4879, - "end": 4883, + "start": 4847, + "end": 4851, "loc": { "start": { "line": 130, @@ -6584,8 +6581,8 @@ }, "property": { "type": "Identifier", - "start": 4884, - "end": 4892, + "start": 4852, + "end": 4860, "loc": { "start": { "line": 130, @@ -6603,8 +6600,8 @@ }, "property": { "type": "Identifier", - "start": 4893, - "end": 4908, + "start": 4861, + "end": 4876, "loc": { "start": { "line": 130, @@ -6627,8 +6624,8 @@ { "type": "CommentLine", "value": " Get the institution code from the specimen object if present.", - "start": 4760, - "end": 4824, + "start": 4728, + "end": 4792, "loc": { "start": { "line": 129, @@ -6645,8 +6642,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 4915, - "end": 4987, + "start": 4883, + "end": 4955, "loc": { "start": { "line": 132, @@ -6661,8 +6658,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 4992, - "end": 5019, + "start": 4960, + "end": 4987, "loc": { "start": { "line": 133, @@ -6678,8 +6675,8 @@ }, { "type": "IfStatement", - "start": 5024, - "end": 5233, + "start": 4992, + "end": 5201, "loc": { "start": { "line": 134, @@ -6692,8 +6689,8 @@ }, "test": { "type": "CallExpression", - "start": 5028, - "end": 5062, + "start": 4996, + "end": 5030, "loc": { "start": { "line": 134, @@ -6706,8 +6703,8 @@ }, "callee": { "type": "Identifier", - "start": 5028, - "end": 5031, + "start": 4996, + "end": 4999, "loc": { "start": { "line": 134, @@ -6725,8 +6722,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5032, - "end": 5045, + "start": 5000, + "end": 5013, "loc": { "start": { "line": 134, @@ -6739,8 +6736,8 @@ }, "object": { "type": "ThisExpression", - "start": 5032, - "end": 5036, + "start": 5000, + "end": 5004, "loc": { "start": { "line": 134, @@ -6754,8 +6751,8 @@ }, "property": { "type": "Identifier", - "start": 5037, - "end": 5045, + "start": 5005, + "end": 5013, "loc": { "start": { "line": 134, @@ -6773,8 +6770,8 @@ }, { "type": "StringLiteral", - "start": 5047, - "end": 5061, + "start": 5015, + "end": 5029, "loc": { "start": { "line": 134, @@ -6796,8 +6793,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 5064, - "end": 5233, + "start": 5032, + "end": 5201, "loc": { "start": { "line": 134, @@ -6811,8 +6808,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 5072, - "end": 5150, + "start": 5040, + "end": 5118, "loc": { "start": { "line": 135, @@ -6826,8 +6823,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 5078, - "end": 5149, + "start": 5046, + "end": 5117, "loc": { "start": { "line": 135, @@ -6840,8 +6837,8 @@ }, "id": { "type": "Identifier", - "start": 5078, - "end": 5086, + "start": 5046, + "end": 5054, "loc": { "start": { "line": 135, @@ -6857,8 +6854,8 @@ }, "init": { "type": "CallExpression", - "start": 5089, - "end": 5149, + "start": 5057, + "end": 5117, "loc": { "start": { "line": 135, @@ -6871,8 +6868,8 @@ }, "callee": { "type": "MemberExpression", - "start": 5089, - "end": 5121, + "start": 5057, + "end": 5089, "loc": { "start": { "line": 135, @@ -6885,8 +6882,8 @@ }, "object": { "type": "Identifier", - "start": 5089, - "end": 5104, + "start": 5057, + "end": 5072, "loc": { "start": { "line": 135, @@ -6902,8 +6899,8 @@ }, "property": { "type": "Identifier", - "start": 5105, - "end": 5121, + "start": 5073, + "end": 5089, "loc": { "start": { "line": 135, @@ -6922,8 +6919,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5122, - "end": 5148, + "start": 5090, + "end": 5116, "loc": { "start": { "line": 135, @@ -6936,8 +6933,8 @@ }, "object": { "type": "MemberExpression", - "start": 5122, - "end": 5135, + "start": 5090, + "end": 5103, "loc": { "start": { "line": 135, @@ -6950,8 +6947,8 @@ }, "object": { "type": "ThisExpression", - "start": 5122, - "end": 5126, + "start": 5090, + "end": 5094, "loc": { "start": { "line": 135, @@ -6965,8 +6962,8 @@ }, "property": { "type": "Identifier", - "start": 5127, - "end": 5135, + "start": 5095, + "end": 5103, "loc": { "start": { "line": 135, @@ -6984,8 +6981,8 @@ }, "property": { "type": "Identifier", - "start": 5136, - "end": 5148, + "start": 5104, + "end": 5116, "loc": { "start": { "line": 135, @@ -7009,8 +7006,8 @@ }, { "type": "IfStatement", - "start": 5157, - "end": 5227, + "start": 5125, + "end": 5195, "loc": { "start": { "line": 136, @@ -7023,8 +7020,8 @@ }, "test": { "type": "CallExpression", - "start": 5161, - "end": 5193, + "start": 5129, + "end": 5161, "loc": { "start": { "line": 136, @@ -7037,8 +7034,8 @@ }, "callee": { "type": "Identifier", - "start": 5161, - "end": 5164, + "start": 5129, + "end": 5132, "loc": { "start": { "line": 136, @@ -7055,8 +7052,8 @@ "arguments": [ { "type": "Identifier", - "start": 5165, - "end": 5173, + "start": 5133, + "end": 5141, "loc": { "start": { "line": 136, @@ -7072,8 +7069,8 @@ }, { "type": "StringLiteral", - "start": 5175, - "end": 5192, + "start": 5143, + "end": 5160, "loc": { "start": { "line": 136, @@ -7094,8 +7091,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 5195, - "end": 5227, + "start": 5163, + "end": 5195, "loc": { "start": { "line": 136, @@ -7108,8 +7105,8 @@ }, "argument": { "type": "MemberExpression", - "start": 5202, - "end": 5226, + "start": 5170, + "end": 5194, "loc": { "start": { "line": 136, @@ -7122,8 +7119,8 @@ }, "object": { "type": "Identifier", - "start": 5202, - "end": 5210, + "start": 5170, + "end": 5178, "loc": { "start": { "line": 136, @@ -7139,8 +7136,8 @@ }, "property": { "type": "Identifier", - "start": 5211, - "end": 5226, + "start": 5179, + "end": 5194, "loc": { "start": { "line": 136, @@ -7167,8 +7164,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 4915, - "end": 4987, + "start": 4883, + "end": 4955, "loc": { "start": { "line": 132, @@ -7183,8 +7180,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 4992, - "end": 5019, + "start": 4960, + "end": 4987, "loc": { "start": { "line": 133, @@ -7200,8 +7197,8 @@ }, { "type": "ReturnStatement", - "start": 5238, - "end": 5255, + "start": 5206, + "end": 5223, "loc": { "start": { "line": 138, @@ -7214,8 +7211,8 @@ }, "argument": { "type": "Identifier", - "start": 5245, - "end": 5254, + "start": 5213, + "end": 5222, "loc": { "start": { "line": 138, @@ -7238,8 +7235,8 @@ { "type": "CommentBlock", "value": "*\n * Get the institutionCode if present.\n ", - "start": 4679, - "end": 4729, + "start": 4647, + "end": 4697, "loc": { "start": { "line": 125, @@ -7256,8 +7253,8 @@ { "type": "CommentBlock", "value": "*\n * Get the collectionCode if present.\n ", - "start": 5263, - "end": 5312, + "start": 5231, + "end": 5280, "loc": { "start": { "line": 141, @@ -7273,8 +7270,8 @@ }, { "type": "ClassMethod", - "start": 5315, - "end": 5836, + "start": 5283, + "end": 5804, "loc": { "start": { "line": 144, @@ -7289,8 +7286,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 5319, - "end": 5333, + "start": 5287, + "end": 5301, "loc": { "start": { "line": 144, @@ -7312,8 +7309,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 5336, - "end": 5836, + "start": 5304, + "end": 5804, "loc": { "start": { "line": 144, @@ -7327,8 +7324,8 @@ "body": [ { "type": "IfStatement", - "start": 5410, - "end": 5488, + "start": 5378, + "end": 5456, "loc": { "start": { "line": 146, @@ -7341,8 +7338,8 @@ }, "test": { "type": "CallExpression", - "start": 5414, - "end": 5450, + "start": 5382, + "end": 5418, "loc": { "start": { "line": 146, @@ -7355,8 +7352,8 @@ }, "callee": { "type": "Identifier", - "start": 5414, - "end": 5417, + "start": 5382, + "end": 5385, "loc": { "start": { "line": 146, @@ -7374,8 +7371,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5418, - "end": 5431, + "start": 5386, + "end": 5399, "loc": { "start": { "line": 146, @@ -7388,8 +7385,8 @@ }, "object": { "type": "ThisExpression", - "start": 5418, - "end": 5422, + "start": 5386, + "end": 5390, "loc": { "start": { "line": 146, @@ -7403,8 +7400,8 @@ }, "property": { "type": "Identifier", - "start": 5423, - "end": 5431, + "start": 5391, + "end": 5399, "loc": { "start": { "line": 146, @@ -7422,8 +7419,8 @@ }, { "type": "StringLiteral", - "start": 5433, - "end": 5449, + "start": 5401, + "end": 5417, "loc": { "start": { "line": 146, @@ -7445,8 +7442,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 5452, - "end": 5488, + "start": 5420, + "end": 5456, "loc": { "start": { "line": 146, @@ -7459,8 +7456,8 @@ }, "argument": { "type": "MemberExpression", - "start": 5459, - "end": 5487, + "start": 5427, + "end": 5455, "loc": { "start": { "line": 146, @@ -7473,8 +7470,8 @@ }, "object": { "type": "MemberExpression", - "start": 5459, - "end": 5472, + "start": 5427, + "end": 5440, "loc": { "start": { "line": 146, @@ -7487,8 +7484,8 @@ }, "object": { "type": "ThisExpression", - "start": 5459, - "end": 5463, + "start": 5427, + "end": 5431, "loc": { "start": { "line": 146, @@ -7502,8 +7499,8 @@ }, "property": { "type": "Identifier", - "start": 5464, - "end": 5472, + "start": 5432, + "end": 5440, "loc": { "start": { "line": 146, @@ -7521,8 +7518,8 @@ }, "property": { "type": "Identifier", - "start": 5473, - "end": 5487, + "start": 5441, + "end": 5455, "loc": { "start": { "line": 146, @@ -7545,8 +7542,8 @@ { "type": "CommentLine", "value": " Get the collection code from the specimen object if present.", - "start": 5342, - "end": 5405, + "start": 5310, + "end": 5373, "loc": { "start": { "line": 145, @@ -7563,8 +7560,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 5494, - "end": 5566, + "start": 5462, + "end": 5534, "loc": { "start": { "line": 148, @@ -7579,8 +7576,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 5571, - "end": 5598, + "start": 5539, + "end": 5566, "loc": { "start": { "line": 149, @@ -7596,8 +7593,8 @@ }, { "type": "IfStatement", - "start": 5603, - "end": 5810, + "start": 5571, + "end": 5778, "loc": { "start": { "line": 150, @@ -7610,8 +7607,8 @@ }, "test": { "type": "CallExpression", - "start": 5607, - "end": 5641, + "start": 5575, + "end": 5609, "loc": { "start": { "line": 150, @@ -7624,8 +7621,8 @@ }, "callee": { "type": "Identifier", - "start": 5607, - "end": 5610, + "start": 5575, + "end": 5578, "loc": { "start": { "line": 150, @@ -7643,8 +7640,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5611, - "end": 5624, + "start": 5579, + "end": 5592, "loc": { "start": { "line": 150, @@ -7657,8 +7654,8 @@ }, "object": { "type": "ThisExpression", - "start": 5611, - "end": 5615, + "start": 5579, + "end": 5583, "loc": { "start": { "line": 150, @@ -7672,8 +7669,8 @@ }, "property": { "type": "Identifier", - "start": 5616, - "end": 5624, + "start": 5584, + "end": 5592, "loc": { "start": { "line": 150, @@ -7691,8 +7688,8 @@ }, { "type": "StringLiteral", - "start": 5626, - "end": 5640, + "start": 5594, + "end": 5608, "loc": { "start": { "line": 150, @@ -7714,8 +7711,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 5643, - "end": 5810, + "start": 5611, + "end": 5778, "loc": { "start": { "line": 150, @@ -7729,8 +7726,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 5651, - "end": 5729, + "start": 5619, + "end": 5697, "loc": { "start": { "line": 151, @@ -7744,8 +7741,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 5657, - "end": 5728, + "start": 5625, + "end": 5696, "loc": { "start": { "line": 151, @@ -7758,8 +7755,8 @@ }, "id": { "type": "Identifier", - "start": 5657, - "end": 5665, + "start": 5625, + "end": 5633, "loc": { "start": { "line": 151, @@ -7775,8 +7772,8 @@ }, "init": { "type": "CallExpression", - "start": 5668, - "end": 5728, + "start": 5636, + "end": 5696, "loc": { "start": { "line": 151, @@ -7789,8 +7786,8 @@ }, "callee": { "type": "MemberExpression", - "start": 5668, - "end": 5700, + "start": 5636, + "end": 5668, "loc": { "start": { "line": 151, @@ -7803,8 +7800,8 @@ }, "object": { "type": "Identifier", - "start": 5668, - "end": 5683, + "start": 5636, + "end": 5651, "loc": { "start": { "line": 151, @@ -7820,8 +7817,8 @@ }, "property": { "type": "Identifier", - "start": 5684, - "end": 5700, + "start": 5652, + "end": 5668, "loc": { "start": { "line": 151, @@ -7840,8 +7837,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5701, - "end": 5727, + "start": 5669, + "end": 5695, "loc": { "start": { "line": 151, @@ -7854,8 +7851,8 @@ }, "object": { "type": "MemberExpression", - "start": 5701, - "end": 5714, + "start": 5669, + "end": 5682, "loc": { "start": { "line": 151, @@ -7868,8 +7865,8 @@ }, "object": { "type": "ThisExpression", - "start": 5701, - "end": 5705, + "start": 5669, + "end": 5673, "loc": { "start": { "line": 151, @@ -7883,8 +7880,8 @@ }, "property": { "type": "Identifier", - "start": 5706, - "end": 5714, + "start": 5674, + "end": 5682, "loc": { "start": { "line": 151, @@ -7902,8 +7899,8 @@ }, "property": { "type": "Identifier", - "start": 5715, - "end": 5727, + "start": 5683, + "end": 5695, "loc": { "start": { "line": 151, @@ -7927,8 +7924,8 @@ }, { "type": "IfStatement", - "start": 5736, - "end": 5804, + "start": 5704, + "end": 5772, "loc": { "start": { "line": 152, @@ -7941,8 +7938,8 @@ }, "test": { "type": "CallExpression", - "start": 5740, - "end": 5771, + "start": 5708, + "end": 5739, "loc": { "start": { "line": 152, @@ -7955,8 +7952,8 @@ }, "callee": { "type": "Identifier", - "start": 5740, - "end": 5743, + "start": 5708, + "end": 5711, "loc": { "start": { "line": 152, @@ -7973,8 +7970,8 @@ "arguments": [ { "type": "Identifier", - "start": 5744, - "end": 5752, + "start": 5712, + "end": 5720, "loc": { "start": { "line": 152, @@ -7990,8 +7987,8 @@ }, { "type": "StringLiteral", - "start": 5754, - "end": 5770, + "start": 5722, + "end": 5738, "loc": { "start": { "line": 152, @@ -8012,8 +8009,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 5773, - "end": 5804, + "start": 5741, + "end": 5772, "loc": { "start": { "line": 152, @@ -8026,8 +8023,8 @@ }, "argument": { "type": "MemberExpression", - "start": 5780, - "end": 5803, + "start": 5748, + "end": 5771, "loc": { "start": { "line": 152, @@ -8040,8 +8037,8 @@ }, "object": { "type": "Identifier", - "start": 5780, - "end": 5788, + "start": 5748, + "end": 5756, "loc": { "start": { "line": 152, @@ -8057,8 +8054,8 @@ }, "property": { "type": "Identifier", - "start": 5789, - "end": 5803, + "start": 5757, + "end": 5771, "loc": { "start": { "line": 152, @@ -8085,8 +8082,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 5494, - "end": 5566, + "start": 5462, + "end": 5534, "loc": { "start": { "line": 148, @@ -8101,8 +8098,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 5571, - "end": 5598, + "start": 5539, + "end": 5566, "loc": { "start": { "line": 149, @@ -8118,8 +8115,8 @@ }, { "type": "ReturnStatement", - "start": 5815, - "end": 5832, + "start": 5783, + "end": 5800, "loc": { "start": { "line": 154, @@ -8132,8 +8129,8 @@ }, "argument": { "type": "Identifier", - "start": 5822, - "end": 5831, + "start": 5790, + "end": 5799, "loc": { "start": { "line": 154, @@ -8156,8 +8153,8 @@ { "type": "CommentBlock", "value": "*\n * Get the collectionCode if present.\n ", - "start": 5263, - "end": 5312, + "start": 5231, + "end": 5280, "loc": { "start": { "line": 141, @@ -8174,8 +8171,8 @@ { "type": "CommentBlock", "value": "*\n * Return the occurrence ID of this specimen, if we have one. Otherwise, we\n * attempt to construct one in the form:\n * \"urn:catalog:\" + institutionCode (if present) + ':' +\n * collectionCode (if present) + ':' + catalogNumber (if present)\n ", - "start": 5840, - "end": 6099, + "start": 5808, + "end": 6067, "loc": { "start": { "line": 157, @@ -8191,8 +8188,8 @@ }, { "type": "ClassMethod", - "start": 6102, - "end": 7142, + "start": 6070, + "end": 7066, "loc": { "start": { "line": 163, @@ -8207,8 +8204,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 6106, - "end": 6118, + "start": 6074, + "end": 6086, "loc": { "start": { "line": 163, @@ -8230,8 +8227,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 6121, - "end": 7142, + "start": 6089, + "end": 7066, "loc": { "start": { "line": 163, @@ -8245,8 +8242,8 @@ "body": [ { "type": "IfStatement", - "start": 6172, - "end": 6311, + "start": 6140, + "end": 6235, "loc": { "start": { "line": 165, @@ -8258,9 +8255,9 @@ } }, "test": { - "type": "LogicalExpression", - "start": 6176, - "end": 6254, + "type": "CallExpression", + "start": 6144, + "end": 6178, "loc": { "start": { "line": 165, @@ -8268,13 +8265,13 @@ }, "end": { "line": 165, - "column": 86 + "column": 42 } }, - "left": { - "type": "CallExpression", - "start": 6176, - "end": 6210, + "callee": { + "type": "Identifier", + "start": 6144, + "end": 6147, "loc": { "start": { "line": 165, @@ -8282,32 +8279,32 @@ }, "end": { "line": 165, - "column": 42 - } + "column": 11 + }, + "identifierName": "has" }, - "callee": { - "type": "Identifier", - "start": 6176, - "end": 6179, + "name": "has", + "leadingComments": null + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 6148, + "end": 6161, "loc": { "start": { "line": 165, - "column": 8 + "column": 12 }, "end": { "line": 165, - "column": 11 - }, - "identifierName": "has" + "column": 25 + } }, - "name": "has", - "leadingComments": null - }, - "arguments": [ - { - "type": "MemberExpression", - "start": 6180, - "end": 6193, + "object": { + "type": "ThisExpression", + "start": 6148, + "end": 6152, "loc": { "start": { "line": 165, @@ -8315,243 +8312,60 @@ }, "end": { "line": 165, - "column": 25 - } - }, - "object": { - "type": "ThisExpression", - "start": 6180, - "end": 6184, - "loc": { - "start": { - "line": 165, - "column": 12 - }, - "end": { - "line": 165, - "column": 16 - } - } - }, - "property": { - "type": "Identifier", - "start": 6185, - "end": 6193, - "loc": { - "start": { - "line": 165, - "column": 17 - }, - "end": { - "line": 165, - "column": 25 - }, - "identifierName": "specimen" - }, - "name": "specimen" - }, - "computed": false - }, - { - "type": "StringLiteral", - "start": 6195, - "end": 6209, - "loc": { - "start": { - "line": 165, - "column": 27 - }, - "end": { - "line": 165, - "column": 41 + "column": 16 } - }, - "extra": { - "rawValue": "occurrenceID", - "raw": "'occurrenceID'" - }, - "value": "occurrenceID" - } - ], - "leadingComments": null - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "start": 6214, - "end": 6254, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 86 - } - }, - "left": { - "type": "CallExpression", - "start": 6214, - "end": 6247, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 79 } }, - "callee": { - "type": "MemberExpression", - "start": 6214, - "end": 6245, + "property": { + "type": "Identifier", + "start": 6153, + "end": 6161, "loc": { "start": { "line": 165, - "column": 46 + "column": 17 }, "end": { "line": 165, - "column": 77 - } - }, - "object": { - "type": "MemberExpression", - "start": 6214, - "end": 6240, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 72 - } - }, - "object": { - "type": "MemberExpression", - "start": 6214, - "end": 6227, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 59 - } - }, - "object": { - "type": "ThisExpression", - "start": 6214, - "end": 6218, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 50 - } - } - }, - "property": { - "type": "Identifier", - "start": 6219, - "end": 6227, - "loc": { - "start": { - "line": 165, - "column": 51 - }, - "end": { - "line": 165, - "column": 59 - }, - "identifierName": "specimen" - }, - "name": "specimen" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 6228, - "end": 6240, - "loc": { - "start": { - "line": 165, - "column": 60 - }, - "end": { - "line": 165, - "column": 72 - }, - "identifierName": "occurrenceID" - }, - "name": "occurrenceID" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 6241, - "end": 6245, - "loc": { - "start": { - "line": 165, - "column": 73 - }, - "end": { - "line": 165, - "column": 77 - }, - "identifierName": "trim" + "column": 25 }, - "name": "trim" + "identifierName": "specimen" }, - "computed": false + "name": "specimen" }, - "arguments": [] + "computed": false }, - "operator": "!==", - "right": { + { "type": "StringLiteral", - "start": 6252, - "end": 6254, + "start": 6163, + "end": 6177, "loc": { "start": { "line": 165, - "column": 84 + "column": 27 }, "end": { "line": 165, - "column": 86 + "column": 41 } }, "extra": { - "rawValue": "", - "raw": "''" + "rawValue": "occurrenceID", + "raw": "'occurrenceID'" }, - "value": "" + "value": "occurrenceID" } - }, + ], "leadingComments": null }, "consequent": { "type": "BlockStatement", - "start": 6256, - "end": 6311, + "start": 6180, + "end": 6235, "loc": { "start": { "line": 165, - "column": 88 + "column": 44 }, "end": { "line": 167, @@ -8561,8 +8375,8 @@ "body": [ { "type": "ReturnStatement", - "start": 6264, - "end": 6305, + "start": 6188, + "end": 6229, "loc": { "start": { "line": 166, @@ -8575,8 +8389,8 @@ }, "argument": { "type": "CallExpression", - "start": 6271, - "end": 6304, + "start": 6195, + "end": 6228, "loc": { "start": { "line": 166, @@ -8589,8 +8403,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6271, - "end": 6302, + "start": 6195, + "end": 6226, "loc": { "start": { "line": 166, @@ -8603,8 +8417,8 @@ }, "object": { "type": "MemberExpression", - "start": 6271, - "end": 6297, + "start": 6195, + "end": 6221, "loc": { "start": { "line": 166, @@ -8617,8 +8431,8 @@ }, "object": { "type": "MemberExpression", - "start": 6271, - "end": 6284, + "start": 6195, + "end": 6208, "loc": { "start": { "line": 166, @@ -8631,8 +8445,8 @@ }, "object": { "type": "ThisExpression", - "start": 6271, - "end": 6275, + "start": 6195, + "end": 6199, "loc": { "start": { "line": 166, @@ -8646,8 +8460,8 @@ }, "property": { "type": "Identifier", - "start": 6276, - "end": 6284, + "start": 6200, + "end": 6208, "loc": { "start": { "line": 166, @@ -8665,8 +8479,8 @@ }, "property": { "type": "Identifier", - "start": 6285, - "end": 6297, + "start": 6209, + "end": 6221, "loc": { "start": { "line": 166, @@ -8684,8 +8498,8 @@ }, "property": { "type": "Identifier", - "start": 6298, - "end": 6302, + "start": 6222, + "end": 6226, "loc": { "start": { "line": 166, @@ -8713,8 +8527,8 @@ { "type": "CommentLine", "value": " Return the occurrenceID if it exists.", - "start": 6127, - "end": 6167, + "start": 6095, + "end": 6135, "loc": { "start": { "line": 164, @@ -8731,8 +8545,8 @@ { "type": "CommentLine", "value": " Otherwise, we could try to construct the occurrenceID from its components.", - "start": 6317, - "end": 6394, + "start": 6241, + "end": 6318, "loc": { "start": { "line": 169, @@ -8748,8 +8562,8 @@ }, { "type": "IfStatement", - "start": 6399, - "end": 7060, + "start": 6323, + "end": 6984, "loc": { "start": { "line": 170, @@ -8762,8 +8576,8 @@ }, "test": { "type": "CallExpression", - "start": 6403, - "end": 6438, + "start": 6327, + "end": 6362, "loc": { "start": { "line": 170, @@ -8776,8 +8590,8 @@ }, "callee": { "type": "Identifier", - "start": 6403, - "end": 6406, + "start": 6327, + "end": 6330, "loc": { "start": { "line": 170, @@ -8795,8 +8609,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 6407, - "end": 6420, + "start": 6331, + "end": 6344, "loc": { "start": { "line": 170, @@ -8809,8 +8623,8 @@ }, "object": { "type": "ThisExpression", - "start": 6407, - "end": 6411, + "start": 6331, + "end": 6335, "loc": { "start": { "line": 170, @@ -8824,8 +8638,8 @@ }, "property": { "type": "Identifier", - "start": 6412, - "end": 6420, + "start": 6336, + "end": 6344, "loc": { "start": { "line": 170, @@ -8843,8 +8657,8 @@ }, { "type": "StringLiteral", - "start": 6422, - "end": 6437, + "start": 6346, + "end": 6361, "loc": { "start": { "line": 170, @@ -8866,8 +8680,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 6440, - "end": 7060, + "start": 6364, + "end": 6984, "loc": { "start": { "line": 170, @@ -8881,8 +8695,8 @@ "body": [ { "type": "IfStatement", - "start": 6448, - "end": 6820, + "start": 6372, + "end": 6744, "loc": { "start": { "line": 171, @@ -8895,8 +8709,8 @@ }, "test": { "type": "CallExpression", - "start": 6452, - "end": 6489, + "start": 6376, + "end": 6413, "loc": { "start": { "line": 171, @@ -8909,8 +8723,8 @@ }, "callee": { "type": "Identifier", - "start": 6452, - "end": 6455, + "start": 6376, + "end": 6379, "loc": { "start": { "line": 171, @@ -8927,8 +8741,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 6456, - "end": 6469, + "start": 6380, + "end": 6393, "loc": { "start": { "line": 171, @@ -8941,8 +8755,8 @@ }, "object": { "type": "ThisExpression", - "start": 6456, - "end": 6460, + "start": 6380, + "end": 6384, "loc": { "start": { "line": 171, @@ -8956,8 +8770,8 @@ }, "property": { "type": "Identifier", - "start": 6461, - "end": 6469, + "start": 6385, + "end": 6393, "loc": { "start": { "line": 171, @@ -8975,8 +8789,8 @@ }, { "type": "StringLiteral", - "start": 6471, - "end": 6488, + "start": 6395, + "end": 6412, "loc": { "start": { "line": 171, @@ -8997,8 +8811,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 6491, - "end": 6820, + "start": 6415, + "end": 6744, "loc": { "start": { "line": 171, @@ -9012,8 +8826,8 @@ "body": [ { "type": "IfStatement", - "start": 6501, - "end": 6703, + "start": 6425, + "end": 6627, "loc": { "start": { "line": 172, @@ -9026,8 +8840,8 @@ }, "test": { "type": "CallExpression", - "start": 6505, - "end": 6541, + "start": 6429, + "end": 6465, "loc": { "start": { "line": 172, @@ -9040,8 +8854,8 @@ }, "callee": { "type": "Identifier", - "start": 6505, - "end": 6508, + "start": 6429, + "end": 6432, "loc": { "start": { "line": 172, @@ -9058,8 +8872,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 6509, - "end": 6522, + "start": 6433, + "end": 6446, "loc": { "start": { "line": 172, @@ -9072,8 +8886,8 @@ }, "object": { "type": "ThisExpression", - "start": 6509, - "end": 6513, + "start": 6433, + "end": 6437, "loc": { "start": { "line": 172, @@ -9087,8 +8901,8 @@ }, "property": { "type": "Identifier", - "start": 6514, - "end": 6522, + "start": 6438, + "end": 6446, "loc": { "start": { "line": 172, @@ -9106,8 +8920,8 @@ }, { "type": "StringLiteral", - "start": 6524, - "end": 6540, + "start": 6448, + "end": 6464, "loc": { "start": { "line": 172, @@ -9128,8 +8942,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 6543, - "end": 6703, + "start": 6467, + "end": 6627, "loc": { "start": { "line": 172, @@ -9143,8 +8957,8 @@ "body": [ { "type": "ReturnStatement", - "start": 6555, - "end": 6693, + "start": 6479, + "end": 6617, "loc": { "start": { "line": 173, @@ -9157,8 +8971,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 6562, - "end": 6692, + "start": 6486, + "end": 6616, "loc": { "start": { "line": 173, @@ -9172,8 +8986,8 @@ "expressions": [ { "type": "CallExpression", - "start": 6577, - "end": 6613, + "start": 6501, + "end": 6537, "loc": { "start": { "line": 173, @@ -9186,8 +9000,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6577, - "end": 6611, + "start": 6501, + "end": 6535, "loc": { "start": { "line": 173, @@ -9200,8 +9014,8 @@ }, "object": { "type": "MemberExpression", - "start": 6577, - "end": 6606, + "start": 6501, + "end": 6530, "loc": { "start": { "line": 173, @@ -9214,8 +9028,8 @@ }, "object": { "type": "MemberExpression", - "start": 6577, - "end": 6590, + "start": 6501, + "end": 6514, "loc": { "start": { "line": 173, @@ -9228,8 +9042,8 @@ }, "object": { "type": "ThisExpression", - "start": 6577, - "end": 6581, + "start": 6501, + "end": 6505, "loc": { "start": { "line": 173, @@ -9243,8 +9057,8 @@ }, "property": { "type": "Identifier", - "start": 6582, - "end": 6590, + "start": 6506, + "end": 6514, "loc": { "start": { "line": 173, @@ -9262,8 +9076,8 @@ }, "property": { "type": "Identifier", - "start": 6591, - "end": 6606, + "start": 6515, + "end": 6530, "loc": { "start": { "line": 173, @@ -9281,8 +9095,8 @@ }, "property": { "type": "Identifier", - "start": 6607, - "end": 6611, + "start": 6531, + "end": 6535, "loc": { "start": { "line": 173, @@ -9302,8 +9116,8 @@ }, { "type": "CallExpression", - "start": 6617, - "end": 6652, + "start": 6541, + "end": 6576, "loc": { "start": { "line": 173, @@ -9316,8 +9130,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6617, - "end": 6650, + "start": 6541, + "end": 6574, "loc": { "start": { "line": 173, @@ -9330,8 +9144,8 @@ }, "object": { "type": "MemberExpression", - "start": 6617, - "end": 6645, + "start": 6541, + "end": 6569, "loc": { "start": { "line": 173, @@ -9344,8 +9158,8 @@ }, "object": { "type": "MemberExpression", - "start": 6617, - "end": 6630, + "start": 6541, + "end": 6554, "loc": { "start": { "line": 173, @@ -9358,8 +9172,8 @@ }, "object": { "type": "ThisExpression", - "start": 6617, - "end": 6621, + "start": 6541, + "end": 6545, "loc": { "start": { "line": 173, @@ -9373,8 +9187,8 @@ }, "property": { "type": "Identifier", - "start": 6622, - "end": 6630, + "start": 6546, + "end": 6554, "loc": { "start": { "line": 173, @@ -9392,8 +9206,8 @@ }, "property": { "type": "Identifier", - "start": 6631, - "end": 6645, + "start": 6555, + "end": 6569, "loc": { "start": { "line": 173, @@ -9411,8 +9225,8 @@ }, "property": { "type": "Identifier", - "start": 6646, - "end": 6650, + "start": 6570, + "end": 6574, "loc": { "start": { "line": 173, @@ -9432,8 +9246,8 @@ }, { "type": "CallExpression", - "start": 6656, - "end": 6690, + "start": 6580, + "end": 6614, "loc": { "start": { "line": 173, @@ -9446,8 +9260,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6656, - "end": 6688, + "start": 6580, + "end": 6612, "loc": { "start": { "line": 173, @@ -9460,8 +9274,8 @@ }, "object": { "type": "MemberExpression", - "start": 6656, - "end": 6683, + "start": 6580, + "end": 6607, "loc": { "start": { "line": 173, @@ -9474,8 +9288,8 @@ }, "object": { "type": "MemberExpression", - "start": 6656, - "end": 6669, + "start": 6580, + "end": 6593, "loc": { "start": { "line": 173, @@ -9488,8 +9302,8 @@ }, "object": { "type": "ThisExpression", - "start": 6656, - "end": 6660, + "start": 6580, + "end": 6584, "loc": { "start": { "line": 173, @@ -9503,8 +9317,8 @@ }, "property": { "type": "Identifier", - "start": 6661, - "end": 6669, + "start": 6585, + "end": 6593, "loc": { "start": { "line": 173, @@ -9522,8 +9336,8 @@ }, "property": { "type": "Identifier", - "start": 6670, - "end": 6683, + "start": 6594, + "end": 6607, "loc": { "start": { "line": 173, @@ -9541,8 +9355,8 @@ }, "property": { "type": "Identifier", - "start": 6684, - "end": 6688, + "start": 6608, + "end": 6612, "loc": { "start": { "line": 173, @@ -9564,8 +9378,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 6563, - "end": 6575, + "start": 6487, + "end": 6499, "loc": { "start": { "line": 173, @@ -9584,8 +9398,8 @@ }, { "type": "TemplateElement", - "start": 6614, - "end": 6615, + "start": 6538, + "end": 6539, "loc": { "start": { "line": 173, @@ -9604,8 +9418,8 @@ }, { "type": "TemplateElement", - "start": 6653, - "end": 6654, + "start": 6577, + "end": 6578, "loc": { "start": { "line": 173, @@ -9624,8 +9438,8 @@ }, { "type": "TemplateElement", - "start": 6691, - "end": 6691, + "start": 6615, + "end": 6615, "loc": { "start": { "line": 173, @@ -9652,8 +9466,8 @@ }, { "type": "ReturnStatement", - "start": 6712, - "end": 6812, + "start": 6636, + "end": 6736, "loc": { "start": { "line": 175, @@ -9666,8 +9480,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 6719, - "end": 6811, + "start": 6643, + "end": 6735, "loc": { "start": { "line": 175, @@ -9681,8 +9495,8 @@ "expressions": [ { "type": "CallExpression", - "start": 6734, - "end": 6770, + "start": 6658, + "end": 6694, "loc": { "start": { "line": 175, @@ -9695,8 +9509,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6734, - "end": 6768, + "start": 6658, + "end": 6692, "loc": { "start": { "line": 175, @@ -9709,8 +9523,8 @@ }, "object": { "type": "MemberExpression", - "start": 6734, - "end": 6763, + "start": 6658, + "end": 6687, "loc": { "start": { "line": 175, @@ -9723,8 +9537,8 @@ }, "object": { "type": "MemberExpression", - "start": 6734, - "end": 6747, + "start": 6658, + "end": 6671, "loc": { "start": { "line": 175, @@ -9737,8 +9551,8 @@ }, "object": { "type": "ThisExpression", - "start": 6734, - "end": 6738, + "start": 6658, + "end": 6662, "loc": { "start": { "line": 175, @@ -9752,8 +9566,8 @@ }, "property": { "type": "Identifier", - "start": 6739, - "end": 6747, + "start": 6663, + "end": 6671, "loc": { "start": { "line": 175, @@ -9771,8 +9585,8 @@ }, "property": { "type": "Identifier", - "start": 6748, - "end": 6763, + "start": 6672, + "end": 6687, "loc": { "start": { "line": 175, @@ -9790,8 +9604,8 @@ }, "property": { "type": "Identifier", - "start": 6764, - "end": 6768, + "start": 6688, + "end": 6692, "loc": { "start": { "line": 175, @@ -9811,8 +9625,8 @@ }, { "type": "CallExpression", - "start": 6775, - "end": 6809, + "start": 6699, + "end": 6733, "loc": { "start": { "line": 175, @@ -9825,8 +9639,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6775, - "end": 6807, + "start": 6699, + "end": 6731, "loc": { "start": { "line": 175, @@ -9839,8 +9653,8 @@ }, "object": { "type": "MemberExpression", - "start": 6775, - "end": 6802, + "start": 6699, + "end": 6726, "loc": { "start": { "line": 175, @@ -9853,8 +9667,8 @@ }, "object": { "type": "MemberExpression", - "start": 6775, - "end": 6788, + "start": 6699, + "end": 6712, "loc": { "start": { "line": 175, @@ -9867,8 +9681,8 @@ }, "object": { "type": "ThisExpression", - "start": 6775, - "end": 6779, + "start": 6699, + "end": 6703, "loc": { "start": { "line": 175, @@ -9882,8 +9696,8 @@ }, "property": { "type": "Identifier", - "start": 6780, - "end": 6788, + "start": 6704, + "end": 6712, "loc": { "start": { "line": 175, @@ -9901,8 +9715,8 @@ }, "property": { "type": "Identifier", - "start": 6789, - "end": 6802, + "start": 6713, + "end": 6726, "loc": { "start": { "line": 175, @@ -9920,8 +9734,8 @@ }, "property": { "type": "Identifier", - "start": 6803, - "end": 6807, + "start": 6727, + "end": 6731, "loc": { "start": { "line": 175, @@ -9943,8 +9757,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 6720, - "end": 6732, + "start": 6644, + "end": 6656, "loc": { "start": { "line": 175, @@ -9963,8 +9777,8 @@ }, { "type": "TemplateElement", - "start": 6771, - "end": 6773, + "start": 6695, + "end": 6697, "loc": { "start": { "line": 175, @@ -9983,8 +9797,8 @@ }, { "type": "TemplateElement", - "start": 6810, - "end": 6810, + "start": 6734, + "end": 6734, "loc": { "start": { "line": 175, @@ -10011,8 +9825,8 @@ }, { "type": "IfStatement", - "start": 6827, - "end": 6986, + "start": 6751, + "end": 6910, "loc": { "start": { "line": 177, @@ -10025,8 +9839,8 @@ }, "test": { "type": "CallExpression", - "start": 6831, - "end": 6867, + "start": 6755, + "end": 6791, "loc": { "start": { "line": 177, @@ -10039,8 +9853,8 @@ }, "callee": { "type": "Identifier", - "start": 6831, - "end": 6834, + "start": 6755, + "end": 6758, "loc": { "start": { "line": 177, @@ -10057,8 +9871,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 6835, - "end": 6848, + "start": 6759, + "end": 6772, "loc": { "start": { "line": 177, @@ -10071,8 +9885,8 @@ }, "object": { "type": "ThisExpression", - "start": 6835, - "end": 6839, + "start": 6759, + "end": 6763, "loc": { "start": { "line": 177, @@ -10086,8 +9900,8 @@ }, "property": { "type": "Identifier", - "start": 6840, - "end": 6848, + "start": 6764, + "end": 6772, "loc": { "start": { "line": 177, @@ -10105,8 +9919,8 @@ }, { "type": "StringLiteral", - "start": 6850, - "end": 6866, + "start": 6774, + "end": 6790, "loc": { "start": { "line": 177, @@ -10127,8 +9941,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 6869, - "end": 6986, + "start": 6793, + "end": 6910, "loc": { "start": { "line": 177, @@ -10142,8 +9956,8 @@ "body": [ { "type": "ReturnStatement", - "start": 6879, - "end": 6978, + "start": 6803, + "end": 6902, "loc": { "start": { "line": 178, @@ -10156,8 +9970,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 6886, - "end": 6977, + "start": 6810, + "end": 6901, "loc": { "start": { "line": 178, @@ -10171,8 +9985,8 @@ "expressions": [ { "type": "CallExpression", - "start": 6902, - "end": 6937, + "start": 6826, + "end": 6861, "loc": { "start": { "line": 178, @@ -10185,8 +9999,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6902, - "end": 6935, + "start": 6826, + "end": 6859, "loc": { "start": { "line": 178, @@ -10199,8 +10013,8 @@ }, "object": { "type": "MemberExpression", - "start": 6902, - "end": 6930, + "start": 6826, + "end": 6854, "loc": { "start": { "line": 178, @@ -10213,8 +10027,8 @@ }, "object": { "type": "MemberExpression", - "start": 6902, - "end": 6915, + "start": 6826, + "end": 6839, "loc": { "start": { "line": 178, @@ -10227,8 +10041,8 @@ }, "object": { "type": "ThisExpression", - "start": 6902, - "end": 6906, + "start": 6826, + "end": 6830, "loc": { "start": { "line": 178, @@ -10242,8 +10056,8 @@ }, "property": { "type": "Identifier", - "start": 6907, - "end": 6915, + "start": 6831, + "end": 6839, "loc": { "start": { "line": 178, @@ -10261,8 +10075,8 @@ }, "property": { "type": "Identifier", - "start": 6916, - "end": 6930, + "start": 6840, + "end": 6854, "loc": { "start": { "line": 178, @@ -10280,8 +10094,8 @@ }, "property": { "type": "Identifier", - "start": 6931, - "end": 6935, + "start": 6855, + "end": 6859, "loc": { "start": { "line": 178, @@ -10301,8 +10115,8 @@ }, { "type": "CallExpression", - "start": 6941, - "end": 6975, + "start": 6865, + "end": 6899, "loc": { "start": { "line": 178, @@ -10315,8 +10129,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6941, - "end": 6973, + "start": 6865, + "end": 6897, "loc": { "start": { "line": 178, @@ -10329,8 +10143,8 @@ }, "object": { "type": "MemberExpression", - "start": 6941, - "end": 6968, + "start": 6865, + "end": 6892, "loc": { "start": { "line": 178, @@ -10343,8 +10157,8 @@ }, "object": { "type": "MemberExpression", - "start": 6941, - "end": 6954, + "start": 6865, + "end": 6878, "loc": { "start": { "line": 178, @@ -10357,8 +10171,8 @@ }, "object": { "type": "ThisExpression", - "start": 6941, - "end": 6945, + "start": 6865, + "end": 6869, "loc": { "start": { "line": 178, @@ -10372,8 +10186,8 @@ }, "property": { "type": "Identifier", - "start": 6946, - "end": 6954, + "start": 6870, + "end": 6878, "loc": { "start": { "line": 178, @@ -10391,8 +10205,8 @@ }, "property": { "type": "Identifier", - "start": 6955, - "end": 6968, + "start": 6879, + "end": 6892, "loc": { "start": { "line": 178, @@ -10410,8 +10224,8 @@ }, "property": { "type": "Identifier", - "start": 6969, - "end": 6973, + "start": 6893, + "end": 6897, "loc": { "start": { "line": 178, @@ -10433,8 +10247,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 6887, - "end": 6900, + "start": 6811, + "end": 6824, "loc": { "start": { "line": 178, @@ -10453,8 +10267,8 @@ }, { "type": "TemplateElement", - "start": 6938, - "end": 6939, + "start": 6862, + "end": 6863, "loc": { "start": { "line": 178, @@ -10473,8 +10287,8 @@ }, { "type": "TemplateElement", - "start": 6976, - "end": 6976, + "start": 6900, + "end": 6900, "loc": { "start": { "line": 178, @@ -10501,8 +10315,8 @@ }, { "type": "ReturnStatement", - "start": 6993, - "end": 7054, + "start": 6917, + "end": 6978, "loc": { "start": { "line": 180, @@ -10515,8 +10329,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 7000, - "end": 7053, + "start": 6924, + "end": 6977, "loc": { "start": { "line": 180, @@ -10530,8 +10344,8 @@ "expressions": [ { "type": "CallExpression", - "start": 7017, - "end": 7051, + "start": 6941, + "end": 6975, "loc": { "start": { "line": 180, @@ -10544,8 +10358,8 @@ }, "callee": { "type": "MemberExpression", - "start": 7017, - "end": 7049, + "start": 6941, + "end": 6973, "loc": { "start": { "line": 180, @@ -10558,8 +10372,8 @@ }, "object": { "type": "MemberExpression", - "start": 7017, - "end": 7044, + "start": 6941, + "end": 6968, "loc": { "start": { "line": 180, @@ -10572,8 +10386,8 @@ }, "object": { "type": "MemberExpression", - "start": 7017, - "end": 7030, + "start": 6941, + "end": 6954, "loc": { "start": { "line": 180, @@ -10586,8 +10400,8 @@ }, "object": { "type": "ThisExpression", - "start": 7017, - "end": 7021, + "start": 6941, + "end": 6945, "loc": { "start": { "line": 180, @@ -10601,8 +10415,8 @@ }, "property": { "type": "Identifier", - "start": 7022, - "end": 7030, + "start": 6946, + "end": 6954, "loc": { "start": { "line": 180, @@ -10620,8 +10434,8 @@ }, "property": { "type": "Identifier", - "start": 7031, - "end": 7044, + "start": 6955, + "end": 6968, "loc": { "start": { "line": 180, @@ -10639,8 +10453,8 @@ }, "property": { "type": "Identifier", - "start": 7045, - "end": 7049, + "start": 6969, + "end": 6973, "loc": { "start": { "line": 180, @@ -10662,8 +10476,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 7001, - "end": 7015, + "start": 6925, + "end": 6939, "loc": { "start": { "line": 180, @@ -10682,8 +10496,8 @@ }, { "type": "TemplateElement", - "start": 7052, - "end": 7052, + "start": 6976, + "end": 6976, "loc": { "start": { "line": 180, @@ -10712,8 +10526,8 @@ { "type": "CommentLine", "value": " Otherwise, we could try to construct the occurrenceID from its components.", - "start": 6317, - "end": 6394, + "start": 6241, + "end": 6318, "loc": { "start": { "line": 169, @@ -10730,8 +10544,8 @@ { "type": "CommentLine", "value": " None of our specimen identifier schemes worked.", - "start": 7066, - "end": 7116, + "start": 6990, + "end": 7040, "loc": { "start": { "line": 183, @@ -10747,8 +10561,8 @@ }, { "type": "ReturnStatement", - "start": 7121, - "end": 7138, + "start": 7045, + "end": 7062, "loc": { "start": { "line": 184, @@ -10761,8 +10575,8 @@ }, "argument": { "type": "Identifier", - "start": 7128, - "end": 7137, + "start": 7052, + "end": 7061, "loc": { "start": { "line": 184, @@ -10781,8 +10595,8 @@ { "type": "CommentLine", "value": " None of our specimen identifier schemes worked.", - "start": 7066, - "end": 7116, + "start": 6990, + "end": 7040, "loc": { "start": { "line": 183, @@ -10804,8 +10618,8 @@ { "type": "CommentBlock", "value": "*\n * Return the occurrence ID of this specimen, if we have one. Otherwise, we\n * attempt to construct one in the form:\n * \"urn:catalog:\" + institutionCode (if present) + ':' +\n * collectionCode (if present) + ':' + catalogNumber (if present)\n ", - "start": 5840, - "end": 6099, + "start": 5808, + "end": 6067, "loc": { "start": { "line": 157, @@ -10822,8 +10636,8 @@ { "type": "CommentBlock", "value": "*\n * Return the basis of record, if one is present.\n ", - "start": 7146, - "end": 7207, + "start": 7070, + "end": 7131, "loc": { "start": { "line": 187, @@ -10839,8 +10653,8 @@ }, { "type": "ClassMethod", - "start": 7210, - "end": 7349, + "start": 7134, + "end": 7262, "loc": { "start": { "line": 190, @@ -10855,8 +10669,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 7214, - "end": 7227, + "start": 7138, + "end": 7151, "loc": { "start": { "line": 190, @@ -10878,8 +10692,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 7230, - "end": 7349, + "start": 7154, + "end": 7262, "loc": { "start": { "line": 190, @@ -10893,8 +10707,8 @@ "body": [ { "type": "IfStatement", - "start": 7236, - "end": 7323, + "start": 7160, + "end": 7236, "loc": { "start": { "line": 191, @@ -10902,13 +10716,13 @@ }, "end": { "line": 191, - "column": 91 + "column": 80 } }, "test": { "type": "CallExpression", - "start": 7240, - "end": 7279, + "start": 7164, + "end": 7199, "loc": { "start": { "line": 191, @@ -10916,13 +10730,13 @@ }, "end": { "line": 191, - "column": 47 + "column": 43 } }, "callee": { "type": "Identifier", - "start": 7240, - "end": 7243, + "start": 7164, + "end": 7167, "loc": { "start": { "line": 191, @@ -10939,8 +10753,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 7244, - "end": 7257, + "start": 7168, + "end": 7181, "loc": { "start": { "line": 191, @@ -10953,8 +10767,8 @@ }, "object": { "type": "ThisExpression", - "start": 7244, - "end": 7248, + "start": 7168, + "end": 7172, "loc": { "start": { "line": 191, @@ -10968,8 +10782,8 @@ }, "property": { "type": "Identifier", - "start": 7249, - "end": 7257, + "start": 7173, + "end": 7181, "loc": { "start": { "line": 191, @@ -10987,8 +10801,8 @@ }, { "type": "StringLiteral", - "start": 7259, - "end": 7278, + "start": 7183, + "end": 7198, "loc": { "start": { "line": 191, @@ -10996,86 +10810,86 @@ }, "end": { "line": 191, - "column": 46 + "column": 42 } }, "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "rawValue": "basisOfRecord", + "raw": "'basisOfRecord'" }, - "value": "dwc:basisOfRecord" + "value": "basisOfRecord" } ] }, "consequent": { "type": "ReturnStatement", - "start": 7281, - "end": 7323, + "start": 7201, + "end": 7236, "loc": { "start": { "line": 191, - "column": 49 + "column": 45 }, "end": { "line": 191, - "column": 91 + "column": 80 } }, "argument": { "type": "MemberExpression", - "start": 7288, - "end": 7322, + "start": 7208, + "end": 7235, "loc": { "start": { "line": 191, - "column": 56 + "column": 52 }, "end": { "line": 191, - "column": 90 + "column": 79 } }, "object": { "type": "MemberExpression", - "start": 7288, - "end": 7301, + "start": 7208, + "end": 7221, "loc": { "start": { "line": 191, - "column": 56 + "column": 52 }, "end": { "line": 191, - "column": 69 + "column": 65 } }, "object": { "type": "ThisExpression", - "start": 7288, - "end": 7292, + "start": 7208, + "end": 7212, "loc": { "start": { "line": 191, - "column": 56 + "column": 52 }, "end": { "line": 191, - "column": 60 + "column": 56 } } }, "property": { "type": "Identifier", - "start": 7293, - "end": 7301, + "start": 7213, + "end": 7221, "loc": { "start": { "line": 191, - "column": 61 + "column": 57 }, "end": { "line": 191, - "column": 69 + "column": 65 }, "identifierName": "specimen" }, @@ -11084,34 +10898,31 @@ "computed": false }, "property": { - "type": "StringLiteral", - "start": 7302, - "end": 7321, + "type": "Identifier", + "start": 7222, + "end": 7235, "loc": { "start": { "line": 191, - "column": 70 + "column": 66 }, "end": { "line": 191, - "column": 89 - } - }, - "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "column": 79 + }, + "identifierName": "basisOfRecord" }, - "value": "dwc:basisOfRecord" + "name": "basisOfRecord" }, - "computed": true + "computed": false } }, "alternate": null }, { "type": "ReturnStatement", - "start": 7328, - "end": 7345, + "start": 7241, + "end": 7258, "loc": { "start": { "line": 192, @@ -11124,8 +10935,8 @@ }, "argument": { "type": "Identifier", - "start": 7335, - "end": 7344, + "start": 7248, + "end": 7257, "loc": { "start": { "line": 192, @@ -11148,8 +10959,8 @@ { "type": "CommentBlock", "value": "*\n * Return the basis of record, if one is present.\n ", - "start": 7146, - "end": 7207, + "start": 7070, + "end": 7131, "loc": { "start": { "line": 187, @@ -11166,8 +10977,8 @@ { "type": "CommentBlock", "value": "*\n * Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for\n * recommended values.\n ", - "start": 7353, - "end": 7468, + "start": 7266, + "end": 7381, "loc": { "start": { "line": 195, @@ -11183,8 +10994,8 @@ }, { "type": "ClassMethod", - "start": 7471, - "end": 7545, + "start": 7384, + "end": 7451, "loc": { "start": { "line": 199, @@ -11199,8 +11010,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 7475, - "end": 7488, + "start": 7388, + "end": 7401, "loc": { "start": { "line": 199, @@ -11222,8 +11033,8 @@ "params": [ { "type": "Identifier", - "start": 7489, - "end": 7492, + "start": 7402, + "end": 7405, "loc": { "start": { "line": 199, @@ -11240,8 +11051,8 @@ ], "body": { "type": "BlockStatement", - "start": 7494, - "end": 7545, + "start": 7407, + "end": 7451, "loc": { "start": { "line": 199, @@ -11255,8 +11066,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 7500, - "end": 7541, + "start": 7413, + "end": 7447, "loc": { "start": { "line": 200, @@ -11264,13 +11075,13 @@ }, "end": { "line": 200, - "column": 45 + "column": 38 } }, "expression": { "type": "AssignmentExpression", - "start": 7500, - "end": 7540, + "start": 7413, + "end": 7446, "loc": { "start": { "line": 200, @@ -11278,14 +11089,14 @@ }, "end": { "line": 200, - "column": 44 + "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 7500, - "end": 7534, + "start": 7413, + "end": 7440, "loc": { "start": { "line": 200, @@ -11293,13 +11104,13 @@ }, "end": { "line": 200, - "column": 38 + "column": 31 } }, "object": { "type": "MemberExpression", - "start": 7500, - "end": 7513, + "start": 7413, + "end": 7426, "loc": { "start": { "line": 200, @@ -11312,8 +11123,8 @@ }, "object": { "type": "ThisExpression", - "start": 7500, - "end": 7504, + "start": 7413, + "end": 7417, "loc": { "start": { "line": 200, @@ -11327,8 +11138,8 @@ }, "property": { "type": "Identifier", - "start": 7505, - "end": 7513, + "start": 7418, + "end": 7426, "loc": { "start": { "line": 200, @@ -11345,9 +11156,9 @@ "computed": false }, "property": { - "type": "StringLiteral", - "start": 7514, - "end": 7533, + "type": "Identifier", + "start": 7427, + "end": 7440, "loc": { "start": { "line": 200, @@ -11355,29 +11166,26 @@ }, "end": { "line": 200, - "column": 37 - } - }, - "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "column": 31 + }, + "identifierName": "basisOfRecord" }, - "value": "dwc:basisOfRecord" + "name": "basisOfRecord" }, - "computed": true + "computed": false }, "right": { "type": "Identifier", - "start": 7537, - "end": 7540, + "start": 7443, + "end": 7446, "loc": { "start": { "line": 200, - "column": 41 + "column": 34 }, "end": { "line": 200, - "column": 44 + "column": 37 }, "identifierName": "bor" }, @@ -11393,8 +11201,8 @@ { "type": "CommentBlock", "value": "*\n * Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for\n * recommended values.\n ", - "start": 7353, - "end": 7468, + "start": 7266, + "end": 7381, "loc": { "start": { "line": 195, @@ -11411,8 +11219,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as a taxon concept if it contains taxon name information. ", - "start": 7549, - "end": 7634, + "start": 7455, + "end": 7540, "loc": { "start": { "line": 203, @@ -11428,8 +11236,8 @@ }, { "type": "ClassMethod", - "start": 7637, - "end": 7808, + "start": 7543, + "end": 7714, "loc": { "start": { "line": 204, @@ -11444,8 +11252,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 7641, - "end": 7653, + "start": 7547, + "end": 7559, "loc": { "start": { "line": 204, @@ -11467,8 +11275,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 7656, - "end": 7808, + "start": 7562, + "end": 7714, "loc": { "start": { "line": 204, @@ -11482,8 +11290,8 @@ "body": [ { "type": "IfStatement", - "start": 7662, - "end": 7718, + "start": 7568, + "end": 7624, "loc": { "start": { "line": 205, @@ -11496,8 +11304,8 @@ }, "test": { "type": "CallExpression", - "start": 7666, - "end": 7695, + "start": 7572, + "end": 7601, "loc": { "start": { "line": 205, @@ -11510,8 +11318,8 @@ }, "callee": { "type": "Identifier", - "start": 7666, - "end": 7669, + "start": 7572, + "end": 7575, "loc": { "start": { "line": 205, @@ -11528,8 +11336,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 7670, - "end": 7683, + "start": 7576, + "end": 7589, "loc": { "start": { "line": 205, @@ -11542,8 +11350,8 @@ }, "object": { "type": "ThisExpression", - "start": 7670, - "end": 7674, + "start": 7576, + "end": 7580, "loc": { "start": { "line": 205, @@ -11557,8 +11365,8 @@ }, "property": { "type": "Identifier", - "start": 7675, - "end": 7683, + "start": 7581, + "end": 7589, "loc": { "start": { "line": 205, @@ -11576,8 +11384,8 @@ }, { "type": "StringLiteral", - "start": 7685, - "end": 7694, + "start": 7591, + "end": 7600, "loc": { "start": { "line": 205, @@ -11598,8 +11406,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 7697, - "end": 7718, + "start": 7603, + "end": 7624, "loc": { "start": { "line": 205, @@ -11612,8 +11420,8 @@ }, "argument": { "type": "MemberExpression", - "start": 7704, - "end": 7717, + "start": 7610, + "end": 7623, "loc": { "start": { "line": 205, @@ -11626,8 +11434,8 @@ }, "object": { "type": "ThisExpression", - "start": 7704, - "end": 7708, + "start": 7610, + "end": 7614, "loc": { "start": { "line": 205, @@ -11641,8 +11449,8 @@ }, "property": { "type": "Identifier", - "start": 7709, - "end": 7717, + "start": 7615, + "end": 7623, "loc": { "start": { "line": 205, @@ -11663,8 +11471,8 @@ }, { "type": "IfStatement", - "start": 7723, - "end": 7782, + "start": 7629, + "end": 7688, "loc": { "start": { "line": 206, @@ -11677,8 +11485,8 @@ }, "test": { "type": "CallExpression", - "start": 7727, - "end": 7759, + "start": 7633, + "end": 7665, "loc": { "start": { "line": 206, @@ -11691,8 +11499,8 @@ }, "callee": { "type": "Identifier", - "start": 7727, - "end": 7730, + "start": 7633, + "end": 7636, "loc": { "start": { "line": 206, @@ -11709,8 +11517,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 7731, - "end": 7744, + "start": 7637, + "end": 7650, "loc": { "start": { "line": 206, @@ -11723,8 +11531,8 @@ }, "object": { "type": "ThisExpression", - "start": 7731, - "end": 7735, + "start": 7637, + "end": 7641, "loc": { "start": { "line": 206, @@ -11738,8 +11546,8 @@ }, "property": { "type": "Identifier", - "start": 7736, - "end": 7744, + "start": 7642, + "end": 7650, "loc": { "start": { "line": 206, @@ -11757,8 +11565,8 @@ }, { "type": "StringLiteral", - "start": 7746, - "end": 7758, + "start": 7652, + "end": 7664, "loc": { "start": { "line": 206, @@ -11779,8 +11587,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 7761, - "end": 7782, + "start": 7667, + "end": 7688, "loc": { "start": { "line": 206, @@ -11793,8 +11601,8 @@ }, "argument": { "type": "MemberExpression", - "start": 7768, - "end": 7781, + "start": 7674, + "end": 7687, "loc": { "start": { "line": 206, @@ -11807,8 +11615,8 @@ }, "object": { "type": "ThisExpression", - "start": 7768, - "end": 7772, + "start": 7674, + "end": 7678, "loc": { "start": { "line": 206, @@ -11822,8 +11630,8 @@ }, "property": { "type": "Identifier", - "start": 7773, - "end": 7781, + "start": 7679, + "end": 7687, "loc": { "start": { "line": 206, @@ -11844,8 +11652,8 @@ }, { "type": "ReturnStatement", - "start": 7787, - "end": 7804, + "start": 7693, + "end": 7710, "loc": { "start": { "line": 207, @@ -11858,8 +11666,8 @@ }, "argument": { "type": "Identifier", - "start": 7794, - "end": 7803, + "start": 7700, + "end": 7709, "loc": { "start": { "line": 207, @@ -11882,8 +11690,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as a taxon concept if it contains taxon name information. ", - "start": 7549, - "end": 7634, + "start": 7455, + "end": 7540, "loc": { "start": { "line": 203, @@ -11900,8 +11708,8 @@ { "type": "CommentBlock", "value": "* Return a label for this specimen. ", - "start": 7812, - "end": 7852, + "start": 7718, + "end": 7758, "loc": { "start": { "line": 210, @@ -11917,8 +11725,8 @@ }, { "type": "ClassMethod", - "start": 7855, - "end": 8337, + "start": 7761, + "end": 8243, "loc": { "start": { "line": 211, @@ -11933,8 +11741,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 7859, - "end": 7864, + "start": 7765, + "end": 7770, "loc": { "start": { "line": 211, @@ -11956,8 +11764,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 7867, - "end": 8337, + "start": 7773, + "end": 8243, "loc": { "start": { "line": 211, @@ -11971,8 +11779,8 @@ "body": [ { "type": "IfStatement", - "start": 7930, - "end": 7971, + "start": 7836, + "end": 7877, "loc": { "start": { "line": 213, @@ -11985,8 +11793,8 @@ }, "test": { "type": "UnaryExpression", - "start": 7934, - "end": 7952, + "start": 7840, + "end": 7858, "loc": { "start": { "line": 213, @@ -12001,8 +11809,8 @@ "prefix": true, "argument": { "type": "MemberExpression", - "start": 7935, - "end": 7952, + "start": 7841, + "end": 7858, "loc": { "start": { "line": 213, @@ -12015,8 +11823,8 @@ }, "object": { "type": "ThisExpression", - "start": 7935, - "end": 7939, + "start": 7841, + "end": 7845, "loc": { "start": { "line": 213, @@ -12031,8 +11839,8 @@ }, "property": { "type": "Identifier", - "start": 7940, - "end": 7952, + "start": 7846, + "end": 7858, "loc": { "start": { "line": 213, @@ -12056,8 +11864,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 7954, - "end": 7971, + "start": 7860, + "end": 7877, "loc": { "start": { "line": 213, @@ -12070,8 +11878,8 @@ }, "argument": { "type": "Identifier", - "start": 7961, - "end": 7970, + "start": 7867, + "end": 7876, "loc": { "start": { "line": 213, @@ -12092,8 +11900,8 @@ { "type": "CommentLine", "value": " We can't return anything without an occurrenceID.", - "start": 7873, - "end": 7925, + "start": 7779, + "end": 7831, "loc": { "start": { "line": 212, @@ -12110,8 +11918,8 @@ { "type": "CommentLine", "value": " Note that specimens may be identified to a taxon concept. If so, we should", - "start": 7977, - "end": 8054, + "start": 7883, + "end": 7960, "loc": { "start": { "line": 215, @@ -12126,8 +11934,8 @@ { "type": "CommentLine", "value": " include that information in the label.", - "start": 8059, - "end": 8100, + "start": 7965, + "end": 8006, "loc": { "start": { "line": 216, @@ -12143,8 +11951,8 @@ }, { "type": "IfStatement", - "start": 8105, - "end": 8247, + "start": 8011, + "end": 8153, "loc": { "start": { "line": 217, @@ -12157,8 +11965,8 @@ }, "test": { "type": "MemberExpression", - "start": 8109, - "end": 8126, + "start": 8015, + "end": 8032, "loc": { "start": { "line": 217, @@ -12171,8 +11979,8 @@ }, "object": { "type": "ThisExpression", - "start": 8109, - "end": 8113, + "start": 8015, + "end": 8019, "loc": { "start": { "line": 217, @@ -12187,8 +11995,8 @@ }, "property": { "type": "Identifier", - "start": 8114, - "end": 8126, + "start": 8020, + "end": 8032, "loc": { "start": { "line": 217, @@ -12207,8 +12015,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 8128, - "end": 8247, + "start": 8034, + "end": 8153, "loc": { "start": { "line": 217, @@ -12222,8 +12030,8 @@ "body": [ { "type": "ReturnStatement", - "start": 8136, - "end": 8241, + "start": 8042, + "end": 8147, "loc": { "start": { "line": 218, @@ -12236,8 +12044,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 8143, - "end": 8240, + "start": 8049, + "end": 8146, "loc": { "start": { "line": 218, @@ -12251,8 +12059,8 @@ "expressions": [ { "type": "MemberExpression", - "start": 8155, - "end": 8172, + "start": 8061, + "end": 8078, "loc": { "start": { "line": 218, @@ -12265,8 +12073,8 @@ }, "object": { "type": "ThisExpression", - "start": 8155, - "end": 8159, + "start": 8061, + "end": 8065, "loc": { "start": { "line": 218, @@ -12280,8 +12088,8 @@ }, "property": { "type": "Identifier", - "start": 8160, - "end": 8172, + "start": 8066, + "end": 8078, "loc": { "start": { "line": 218, @@ -12299,8 +12107,8 @@ }, { "type": "MemberExpression", - "start": 8190, - "end": 8238, + "start": 8096, + "end": 8144, "loc": { "start": { "line": 218, @@ -12313,8 +12121,8 @@ }, "object": { "type": "NewExpression", - "start": 8190, - "end": 8232, + "start": 8096, + "end": 8138, "loc": { "start": { "line": 218, @@ -12327,8 +12135,8 @@ }, "callee": { "type": "Identifier", - "start": 8194, - "end": 8213, + "start": 8100, + "end": 8119, "loc": { "start": { "line": 218, @@ -12345,8 +12153,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 8214, - "end": 8231, + "start": 8120, + "end": 8137, "loc": { "start": { "line": 218, @@ -12359,8 +12167,8 @@ }, "object": { "type": "ThisExpression", - "start": 8214, - "end": 8218, + "start": 8120, + "end": 8124, "loc": { "start": { "line": 218, @@ -12374,8 +12182,8 @@ }, "property": { "type": "Identifier", - "start": 8219, - "end": 8231, + "start": 8125, + "end": 8137, "loc": { "start": { "line": 218, @@ -12395,8 +12203,8 @@ }, "property": { "type": "Identifier", - "start": 8233, - "end": 8238, + "start": 8139, + "end": 8144, "loc": { "start": { "line": 218, @@ -12416,8 +12224,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 8144, - "end": 8153, + "start": 8050, + "end": 8059, "loc": { "start": { "line": 218, @@ -12436,8 +12244,8 @@ }, { "type": "TemplateElement", - "start": 8173, - "end": 8188, + "start": 8079, + "end": 8094, "loc": { "start": { "line": 218, @@ -12456,8 +12264,8 @@ }, { "type": "TemplateElement", - "start": 8239, - "end": 8239, + "start": 8145, + "end": 8145, "loc": { "start": { "line": 218, @@ -12486,8 +12294,8 @@ { "type": "CommentLine", "value": " Note that specimens may be identified to a taxon concept. If so, we should", - "start": 7977, - "end": 8054, + "start": 7883, + "end": 7960, "loc": { "start": { "line": 215, @@ -12502,8 +12310,8 @@ { "type": "CommentLine", "value": " include that information in the label.", - "start": 8059, - "end": 8100, + "start": 7965, + "end": 8006, "loc": { "start": { "line": 216, @@ -12520,8 +12328,8 @@ { "type": "CommentLine", "value": " Return a label for this specimen.", - "start": 8253, - "end": 8289, + "start": 8159, + "end": 8195, "loc": { "start": { "line": 221, @@ -12537,8 +12345,8 @@ }, { "type": "ReturnStatement", - "start": 8294, - "end": 8333, + "start": 8200, + "end": 8239, "loc": { "start": { "line": 222, @@ -12551,8 +12359,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 8301, - "end": 8332, + "start": 8207, + "end": 8238, "loc": { "start": { "line": 222, @@ -12566,8 +12374,8 @@ "expressions": [ { "type": "MemberExpression", - "start": 8313, - "end": 8330, + "start": 8219, + "end": 8236, "loc": { "start": { "line": 222, @@ -12580,8 +12388,8 @@ }, "object": { "type": "ThisExpression", - "start": 8313, - "end": 8317, + "start": 8219, + "end": 8223, "loc": { "start": { "line": 222, @@ -12595,8 +12403,8 @@ }, "property": { "type": "Identifier", - "start": 8318, - "end": 8330, + "start": 8224, + "end": 8236, "loc": { "start": { "line": 222, @@ -12616,8 +12424,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 8302, - "end": 8311, + "start": 8208, + "end": 8217, "loc": { "start": { "line": 222, @@ -12637,8 +12445,8 @@ }, { "type": "TemplateElement", - "start": 8331, - "end": 8331, + "start": 8237, + "end": 8237, "loc": { "start": { "line": 222, @@ -12662,8 +12470,8 @@ { "type": "CommentLine", "value": " Return a label for this specimen.", - "start": 8253, - "end": 8289, + "start": 8159, + "end": 8195, "loc": { "start": { "line": 221, @@ -12685,8 +12493,8 @@ { "type": "CommentBlock", "value": "* Return a label for this specimen. ", - "start": 7812, - "end": 7852, + "start": 7718, + "end": 7758, "loc": { "start": { "line": 210, @@ -12703,8 +12511,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as an equivalentClass expression. ", - "start": 8341, - "end": 8402, + "start": 8247, + "end": 8308, "loc": { "start": { "line": 225, @@ -12720,8 +12528,8 @@ }, { "type": "ClassMethod", - "start": 8405, - "end": 8834, + "start": 8311, + "end": 8740, "loc": { "start": { "line": 226, @@ -12736,8 +12544,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 8409, - "end": 8424, + "start": 8315, + "end": 8330, "loc": { "start": { "line": 226, @@ -12759,8 +12567,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 8427, - "end": 8834, + "start": 8333, + "end": 8740, "loc": { "start": { "line": 226, @@ -12774,8 +12582,8 @@ "body": [ { "type": "IfStatement", - "start": 8487, - "end": 8528, + "start": 8393, + "end": 8434, "loc": { "start": { "line": 228, @@ -12788,8 +12596,8 @@ }, "test": { "type": "UnaryExpression", - "start": 8491, - "end": 8509, + "start": 8397, + "end": 8415, "loc": { "start": { "line": 228, @@ -12804,8 +12612,8 @@ "prefix": true, "argument": { "type": "MemberExpression", - "start": 8492, - "end": 8509, + "start": 8398, + "end": 8415, "loc": { "start": { "line": 228, @@ -12818,8 +12626,8 @@ }, "object": { "type": "ThisExpression", - "start": 8492, - "end": 8496, + "start": 8398, + "end": 8402, "loc": { "start": { "line": 228, @@ -12834,8 +12642,8 @@ }, "property": { "type": "Identifier", - "start": 8497, - "end": 8509, + "start": 8403, + "end": 8415, "loc": { "start": { "line": 228, @@ -12859,8 +12667,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 8511, - "end": 8528, + "start": 8417, + "end": 8434, "loc": { "start": { "line": 228, @@ -12873,8 +12681,8 @@ }, "argument": { "type": "Identifier", - "start": 8518, - "end": 8527, + "start": 8424, + "end": 8433, "loc": { "start": { "line": 228, @@ -12895,8 +12703,8 @@ { "type": "CommentLine", "value": " We can't do anything without an occurrence ID!", - "start": 8433, - "end": 8482, + "start": 8339, + "end": 8388, "loc": { "start": { "line": 227, @@ -12913,8 +12721,8 @@ { "type": "CommentLine", "value": " TODO: Should we also match by this.taxonConcept is one is available?", - "start": 8534, - "end": 8605, + "start": 8440, + "end": 8511, "loc": { "start": { "line": 230, @@ -12929,8 +12737,8 @@ { "type": "CommentLine", "value": " Technically no, but it might be useful. Hmm.", - "start": 8610, - "end": 8657, + "start": 8516, + "end": 8563, "loc": { "start": { "line": 231, @@ -12945,8 +12753,8 @@ { "type": "CommentLine", "value": " Return as an OWL restriction.", - "start": 8663, - "end": 8695, + "start": 8569, + "end": 8601, "loc": { "start": { "line": 233, @@ -12962,8 +12770,8 @@ }, { "type": "ReturnStatement", - "start": 8700, - "end": 8830, + "start": 8606, + "end": 8736, "loc": { "start": { "line": 234, @@ -12976,8 +12784,8 @@ }, "argument": { "type": "ObjectExpression", - "start": 8707, - "end": 8829, + "start": 8613, + "end": 8735, "loc": { "start": { "line": 234, @@ -12991,8 +12799,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 8715, - "end": 8741, + "start": 8621, + "end": 8647, "loc": { "start": { "line": 235, @@ -13008,8 +12816,8 @@ "computed": false, "key": { "type": "StringLiteral", - "start": 8715, - "end": 8722, + "start": 8621, + "end": 8628, "loc": { "start": { "line": 235, @@ -13029,8 +12837,8 @@ }, "value": { "type": "StringLiteral", - "start": 8724, - "end": 8741, + "start": 8630, + "end": 8647, "loc": { "start": { "line": 235, @@ -13051,8 +12859,8 @@ }, { "type": "ObjectProperty", - "start": 8749, - "end": 8787, + "start": 8655, + "end": 8693, "loc": { "start": { "line": 236, @@ -13068,8 +12876,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 8749, - "end": 8759, + "start": 8655, + "end": 8665, "loc": { "start": { "line": 236, @@ -13085,8 +12893,8 @@ }, "value": { "type": "MemberExpression", - "start": 8761, - "end": 8787, + "start": 8667, + "end": 8693, "loc": { "start": { "line": 236, @@ -13099,8 +12907,8 @@ }, "object": { "type": "Identifier", - "start": 8761, - "end": 8769, + "start": 8667, + "end": 8675, "loc": { "start": { "line": 236, @@ -13116,8 +12924,8 @@ }, "property": { "type": "Identifier", - "start": 8770, - "end": 8787, + "start": 8676, + "end": 8693, "loc": { "start": { "line": 236, @@ -13136,8 +12944,8 @@ }, { "type": "ObjectProperty", - "start": 8795, - "end": 8822, + "start": 8701, + "end": 8728, "loc": { "start": { "line": 237, @@ -13153,8 +12961,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 8795, - "end": 8803, + "start": 8701, + "end": 8709, "loc": { "start": { "line": 237, @@ -13170,8 +12978,8 @@ }, "value": { "type": "MemberExpression", - "start": 8805, - "end": 8822, + "start": 8711, + "end": 8728, "loc": { "start": { "line": 237, @@ -13184,8 +12992,8 @@ }, "object": { "type": "ThisExpression", - "start": 8805, - "end": 8809, + "start": 8711, + "end": 8715, "loc": { "start": { "line": 237, @@ -13199,8 +13007,8 @@ }, "property": { "type": "Identifier", - "start": 8810, - "end": 8822, + "start": 8716, + "end": 8728, "loc": { "start": { "line": 237, @@ -13224,8 +13032,8 @@ { "type": "CommentLine", "value": " TODO: Should we also match by this.taxonConcept is one is available?", - "start": 8534, - "end": 8605, + "start": 8440, + "end": 8511, "loc": { "start": { "line": 230, @@ -13240,8 +13048,8 @@ { "type": "CommentLine", "value": " Technically no, but it might be useful. Hmm.", - "start": 8610, - "end": 8657, + "start": 8516, + "end": 8563, "loc": { "start": { "line": 231, @@ -13256,8 +13064,8 @@ { "type": "CommentLine", "value": " Return as an OWL restriction.", - "start": 8663, - "end": 8695, + "start": 8569, + "end": 8601, "loc": { "start": { "line": 233, @@ -13278,8 +13086,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as an equivalentClass expression. ", - "start": 8341, - "end": 8402, + "start": 8247, + "end": 8308, "loc": { "start": { "line": 225, @@ -13301,8 +13109,8 @@ }, { "type": "ExportNamedDeclaration", - "start": 8838, - "end": 8866, + "start": 8744, + "end": 8772, "loc": { "start": { "line": 242, @@ -13317,8 +13125,8 @@ "specifiers": [ { "type": "ExportSpecifier", - "start": 8847, - "end": 8862, + "start": 8753, + "end": 8768, "loc": { "start": { "line": 242, @@ -13331,8 +13139,8 @@ }, "local": { "type": "Identifier", - "start": 8847, - "end": 8862, + "start": 8753, + "end": 8768, "loc": { "start": { "line": 242, @@ -13348,8 +13156,8 @@ }, "exported": { "type": "Identifier", - "start": 8847, - "end": 8862, + "start": 8753, + "end": 8768, "loc": { "start": { "line": 242, @@ -13369,8 +13177,8 @@ }, { "type": "ExportNamedDeclaration", - "start": 8838, - "end": 8866, + "start": 8744, + "end": 8772, "loc": { "start": { "line": 242, @@ -13383,8 +13191,8 @@ }, "declaration": { "type": "ClassDeclaration", - "start": 1089, - "end": 8836, + "start": 1081, + "end": 8742, "loc": { "start": { "line": 24, @@ -13397,8 +13205,8 @@ }, "id": { "type": "Identifier", - "start": 1095, - "end": 1110, + "start": 1087, + "end": 1102, "loc": { "start": { "line": 24, @@ -13416,8 +13224,8 @@ "superClass": null, "body": { "type": "ClassBody", - "start": 1111, - "end": 8836, + "start": 1103, + "end": 8742, "loc": { "start": { "line": 24, @@ -13431,8 +13239,8 @@ "body": [ { "type": "ClassMethod", - "start": 1170, - "end": 1238, + "start": 1162, + "end": 1230, "loc": { "start": { "line": 26, @@ -13447,8 +13255,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1181, - "end": 1194, + "start": 1173, + "end": 1186, "loc": { "start": { "line": 26, @@ -13470,8 +13278,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 1197, - "end": 1238, + "start": 1189, + "end": 1230, "loc": { "start": { "line": 26, @@ -13485,8 +13293,8 @@ "body": [ { "type": "ReturnStatement", - "start": 1203, - "end": 1234, + "start": 1195, + "end": 1226, "loc": { "start": { "line": 27, @@ -13499,8 +13307,8 @@ }, "argument": { "type": "MemberExpression", - "start": 1210, - "end": 1233, + "start": 1202, + "end": 1225, "loc": { "start": { "line": 27, @@ -13513,8 +13321,8 @@ }, "object": { "type": "Identifier", - "start": 1210, - "end": 1218, + "start": 1202, + "end": 1210, "loc": { "start": { "line": 27, @@ -13530,8 +13338,8 @@ }, "property": { "type": "Identifier", - "start": 1219, - "end": 1233, + "start": 1211, + "end": 1225, "loc": { "start": { "line": 27, @@ -13556,8 +13364,8 @@ { "type": "CommentBlock", "value": "* The '@type' of specimens in JSON-LD document. ", - "start": 1115, - "end": 1167, + "start": 1107, + "end": 1159, "loc": { "start": { "line": 25, @@ -13574,8 +13382,8 @@ { "type": "CommentBlock", "value": "* Construct a wrapper around a specimen. ", - "start": 1242, - "end": 1287, + "start": 1234, + "end": 1279, "loc": { "start": { "line": 30, @@ -13591,8 +13399,8 @@ }, { "type": "ClassMethod", - "start": 1290, - "end": 1347, + "start": 1282, + "end": 1339, "loc": { "start": { "line": 31, @@ -13607,8 +13415,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1290, - "end": 1301, + "start": 1282, + "end": 1293, "loc": { "start": { "line": 31, @@ -13631,8 +13439,8 @@ "params": [ { "type": "Identifier", - "start": 1302, - "end": 1310, + "start": 1294, + "end": 1302, "loc": { "start": { "line": 31, @@ -13649,8 +13457,8 @@ ], "body": { "type": "BlockStatement", - "start": 1312, - "end": 1347, + "start": 1304, + "end": 1339, "loc": { "start": { "line": 31, @@ -13664,8 +13472,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 1318, - "end": 1343, + "start": 1310, + "end": 1335, "loc": { "start": { "line": 32, @@ -13678,8 +13486,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 1318, - "end": 1342, + "start": 1310, + "end": 1334, "loc": { "start": { "line": 32, @@ -13693,8 +13501,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 1318, - "end": 1331, + "start": 1310, + "end": 1323, "loc": { "start": { "line": 32, @@ -13707,8 +13515,8 @@ }, "object": { "type": "ThisExpression", - "start": 1318, - "end": 1322, + "start": 1310, + "end": 1314, "loc": { "start": { "line": 32, @@ -13722,8 +13530,8 @@ }, "property": { "type": "Identifier", - "start": 1323, - "end": 1331, + "start": 1315, + "end": 1323, "loc": { "start": { "line": 32, @@ -13741,8 +13549,8 @@ }, "right": { "type": "Identifier", - "start": 1334, - "end": 1342, + "start": 1326, + "end": 1334, "loc": { "start": { "line": 32, @@ -13766,8 +13574,8 @@ { "type": "CommentBlock", "value": "* Construct a wrapper around a specimen. ", - "start": 1242, - "end": 1287, + "start": 1234, + "end": 1279, "loc": { "start": { "line": 30, @@ -13784,8 +13592,8 @@ { "type": "CommentBlock", "value": "*\n * Normalize the specified specimen.\n * @param specimen A specimen to be normalized.\n ", - "start": 1351, - "end": 1449, + "start": 1343, + "end": 1441, "loc": { "start": { "line": 35, @@ -13801,8 +13609,8 @@ }, { "type": "ClassMethod", - "start": 1452, - "end": 1982, + "start": 1444, + "end": 1968, "loc": { "start": { "line": 39, @@ -13817,8 +13625,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1459, - "end": 1468, + "start": 1451, + "end": 1460, "loc": { "start": { "line": 39, @@ -13840,8 +13648,8 @@ "params": [ { "type": "Identifier", - "start": 1469, - "end": 1477, + "start": 1461, + "end": 1469, "loc": { "start": { "line": 39, @@ -13858,8 +13666,8 @@ ], "body": { "type": "BlockStatement", - "start": 1479, - "end": 1982, + "start": 1471, + "end": 1968, "loc": { "start": { "line": 39, @@ -13873,8 +13681,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 1485, - "end": 1531, + "start": 1477, + "end": 1523, "loc": { "start": { "line": 40, @@ -13888,8 +13696,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 1491, - "end": 1530, + "start": 1483, + "end": 1522, "loc": { "start": { "line": 40, @@ -13902,8 +13710,8 @@ }, "id": { "type": "Identifier", - "start": 1491, - "end": 1498, + "start": 1483, + "end": 1490, "loc": { "start": { "line": 40, @@ -13919,8 +13727,8 @@ }, "init": { "type": "NewExpression", - "start": 1501, - "end": 1530, + "start": 1493, + "end": 1522, "loc": { "start": { "line": 40, @@ -13933,8 +13741,8 @@ }, "callee": { "type": "Identifier", - "start": 1505, - "end": 1520, + "start": 1497, + "end": 1512, "loc": { "start": { "line": 40, @@ -13951,8 +13759,8 @@ "arguments": [ { "type": "Identifier", - "start": 1521, - "end": 1529, + "start": 1513, + "end": 1521, "loc": { "start": { "line": 40, @@ -13974,8 +13782,8 @@ }, { "type": "VariableDeclaration", - "start": 1536, - "end": 1875, + "start": 1528, + "end": 1861, "loc": { "start": { "line": 41, @@ -13989,8 +13797,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 1542, - "end": 1874, + "start": 1534, + "end": 1860, "loc": { "start": { "line": 41, @@ -14003,8 +13811,8 @@ }, "id": { "type": "Identifier", - "start": 1542, - "end": 1560, + "start": 1534, + "end": 1552, "loc": { "start": { "line": 41, @@ -14020,8 +13828,8 @@ }, "init": { "type": "ObjectExpression", - "start": 1563, - "end": 1874, + "start": 1555, + "end": 1860, "loc": { "start": { "line": 41, @@ -14035,8 +13843,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1571, - "end": 1609, + "start": 1563, + "end": 1601, "loc": { "start": { "line": 42, @@ -14052,8 +13860,8 @@ "computed": false, "key": { "type": "StringLiteral", - "start": 1571, - "end": 1578, + "start": 1563, + "end": 1570, "loc": { "start": { "line": 42, @@ -14072,8 +13880,8 @@ }, "value": { "type": "MemberExpression", - "start": 1580, - "end": 1609, + "start": 1572, + "end": 1601, "loc": { "start": { "line": 42, @@ -14086,8 +13894,8 @@ }, "object": { "type": "Identifier", - "start": 1580, - "end": 1595, + "start": 1572, + "end": 1587, "loc": { "start": { "line": 42, @@ -14103,8 +13911,8 @@ }, "property": { "type": "Identifier", - "start": 1596, - "end": 1609, + "start": 1588, + "end": 1601, "loc": { "start": { "line": 42, @@ -14123,8 +13931,8 @@ }, { "type": "ObjectProperty", - "start": 1617, - "end": 1637, + "start": 1609, + "end": 1629, "loc": { "start": { "line": 43, @@ -14140,8 +13948,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1617, - "end": 1622, + "start": 1609, + "end": 1614, "loc": { "start": { "line": 43, @@ -14157,8 +13965,8 @@ }, "value": { "type": "MemberExpression", - "start": 1624, - "end": 1637, + "start": 1616, + "end": 1629, "loc": { "start": { "line": 43, @@ -14171,8 +13979,8 @@ }, "object": { "type": "Identifier", - "start": 1624, - "end": 1631, + "start": 1616, + "end": 1623, "loc": { "start": { "line": 43, @@ -14188,8 +13996,8 @@ }, "property": { "type": "Identifier", - "start": 1632, - "end": 1637, + "start": 1624, + "end": 1629, "loc": { "start": { "line": 43, @@ -14208,8 +14016,8 @@ }, { "type": "ObjectProperty", - "start": 1645, - "end": 1687, + "start": 1637, + "end": 1673, "loc": { "start": { "line": 44, @@ -14217,16 +14025,16 @@ }, "end": { "line": 44, - "column": 48 + "column": 42 } }, "method": false, "shorthand": false, "computed": false, "key": { - "type": "StringLiteral", - "start": 1645, - "end": 1664, + "type": "Identifier", + "start": 1637, + "end": 1650, "loc": { "start": { "line": 44, @@ -14234,41 +14042,38 @@ }, "end": { "line": 44, - "column": 25 - } - }, - "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "column": 19 + }, + "identifierName": "basisOfRecord" }, - "value": "dwc:basisOfRecord" + "name": "basisOfRecord" }, "value": { "type": "MemberExpression", - "start": 1666, - "end": 1687, + "start": 1652, + "end": 1673, "loc": { "start": { "line": 44, - "column": 27 + "column": 21 }, "end": { "line": 44, - "column": 48 + "column": 42 } }, "object": { "type": "Identifier", - "start": 1666, - "end": 1673, + "start": 1652, + "end": 1659, "loc": { "start": { "line": 44, - "column": 27 + "column": 21 }, "end": { "line": 44, - "column": 34 + "column": 28 }, "identifierName": "wrapped" }, @@ -14276,16 +14081,16 @@ }, "property": { "type": "Identifier", - "start": 1674, - "end": 1687, + "start": 1660, + "end": 1673, "loc": { "start": { "line": 44, - "column": 35 + "column": 29 }, "end": { "line": 44, - "column": 48 + "column": 42 }, "identifierName": "basisOfRecord" }, @@ -14296,8 +14101,8 @@ }, { "type": "ObjectProperty", - "start": 1695, - "end": 1729, + "start": 1681, + "end": 1715, "loc": { "start": { "line": 45, @@ -14313,8 +14118,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1695, - "end": 1707, + "start": 1681, + "end": 1693, "loc": { "start": { "line": 45, @@ -14330,8 +14135,8 @@ }, "value": { "type": "MemberExpression", - "start": 1709, - "end": 1729, + "start": 1695, + "end": 1715, "loc": { "start": { "line": 45, @@ -14344,8 +14149,8 @@ }, "object": { "type": "Identifier", - "start": 1709, - "end": 1716, + "start": 1695, + "end": 1702, "loc": { "start": { "line": 45, @@ -14361,8 +14166,8 @@ }, "property": { "type": "Identifier", - "start": 1717, - "end": 1729, + "start": 1703, + "end": 1715, "loc": { "start": { "line": 45, @@ -14381,8 +14186,8 @@ }, { "type": "ObjectProperty", - "start": 1737, - "end": 1773, + "start": 1723, + "end": 1759, "loc": { "start": { "line": 46, @@ -14398,8 +14203,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1737, - "end": 1750, + "start": 1723, + "end": 1736, "loc": { "start": { "line": 46, @@ -14415,8 +14220,8 @@ }, "value": { "type": "MemberExpression", - "start": 1752, - "end": 1773, + "start": 1738, + "end": 1759, "loc": { "start": { "line": 46, @@ -14429,8 +14234,8 @@ }, "object": { "type": "Identifier", - "start": 1752, - "end": 1759, + "start": 1738, + "end": 1745, "loc": { "start": { "line": 46, @@ -14446,8 +14251,8 @@ }, "property": { "type": "Identifier", - "start": 1760, - "end": 1773, + "start": 1746, + "end": 1759, "loc": { "start": { "line": 46, @@ -14466,8 +14271,8 @@ }, { "type": "ObjectProperty", - "start": 1781, - "end": 1821, + "start": 1767, + "end": 1807, "loc": { "start": { "line": 47, @@ -14483,8 +14288,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1781, - "end": 1796, + "start": 1767, + "end": 1782, "loc": { "start": { "line": 47, @@ -14500,8 +14305,8 @@ }, "value": { "type": "MemberExpression", - "start": 1798, - "end": 1821, + "start": 1784, + "end": 1807, "loc": { "start": { "line": 47, @@ -14514,8 +14319,8 @@ }, "object": { "type": "Identifier", - "start": 1798, - "end": 1805, + "start": 1784, + "end": 1791, "loc": { "start": { "line": 47, @@ -14531,8 +14336,8 @@ }, "property": { "type": "Identifier", - "start": 1806, - "end": 1821, + "start": 1792, + "end": 1807, "loc": { "start": { "line": 47, @@ -14551,8 +14356,8 @@ }, { "type": "ObjectProperty", - "start": 1829, - "end": 1867, + "start": 1815, + "end": 1853, "loc": { "start": { "line": 48, @@ -14568,8 +14373,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1829, - "end": 1843, + "start": 1815, + "end": 1829, "loc": { "start": { "line": 48, @@ -14585,8 +14390,8 @@ }, "value": { "type": "MemberExpression", - "start": 1845, - "end": 1867, + "start": 1831, + "end": 1853, "loc": { "start": { "line": 48, @@ -14599,8 +14404,8 @@ }, "object": { "type": "Identifier", - "start": 1845, - "end": 1852, + "start": 1831, + "end": 1838, "loc": { "start": { "line": 48, @@ -14616,8 +14421,8 @@ }, "property": { "type": "Identifier", - "start": 1853, - "end": 1867, + "start": 1839, + "end": 1853, "loc": { "start": { "line": 48, @@ -14642,8 +14447,8 @@ }, { "type": "IfStatement", - "start": 1880, - "end": 1947, + "start": 1866, + "end": 1933, "loc": { "start": { "line": 50, @@ -14656,8 +14461,8 @@ }, "test": { "type": "BinaryExpression", - "start": 1884, - "end": 1901, + "start": 1870, + "end": 1887, "loc": { "start": { "line": 50, @@ -14670,8 +14475,8 @@ }, "left": { "type": "StringLiteral", - "start": 1884, - "end": 1889, + "start": 1870, + "end": 1875, "loc": { "start": { "line": 50, @@ -14691,8 +14496,8 @@ "operator": "in", "right": { "type": "Identifier", - "start": 1893, - "end": 1901, + "start": 1879, + "end": 1887, "loc": { "start": { "line": 50, @@ -14709,8 +14514,8 @@ }, "consequent": { "type": "ExpressionStatement", - "start": 1903, - "end": 1947, + "start": 1889, + "end": 1933, "loc": { "start": { "line": 50, @@ -14723,8 +14528,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 1903, - "end": 1946, + "start": 1889, + "end": 1932, "loc": { "start": { "line": 50, @@ -14738,8 +14543,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 1903, - "end": 1928, + "start": 1889, + "end": 1914, "loc": { "start": { "line": 50, @@ -14752,8 +14557,8 @@ }, "object": { "type": "Identifier", - "start": 1903, - "end": 1921, + "start": 1889, + "end": 1907, "loc": { "start": { "line": 50, @@ -14769,8 +14574,8 @@ }, "property": { "type": "StringLiteral", - "start": 1922, - "end": 1927, + "start": 1908, + "end": 1913, "loc": { "start": { "line": 50, @@ -14791,8 +14596,8 @@ }, "right": { "type": "MemberExpression", - "start": 1931, - "end": 1946, + "start": 1917, + "end": 1932, "loc": { "start": { "line": 50, @@ -14805,8 +14610,8 @@ }, "object": { "type": "Identifier", - "start": 1931, - "end": 1939, + "start": 1917, + "end": 1925, "loc": { "start": { "line": 50, @@ -14822,8 +14627,8 @@ }, "property": { "type": "StringLiteral", - "start": 1940, - "end": 1945, + "start": 1926, + "end": 1931, "loc": { "start": { "line": 50, @@ -14848,8 +14653,8 @@ }, { "type": "ReturnStatement", - "start": 1952, - "end": 1978, + "start": 1938, + "end": 1964, "loc": { "start": { "line": 51, @@ -14862,8 +14667,8 @@ }, "argument": { "type": "Identifier", - "start": 1959, - "end": 1977, + "start": 1945, + "end": 1963, "loc": { "start": { "line": 51, @@ -14886,8 +14691,8 @@ { "type": "CommentBlock", "value": "*\n * Normalize the specified specimen.\n * @param specimen A specimen to be normalized.\n ", - "start": 1351, - "end": 1449, + "start": 1343, + "end": 1441, "loc": { "start": { "line": 35, @@ -14904,8 +14709,8 @@ { "type": "CommentBlock", "value": "*\n * Parse the provided occurrence ID. The two expected formats are:\n * - 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]'\n * (in which case, we ignore the first two \"components\" here)\n * - '[institutionCode]:[collectionCode]:[catalogNumber]'\n ", - "start": 1986, - "end": 2267, + "start": 1972, + "end": 2253, "loc": { "start": { "line": 54, @@ -14921,8 +14726,8 @@ }, { "type": "ClassMethod", - "start": 2270, - "end": 4105, + "start": 2256, + "end": 4073, "loc": { "start": { "line": 60, @@ -14937,8 +14742,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2277, - "end": 2293, + "start": 2263, + "end": 2279, "loc": { "start": { "line": 60, @@ -14960,8 +14765,8 @@ "params": [ { "type": "Identifier", - "start": 2294, - "end": 2306, + "start": 2280, + "end": 2292, "loc": { "start": { "line": 60, @@ -14977,8 +14782,8 @@ }, { "type": "AssignmentPattern", - "start": 2308, - "end": 2343, + "start": 2294, + "end": 2329, "loc": { "start": { "line": 60, @@ -14991,8 +14796,8 @@ }, "left": { "type": "Identifier", - "start": 2308, - "end": 2321, + "start": 2294, + "end": 2307, "loc": { "start": { "line": 60, @@ -15008,8 +14813,8 @@ }, "right": { "type": "StringLiteral", - "start": 2324, - "end": 2343, + "start": 2310, + "end": 2329, "loc": { "start": { "line": 60, @@ -15030,8 +14835,8 @@ ], "body": { "type": "BlockStatement", - "start": 2345, - "end": 4105, + "start": 2331, + "end": 4073, "loc": { "start": { "line": 60, @@ -15045,8 +14850,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 2417, - "end": 2444, + "start": 2403, + "end": 2430, "loc": { "start": { "line": 62, @@ -15060,8 +14865,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 2421, - "end": 2443, + "start": 2407, + "end": 2429, "loc": { "start": { "line": 62, @@ -15074,8 +14879,8 @@ }, "id": { "type": "Identifier", - "start": 2421, - "end": 2428, + "start": 2407, + "end": 2414, "loc": { "start": { "line": 62, @@ -15092,8 +14897,8 @@ }, "init": { "type": "Identifier", - "start": 2431, - "end": 2443, + "start": 2417, + "end": 2429, "loc": { "start": { "line": 62, @@ -15115,8 +14920,8 @@ { "type": "CommentLine", "value": " Copy the occurrence ID so we can truncate it if necessary.", - "start": 2351, - "end": 2412, + "start": 2337, + "end": 2398, "loc": { "start": { "line": 61, @@ -15132,8 +14937,8 @@ }, { "type": "IfStatement", - "start": 2449, - "end": 2518, + "start": 2435, + "end": 2507, "loc": { "start": { "line": 63, @@ -15141,13 +14946,13 @@ }, "end": { "line": 63, - "column": 73 + "column": 76 } }, "test": { "type": "CallExpression", - "start": 2453, - "end": 2487, + "start": 2439, + "end": 2473, "loc": { "start": { "line": 63, @@ -15160,8 +14965,8 @@ }, "callee": { "type": "MemberExpression", - "start": 2453, - "end": 2471, + "start": 2439, + "end": 2457, "loc": { "start": { "line": 63, @@ -15174,8 +14979,8 @@ }, "object": { "type": "Identifier", - "start": 2453, - "end": 2460, + "start": 2439, + "end": 2446, "loc": { "start": { "line": 63, @@ -15191,8 +14996,8 @@ }, "property": { "type": "Identifier", - "start": 2461, - "end": 2471, + "start": 2447, + "end": 2457, "loc": { "start": { "line": 63, @@ -15211,8 +15016,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 2472, - "end": 2486, + "start": 2458, + "end": 2472, "loc": { "start": { "line": 63, @@ -15233,8 +15038,8 @@ }, "consequent": { "type": "ExpressionStatement", - "start": 2489, - "end": 2518, + "start": 2475, + "end": 2507, "loc": { "start": { "line": 63, @@ -15242,13 +15047,13 @@ }, "end": { "line": 63, - "column": 73 + "column": 76 } }, "expression": { "type": "AssignmentExpression", - "start": 2489, - "end": 2517, + "start": 2475, + "end": 2506, "loc": { "start": { "line": 63, @@ -15256,14 +15061,14 @@ }, "end": { "line": 63, - "column": 72 + "column": 75 } }, "operator": "=", "left": { "type": "Identifier", - "start": 2489, - "end": 2496, + "start": 2475, + "end": 2482, "loc": { "start": { "line": 63, @@ -15279,8 +15084,8 @@ }, "right": { "type": "CallExpression", - "start": 2499, - "end": 2517, + "start": 2485, + "end": 2506, "loc": { "start": { "line": 63, @@ -15288,13 +15093,13 @@ }, "end": { "line": 63, - "column": 72 + "column": 75 } }, "callee": { "type": "MemberExpression", - "start": 2499, - "end": 2513, + "start": 2485, + "end": 2502, "loc": { "start": { "line": 63, @@ -15302,13 +15107,13 @@ }, "end": { "line": 63, - "column": 68 + "column": 71 } }, "object": { "type": "Identifier", - "start": 2499, - "end": 2506, + "start": 2485, + "end": 2492, "loc": { "start": { "line": 63, @@ -15324,8 +15129,8 @@ }, "property": { "type": "Identifier", - "start": 2507, - "end": 2513, + "start": 2493, + "end": 2502, "loc": { "start": { "line": 63, @@ -15333,27 +15138,27 @@ }, "end": { "line": 63, - "column": 68 + "column": 71 }, - "identifierName": "substr" + "identifierName": "substring" }, - "name": "substr" + "name": "substring" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", - "start": 2514, - "end": 2516, + "start": 2503, + "end": 2505, "loc": { "start": { "line": 63, - "column": 69 + "column": 72 }, "end": { "line": 63, - "column": 71 + "column": 74 } }, "extra": { @@ -15372,8 +15177,8 @@ { "type": "CommentLine", "value": " Prepare the specimen.", - "start": 2524, - "end": 2548, + "start": 2513, + "end": 2537, "loc": { "start": { "line": 65, @@ -15389,8 +15194,8 @@ }, { "type": "VariableDeclaration", - "start": 2553, - "end": 2695, + "start": 2542, + "end": 2663, "loc": { "start": { "line": 66, @@ -15404,8 +15209,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 2559, - "end": 2694, + "start": 2548, + "end": 2662, "loc": { "start": { "line": 66, @@ -15418,8 +15223,8 @@ }, "id": { "type": "Identifier", - "start": 2559, - "end": 2567, + "start": 2548, + "end": 2556, "loc": { "start": { "line": 66, @@ -15436,8 +15241,8 @@ }, "init": { "type": "ObjectExpression", - "start": 2570, - "end": 2694, + "start": 2559, + "end": 2662, "loc": { "start": { "line": 66, @@ -15451,8 +15256,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 2578, - "end": 2616, + "start": 2567, + "end": 2605, "loc": { "start": { "line": 67, @@ -15468,8 +15273,8 @@ "computed": false, "key": { "type": "StringLiteral", - "start": 2578, - "end": 2585, + "start": 2567, + "end": 2574, "loc": { "start": { "line": 67, @@ -15488,8 +15293,8 @@ }, "value": { "type": "MemberExpression", - "start": 2587, - "end": 2616, + "start": 2576, + "end": 2605, "loc": { "start": { "line": 67, @@ -15502,8 +15307,8 @@ }, "object": { "type": "Identifier", - "start": 2587, - "end": 2602, + "start": 2576, + "end": 2591, "loc": { "start": { "line": 67, @@ -15519,8 +15324,8 @@ }, "property": { "type": "Identifier", - "start": 2603, - "end": 2616, + "start": 2592, + "end": 2605, "loc": { "start": { "line": 67, @@ -15539,8 +15344,8 @@ }, { "type": "ObjectProperty", - "start": 2624, - "end": 2658, + "start": 2613, + "end": 2626, "loc": { "start": { "line": 68, @@ -15548,16 +15353,16 @@ }, "end": { "line": 68, - "column": 40 + "column": 19 } }, "method": false, - "shorthand": false, + "shorthand": true, "computed": false, "key": { - "type": "StringLiteral", - "start": 2624, - "end": 2643, + "type": "Identifier", + "start": 2613, + "end": 2626, "loc": { "start": { "line": 68, @@ -15565,37 +15370,37 @@ }, "end": { "line": 68, - "column": 25 - } - }, - "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "column": 19 + }, + "identifierName": "basisOfRecord" }, - "value": "dwc:basisOfRecord" + "name": "basisOfRecord" }, "value": { "type": "Identifier", - "start": 2645, - "end": 2658, + "start": 2613, + "end": 2626, "loc": { "start": { "line": 68, - "column": 27 + "column": 6 }, "end": { "line": 68, - "column": 40 + "column": 19 }, "identifierName": "basisOfRecord" }, "name": "basisOfRecord" + }, + "extra": { + "shorthand": true } }, { "type": "ObjectProperty", - "start": 2666, - "end": 2687, + "start": 2634, + "end": 2655, "loc": { "start": { "line": 69, @@ -15611,8 +15416,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2666, - "end": 2678, + "start": 2634, + "end": 2646, "loc": { "start": { "line": 69, @@ -15628,8 +15433,8 @@ }, "value": { "type": "Identifier", - "start": 2680, - "end": 2687, + "start": 2648, + "end": 2655, "loc": { "start": { "line": 69, @@ -15654,8 +15459,8 @@ { "type": "CommentLine", "value": " Prepare the specimen.", - "start": 2524, - "end": 2548, + "start": 2513, + "end": 2537, "loc": { "start": { "line": 65, @@ -15672,8 +15477,8 @@ { "type": "CommentLine", "value": " Look for certain prefixes that suggest that we've been passed a URN or", - "start": 2701, - "end": 2774, + "start": 2669, + "end": 2742, "loc": { "start": { "line": 72, @@ -15688,8 +15493,8 @@ { "type": "CommentLine", "value": " URL instead. If so, don't do any further processing!", - "start": 2779, - "end": 2834, + "start": 2747, + "end": 2802, "loc": { "start": { "line": 73, @@ -15705,8 +15510,8 @@ }, { "type": "VariableDeclaration", - "start": 2839, - "end": 2971, + "start": 2807, + "end": 2939, "loc": { "start": { "line": 74, @@ -15720,8 +15525,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 2845, - "end": 2970, + "start": 2813, + "end": 2938, "loc": { "start": { "line": 74, @@ -15734,8 +15539,8 @@ }, "id": { "type": "Identifier", - "start": 2845, - "end": 2861, + "start": 2813, + "end": 2829, "loc": { "start": { "line": 74, @@ -15752,8 +15557,8 @@ }, "init": { "type": "ArrayExpression", - "start": 2864, - "end": 2970, + "start": 2832, + "end": 2938, "loc": { "start": { "line": 74, @@ -15767,8 +15572,8 @@ "elements": [ { "type": "StringLiteral", - "start": 2872, - "end": 2881, + "start": 2840, + "end": 2849, "loc": { "start": { "line": 75, @@ -15787,8 +15592,8 @@ }, { "type": "StringLiteral", - "start": 2889, - "end": 2899, + "start": 2857, + "end": 2867, "loc": { "start": { "line": 76, @@ -15807,8 +15612,8 @@ }, { "type": "StringLiteral", - "start": 2907, - "end": 2915, + "start": 2875, + "end": 2883, "loc": { "start": { "line": 77, @@ -15827,8 +15632,8 @@ }, { "type": "StringLiteral", - "start": 2923, - "end": 2932, + "start": 2891, + "end": 2900, "loc": { "start": { "line": 78, @@ -15847,8 +15652,8 @@ }, { "type": "StringLiteral", - "start": 2940, - "end": 2949, + "start": 2908, + "end": 2917, "loc": { "start": { "line": 79, @@ -15867,8 +15672,8 @@ }, { "type": "StringLiteral", - "start": 2957, - "end": 2963, + "start": 2925, + "end": 2931, "loc": { "start": { "line": 80, @@ -15895,8 +15700,8 @@ { "type": "CommentLine", "value": " Look for certain prefixes that suggest that we've been passed a URN or", - "start": 2701, - "end": 2774, + "start": 2669, + "end": 2742, "loc": { "start": { "line": 72, @@ -15911,8 +15716,8 @@ { "type": "CommentLine", "value": " URL instead. If so, don't do any further processing!", - "start": 2779, - "end": 2834, + "start": 2747, + "end": 2802, "loc": { "start": { "line": 73, @@ -15928,8 +15733,8 @@ }, { "type": "IfStatement", - "start": 2976, - "end": 3098, + "start": 2944, + "end": 3066, "loc": { "start": { "line": 82, @@ -15942,8 +15747,8 @@ }, "test": { "type": "BinaryExpression", - "start": 2980, - "end": 3066, + "start": 2948, + "end": 3034, "loc": { "start": { "line": 82, @@ -15956,8 +15761,8 @@ }, "left": { "type": "MemberExpression", - "start": 2980, - "end": 3062, + "start": 2948, + "end": 3030, "loc": { "start": { "line": 82, @@ -15970,8 +15775,8 @@ }, "object": { "type": "CallExpression", - "start": 2980, - "end": 3055, + "start": 2948, + "end": 3023, "loc": { "start": { "line": 82, @@ -15984,8 +15789,8 @@ }, "callee": { "type": "MemberExpression", - "start": 2980, - "end": 3003, + "start": 2948, + "end": 2971, "loc": { "start": { "line": 82, @@ -15998,8 +15803,8 @@ }, "object": { "type": "Identifier", - "start": 2980, - "end": 2996, + "start": 2948, + "end": 2964, "loc": { "start": { "line": 82, @@ -16015,8 +15820,8 @@ }, "property": { "type": "Identifier", - "start": 2997, - "end": 3003, + "start": 2965, + "end": 2971, "loc": { "start": { "line": 82, @@ -16035,8 +15840,8 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 3004, - "end": 3054, + "start": 2972, + "end": 3022, "loc": { "start": { "line": 82, @@ -16054,8 +15859,8 @@ "params": [ { "type": "Identifier", - "start": 3004, - "end": 3010, + "start": 2972, + "end": 2978, "loc": { "start": { "line": 82, @@ -16072,8 +15877,8 @@ ], "body": { "type": "CallExpression", - "start": 3014, - "end": 3054, + "start": 2982, + "end": 3022, "loc": { "start": { "line": 82, @@ -16086,8 +15891,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3014, - "end": 3046, + "start": 2982, + "end": 3014, "loc": { "start": { "line": 82, @@ -16100,8 +15905,8 @@ }, "object": { "type": "CallExpression", - "start": 3014, - "end": 3035, + "start": 2982, + "end": 3003, "loc": { "start": { "line": 82, @@ -16114,8 +15919,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3014, - "end": 3033, + "start": 2982, + "end": 3001, "loc": { "start": { "line": 82, @@ -16128,8 +15933,8 @@ }, "object": { "type": "Identifier", - "start": 3014, - "end": 3021, + "start": 2982, + "end": 2989, "loc": { "start": { "line": 82, @@ -16145,8 +15950,8 @@ }, "property": { "type": "Identifier", - "start": 3022, - "end": 3033, + "start": 2990, + "end": 3001, "loc": { "start": { "line": 82, @@ -16166,8 +15971,8 @@ }, "property": { "type": "Identifier", - "start": 3036, - "end": 3046, + "start": 3004, + "end": 3014, "loc": { "start": { "line": 82, @@ -16186,8 +15991,8 @@ "arguments": [ { "type": "Identifier", - "start": 3047, - "end": 3053, + "start": 3015, + "end": 3021, "loc": { "start": { "line": 82, @@ -16208,8 +16013,8 @@ }, "property": { "type": "Identifier", - "start": 3056, - "end": 3062, + "start": 3024, + "end": 3030, "loc": { "start": { "line": 82, @@ -16228,8 +16033,8 @@ "operator": ">", "right": { "type": "NumericLiteral", - "start": 3065, - "end": 3066, + "start": 3033, + "end": 3034, "loc": { "start": { "line": 82, @@ -16249,8 +16054,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3068, - "end": 3098, + "start": 3036, + "end": 3066, "loc": { "start": { "line": 82, @@ -16264,8 +16069,8 @@ "body": [ { "type": "ReturnStatement", - "start": 3076, - "end": 3092, + "start": 3044, + "end": 3060, "loc": { "start": { "line": 83, @@ -16278,8 +16083,8 @@ }, "argument": { "type": "Identifier", - "start": 3083, - "end": 3091, + "start": 3051, + "end": 3059, "loc": { "start": { "line": 83, @@ -16303,8 +16108,8 @@ { "type": "CommentLine", "value": " Parsing an occurrence ID takes some time, so we should memoize it.", - "start": 3104, - "end": 3173, + "start": 3072, + "end": 3141, "loc": { "start": { "line": 86, @@ -16320,8 +16125,8 @@ }, { "type": "IfStatement", - "start": 3178, - "end": 3338, + "start": 3146, + "end": 3306, "loc": { "start": { "line": 87, @@ -16334,8 +16139,8 @@ }, "test": { "type": "CallExpression", - "start": 3182, - "end": 3248, + "start": 3150, + "end": 3216, "loc": { "start": { "line": 87, @@ -16348,8 +16153,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3182, - "end": 3202, + "start": 3150, + "end": 3170, "loc": { "start": { "line": 87, @@ -16362,8 +16167,8 @@ }, "object": { "type": "Identifier", - "start": 3182, - "end": 3198, + "start": 3150, + "end": 3166, "loc": { "start": { "line": 87, @@ -16380,8 +16185,8 @@ }, "property": { "type": "Identifier", - "start": 3199, - "end": 3202, + "start": 3167, + "end": 3170, "loc": { "start": { "line": 87, @@ -16401,8 +16206,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 3203, - "end": 3238, + "start": 3171, + "end": 3206, "loc": { "start": { "line": 87, @@ -16421,8 +16226,8 @@ }, { "type": "Identifier", - "start": 3240, - "end": 3247, + "start": 3208, + "end": 3215, "loc": { "start": { "line": 87, @@ -16441,8 +16246,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3250, - "end": 3338, + "start": 3218, + "end": 3306, "loc": { "start": { "line": 87, @@ -16456,8 +16261,8 @@ "body": [ { "type": "ReturnStatement", - "start": 3258, - "end": 3332, + "start": 3226, + "end": 3300, "loc": { "start": { "line": 88, @@ -16470,8 +16275,8 @@ }, "argument": { "type": "CallExpression", - "start": 3265, - "end": 3331, + "start": 3233, + "end": 3299, "loc": { "start": { "line": 88, @@ -16484,8 +16289,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3265, - "end": 3285, + "start": 3233, + "end": 3253, "loc": { "start": { "line": 88, @@ -16498,8 +16303,8 @@ }, "object": { "type": "Identifier", - "start": 3265, - "end": 3281, + "start": 3233, + "end": 3249, "loc": { "start": { "line": 88, @@ -16515,8 +16320,8 @@ }, "property": { "type": "Identifier", - "start": 3282, - "end": 3285, + "start": 3250, + "end": 3253, "loc": { "start": { "line": 88, @@ -16535,8 +16340,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 3286, - "end": 3321, + "start": 3254, + "end": 3289, "loc": { "start": { "line": 88, @@ -16555,8 +16360,8 @@ }, { "type": "Identifier", - "start": 3323, - "end": 3330, + "start": 3291, + "end": 3298, "loc": { "start": { "line": 88, @@ -16582,8 +16387,8 @@ { "type": "CommentLine", "value": " Parsing an occurrence ID takes some time, so we should memoize it.", - "start": 3104, - "end": 3173, + "start": 3072, + "end": 3141, "loc": { "start": { "line": 86, @@ -16600,8 +16405,8 @@ { "type": "CommentLine", "value": " Split the occurrence ID into components, and store them in the appropriate fields.", - "start": 3344, - "end": 3429, + "start": 3312, + "end": 3397, "loc": { "start": { "line": 91, @@ -16617,8 +16422,8 @@ }, { "type": "VariableDeclaration", - "start": 3434, - "end": 3467, + "start": 3402, + "end": 3435, "loc": { "start": { "line": 92, @@ -16632,8 +16437,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 3440, - "end": 3466, + "start": 3408, + "end": 3434, "loc": { "start": { "line": 92, @@ -16646,8 +16451,8 @@ }, "id": { "type": "Identifier", - "start": 3440, - "end": 3445, + "start": 3408, + "end": 3413, "loc": { "start": { "line": 92, @@ -16664,8 +16469,8 @@ }, "init": { "type": "CallExpression", - "start": 3448, - "end": 3466, + "start": 3416, + "end": 3434, "loc": { "start": { "line": 92, @@ -16678,8 +16483,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3448, - "end": 3461, + "start": 3416, + "end": 3429, "loc": { "start": { "line": 92, @@ -16692,8 +16497,8 @@ }, "object": { "type": "Identifier", - "start": 3448, - "end": 3455, + "start": 3416, + "end": 3423, "loc": { "start": { "line": 92, @@ -16709,8 +16514,8 @@ }, "property": { "type": "Identifier", - "start": 3456, - "end": 3461, + "start": 3424, + "end": 3429, "loc": { "start": { "line": 92, @@ -16729,8 +16534,8 @@ "arguments": [ { "type": "RegExpLiteral", - "start": 3462, - "end": 3465, + "start": 3430, + "end": 3433, "loc": { "start": { "line": 92, @@ -16757,8 +16562,8 @@ { "type": "CommentLine", "value": " Split the occurrence ID into components, and store them in the appropriate fields.", - "start": 3344, - "end": 3429, + "start": 3312, + "end": 3397, "loc": { "start": { "line": 91, @@ -16774,8 +16579,8 @@ }, { "type": "IfStatement", - "start": 3472, - "end": 3997, + "start": 3440, + "end": 3965, "loc": { "start": { "line": 93, @@ -16788,8 +16593,8 @@ }, "test": { "type": "BinaryExpression", - "start": 3476, - "end": 3494, + "start": 3444, + "end": 3462, "loc": { "start": { "line": 93, @@ -16802,8 +16607,8 @@ }, "left": { "type": "MemberExpression", - "start": 3476, - "end": 3488, + "start": 3444, + "end": 3456, "loc": { "start": { "line": 93, @@ -16816,8 +16621,8 @@ }, "object": { "type": "Identifier", - "start": 3476, - "end": 3481, + "start": 3444, + "end": 3449, "loc": { "start": { "line": 93, @@ -16833,8 +16638,8 @@ }, "property": { "type": "Identifier", - "start": 3482, - "end": 3488, + "start": 3450, + "end": 3456, "loc": { "start": { "line": 93, @@ -16853,8 +16658,8 @@ "operator": "===", "right": { "type": "NumericLiteral", - "start": 3493, - "end": 3494, + "start": 3461, + "end": 3462, "loc": { "start": { "line": 93, @@ -16874,8 +16679,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3496, - "end": 3636, + "start": 3464, + "end": 3604, "loc": { "start": { "line": 93, @@ -16889,8 +16694,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 3597, - "end": 3630, + "start": 3565, + "end": 3598, "loc": { "start": { "line": 96, @@ -16903,8 +16708,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3597, - "end": 3629, + "start": 3565, + "end": 3597, "loc": { "start": { "line": 96, @@ -16918,8 +16723,8 @@ "operator": "=", "left": { "type": "ArrayPattern", - "start": 3597, - "end": 3621, + "start": 3565, + "end": 3589, "loc": { "start": { "line": 96, @@ -16933,8 +16738,8 @@ "elements": [ { "type": "MemberExpression", - "start": 3598, - "end": 3620, + "start": 3566, + "end": 3588, "loc": { "start": { "line": 96, @@ -16947,8 +16752,8 @@ }, "object": { "type": "Identifier", - "start": 3598, - "end": 3606, + "start": 3566, + "end": 3574, "loc": { "start": { "line": 96, @@ -16965,8 +16770,8 @@ }, "property": { "type": "Identifier", - "start": 3607, - "end": 3620, + "start": 3575, + "end": 3588, "loc": { "start": { "line": 96, @@ -16988,8 +16793,8 @@ }, "right": { "type": "Identifier", - "start": 3624, - "end": 3629, + "start": 3592, + "end": 3597, "loc": { "start": { "line": 96, @@ -17009,8 +16814,8 @@ { "type": "CommentLine", "value": " specimen.institutionCode = undefined;", - "start": 3504, - "end": 3544, + "start": 3472, + "end": 3512, "loc": { "start": { "line": 94, @@ -17025,8 +16830,8 @@ { "type": "CommentLine", "value": " specimen.collectionCode = undefined;", - "start": 3551, - "end": 3590, + "start": 3519, + "end": 3558, "loc": { "start": { "line": 95, @@ -17045,8 +16850,8 @@ }, "alternate": { "type": "IfStatement", - "start": 3642, - "end": 3997, + "start": 3610, + "end": 3965, "loc": { "start": { "line": 97, @@ -17059,8 +16864,8 @@ }, "test": { "type": "BinaryExpression", - "start": 3646, - "end": 3664, + "start": 3614, + "end": 3632, "loc": { "start": { "line": 97, @@ -17073,8 +16878,8 @@ }, "left": { "type": "MemberExpression", - "start": 3646, - "end": 3658, + "start": 3614, + "end": 3626, "loc": { "start": { "line": 97, @@ -17087,8 +16892,8 @@ }, "object": { "type": "Identifier", - "start": 3646, - "end": 3651, + "start": 3614, + "end": 3619, "loc": { "start": { "line": 97, @@ -17104,8 +16909,8 @@ }, "property": { "type": "Identifier", - "start": 3652, - "end": 3658, + "start": 3620, + "end": 3626, "loc": { "start": { "line": 97, @@ -17124,8 +16929,8 @@ "operator": "===", "right": { "type": "NumericLiteral", - "start": 3663, - "end": 3664, + "start": 3631, + "end": 3632, "loc": { "start": { "line": 97, @@ -17145,8 +16950,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3666, - "end": 3739, + "start": 3634, + "end": 3707, "loc": { "start": { "line": 97, @@ -17160,8 +16965,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 3674, - "end": 3733, + "start": 3642, + "end": 3701, "loc": { "start": { "line": 98, @@ -17174,8 +16979,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3674, - "end": 3732, + "start": 3642, + "end": 3700, "loc": { "start": { "line": 98, @@ -17189,8 +16994,8 @@ "operator": "=", "left": { "type": "ArrayPattern", - "start": 3674, - "end": 3724, + "start": 3642, + "end": 3692, "loc": { "start": { "line": 98, @@ -17204,8 +17009,8 @@ "elements": [ { "type": "MemberExpression", - "start": 3675, - "end": 3699, + "start": 3643, + "end": 3667, "loc": { "start": { "line": 98, @@ -17218,8 +17023,8 @@ }, "object": { "type": "Identifier", - "start": 3675, - "end": 3683, + "start": 3643, + "end": 3651, "loc": { "start": { "line": 98, @@ -17235,8 +17040,8 @@ }, "property": { "type": "Identifier", - "start": 3684, - "end": 3699, + "start": 3652, + "end": 3667, "loc": { "start": { "line": 98, @@ -17254,8 +17059,8 @@ }, { "type": "MemberExpression", - "start": 3701, - "end": 3723, + "start": 3669, + "end": 3691, "loc": { "start": { "line": 98, @@ -17268,8 +17073,8 @@ }, "object": { "type": "Identifier", - "start": 3701, - "end": 3709, + "start": 3669, + "end": 3677, "loc": { "start": { "line": 98, @@ -17285,8 +17090,8 @@ }, "property": { "type": "Identifier", - "start": 3710, - "end": 3723, + "start": 3678, + "end": 3691, "loc": { "start": { "line": 98, @@ -17306,8 +17111,8 @@ }, "right": { "type": "Identifier", - "start": 3727, - "end": 3732, + "start": 3695, + "end": 3700, "loc": { "start": { "line": 98, @@ -17328,8 +17133,8 @@ }, "alternate": { "type": "IfStatement", - "start": 3745, - "end": 3997, + "start": 3713, + "end": 3965, "loc": { "start": { "line": 99, @@ -17342,8 +17147,8 @@ }, "test": { "type": "BinaryExpression", - "start": 3749, - "end": 3766, + "start": 3717, + "end": 3734, "loc": { "start": { "line": 99, @@ -17356,8 +17161,8 @@ }, "left": { "type": "MemberExpression", - "start": 3749, - "end": 3761, + "start": 3717, + "end": 3729, "loc": { "start": { "line": 99, @@ -17370,8 +17175,8 @@ }, "object": { "type": "Identifier", - "start": 3749, - "end": 3754, + "start": 3717, + "end": 3722, "loc": { "start": { "line": 99, @@ -17387,8 +17192,8 @@ }, "property": { "type": "Identifier", - "start": 3755, - "end": 3761, + "start": 3723, + "end": 3729, "loc": { "start": { "line": 99, @@ -17407,8 +17212,8 @@ "operator": ">=", "right": { "type": "NumericLiteral", - "start": 3765, - "end": 3766, + "start": 3733, + "end": 3734, "loc": { "start": { "line": 99, @@ -17428,8 +17233,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 3768, - "end": 3997, + "start": 3736, + "end": 3965, "loc": { "start": { "line": 99, @@ -17443,8 +17248,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 3776, - "end": 3802, + "start": 3744, + "end": 3770, "loc": { "start": { "line": 100, @@ -17458,8 +17263,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 3780, - "end": 3801, + "start": 3748, + "end": 3769, "loc": { "start": { "line": 100, @@ -17472,8 +17277,8 @@ }, "id": { "type": "Identifier", - "start": 3780, - "end": 3796, + "start": 3748, + "end": 3764, "loc": { "start": { "line": 100, @@ -17489,8 +17294,8 @@ }, "init": { "type": "ArrayExpression", - "start": 3799, - "end": 3801, + "start": 3767, + "end": 3769, "loc": { "start": { "line": 100, @@ -17510,8 +17315,8 @@ { "type": "CommentLine", "value": " Store all split catalog number values.", - "start": 3803, - "end": 3844, + "start": 3771, + "end": 3812, "loc": { "start": { "line": 100, @@ -17527,8 +17332,8 @@ }, { "type": "ExpressionStatement", - "start": 3851, - "end": 3932, + "start": 3819, + "end": 3900, "loc": { "start": { "line": 101, @@ -17541,8 +17346,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3851, - "end": 3931, + "start": 3819, + "end": 3899, "loc": { "start": { "line": 101, @@ -17556,8 +17361,8 @@ "operator": "=", "left": { "type": "ArrayPattern", - "start": 3851, - "end": 3923, + "start": 3819, + "end": 3891, "loc": { "start": { "line": 101, @@ -17571,8 +17376,8 @@ "elements": [ { "type": "MemberExpression", - "start": 3852, - "end": 3876, + "start": 3820, + "end": 3844, "loc": { "start": { "line": 101, @@ -17585,8 +17390,8 @@ }, "object": { "type": "Identifier", - "start": 3852, - "end": 3860, + "start": 3820, + "end": 3828, "loc": { "start": { "line": 101, @@ -17603,8 +17408,8 @@ }, "property": { "type": "Identifier", - "start": 3861, - "end": 3876, + "start": 3829, + "end": 3844, "loc": { "start": { "line": 101, @@ -17623,8 +17428,8 @@ }, { "type": "MemberExpression", - "start": 3878, - "end": 3901, + "start": 3846, + "end": 3869, "loc": { "start": { "line": 101, @@ -17637,8 +17442,8 @@ }, "object": { "type": "Identifier", - "start": 3878, - "end": 3886, + "start": 3846, + "end": 3854, "loc": { "start": { "line": 101, @@ -17654,8 +17459,8 @@ }, "property": { "type": "Identifier", - "start": 3887, - "end": 3901, + "start": 3855, + "end": 3869, "loc": { "start": { "line": 101, @@ -17673,8 +17478,8 @@ }, { "type": "RestElement", - "start": 3903, - "end": 3922, + "start": 3871, + "end": 3890, "loc": { "start": { "line": 101, @@ -17687,8 +17492,8 @@ }, "argument": { "type": "Identifier", - "start": 3906, - "end": 3922, + "start": 3874, + "end": 3890, "loc": { "start": { "line": 101, @@ -17708,8 +17513,8 @@ }, "right": { "type": "Identifier", - "start": 3926, - "end": 3931, + "start": 3894, + "end": 3899, "loc": { "start": { "line": 101, @@ -17729,8 +17534,8 @@ { "type": "CommentLine", "value": " Store all split catalog number values.", - "start": 3803, - "end": 3844, + "start": 3771, + "end": 3812, "loc": { "start": { "line": 100, @@ -17746,8 +17551,8 @@ }, { "type": "ExpressionStatement", - "start": 3939, - "end": 3991, + "start": 3907, + "end": 3959, "loc": { "start": { "line": 102, @@ -17760,8 +17565,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3939, - "end": 3990, + "start": 3907, + "end": 3958, "loc": { "start": { "line": 102, @@ -17775,8 +17580,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 3939, - "end": 3961, + "start": 3907, + "end": 3929, "loc": { "start": { "line": 102, @@ -17789,8 +17594,8 @@ }, "object": { "type": "Identifier", - "start": 3939, - "end": 3947, + "start": 3907, + "end": 3915, "loc": { "start": { "line": 102, @@ -17806,8 +17611,8 @@ }, "property": { "type": "Identifier", - "start": 3948, - "end": 3961, + "start": 3916, + "end": 3929, "loc": { "start": { "line": 102, @@ -17825,8 +17630,8 @@ }, "right": { "type": "CallExpression", - "start": 3964, - "end": 3990, + "start": 3932, + "end": 3958, "loc": { "start": { "line": 102, @@ -17839,8 +17644,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3964, - "end": 3985, + "start": 3932, + "end": 3953, "loc": { "start": { "line": 102, @@ -17853,8 +17658,8 @@ }, "object": { "type": "Identifier", - "start": 3964, - "end": 3980, + "start": 3932, + "end": 3948, "loc": { "start": { "line": 102, @@ -17870,8 +17675,8 @@ }, "property": { "type": "Identifier", - "start": 3981, - "end": 3985, + "start": 3949, + "end": 3953, "loc": { "start": { "line": 102, @@ -17890,8 +17695,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 3986, - "end": 3989, + "start": 3954, + "end": 3957, "loc": { "start": { "line": 102, @@ -17921,8 +17726,8 @@ }, { "type": "ExpressionStatement", - "start": 4003, - "end": 4080, + "start": 3971, + "end": 4048, "loc": { "start": { "line": 105, @@ -17935,8 +17740,8 @@ }, "expression": { "type": "CallExpression", - "start": 4003, - "end": 4079, + "start": 3971, + "end": 4047, "loc": { "start": { "line": 105, @@ -17949,8 +17754,8 @@ }, "callee": { "type": "MemberExpression", - "start": 4003, - "end": 4023, + "start": 3971, + "end": 3991, "loc": { "start": { "line": 105, @@ -17963,8 +17768,8 @@ }, "object": { "type": "Identifier", - "start": 4003, - "end": 4019, + "start": 3971, + "end": 3987, "loc": { "start": { "line": 105, @@ -17980,8 +17785,8 @@ }, "property": { "type": "Identifier", - "start": 4020, - "end": 4023, + "start": 3988, + "end": 3991, "loc": { "start": { "line": 105, @@ -18000,8 +17805,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 4024, - "end": 4059, + "start": 3992, + "end": 4027, "loc": { "start": { "line": 105, @@ -18020,8 +17825,8 @@ }, { "type": "Identifier", - "start": 4061, - "end": 4068, + "start": 4029, + "end": 4036, "loc": { "start": { "line": 105, @@ -18037,8 +17842,8 @@ }, { "type": "Identifier", - "start": 4070, - "end": 4078, + "start": 4038, + "end": 4046, "loc": { "start": { "line": 105, @@ -18057,8 +17862,8 @@ }, { "type": "ReturnStatement", - "start": 4085, - "end": 4101, + "start": 4053, + "end": 4069, "loc": { "start": { "line": 106, @@ -18071,8 +17876,8 @@ }, "argument": { "type": "Identifier", - "start": 4092, - "end": 4100, + "start": 4060, + "end": 4068, "loc": { "start": { "line": 106, @@ -18095,8 +17900,8 @@ { "type": "CommentBlock", "value": "*\n * Parse the provided occurrence ID. The two expected formats are:\n * - 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]'\n * (in which case, we ignore the first two \"components\" here)\n * - '[institutionCode]:[collectionCode]:[catalogNumber]'\n ", - "start": 1986, - "end": 2267, + "start": 1972, + "end": 2253, "loc": { "start": { "line": 54, @@ -18113,8 +17918,8 @@ { "type": "CommentBlock", "value": "*\n * Get the catalogNumber if present.\n ", - "start": 4109, - "end": 4157, + "start": 4077, + "end": 4125, "loc": { "start": { "line": 109, @@ -18130,8 +17935,8 @@ }, { "type": "ClassMethod", - "start": 4160, - "end": 4675, + "start": 4128, + "end": 4643, "loc": { "start": { "line": 112, @@ -18146,8 +17951,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4164, - "end": 4177, + "start": 4132, + "end": 4145, "loc": { "start": { "line": 112, @@ -18169,8 +17974,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 4180, - "end": 4675, + "start": 4148, + "end": 4643, "loc": { "start": { "line": 112, @@ -18184,8 +17989,8 @@ "body": [ { "type": "IfStatement", - "start": 4253, - "end": 4329, + "start": 4221, + "end": 4297, "loc": { "start": { "line": 114, @@ -18198,8 +18003,8 @@ }, "test": { "type": "CallExpression", - "start": 4257, - "end": 4292, + "start": 4225, + "end": 4260, "loc": { "start": { "line": 114, @@ -18212,8 +18017,8 @@ }, "callee": { "type": "Identifier", - "start": 4257, - "end": 4260, + "start": 4225, + "end": 4228, "loc": { "start": { "line": 114, @@ -18231,8 +18036,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 4261, - "end": 4274, + "start": 4229, + "end": 4242, "loc": { "start": { "line": 114, @@ -18245,8 +18050,8 @@ }, "object": { "type": "ThisExpression", - "start": 4261, - "end": 4265, + "start": 4229, + "end": 4233, "loc": { "start": { "line": 114, @@ -18260,8 +18065,8 @@ }, "property": { "type": "Identifier", - "start": 4266, - "end": 4274, + "start": 4234, + "end": 4242, "loc": { "start": { "line": 114, @@ -18279,8 +18084,8 @@ }, { "type": "StringLiteral", - "start": 4276, - "end": 4291, + "start": 4244, + "end": 4259, "loc": { "start": { "line": 114, @@ -18302,8 +18107,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 4294, - "end": 4329, + "start": 4262, + "end": 4297, "loc": { "start": { "line": 114, @@ -18316,8 +18121,8 @@ }, "argument": { "type": "MemberExpression", - "start": 4301, - "end": 4328, + "start": 4269, + "end": 4296, "loc": { "start": { "line": 114, @@ -18330,8 +18135,8 @@ }, "object": { "type": "MemberExpression", - "start": 4301, - "end": 4314, + "start": 4269, + "end": 4282, "loc": { "start": { "line": 114, @@ -18344,8 +18149,8 @@ }, "object": { "type": "ThisExpression", - "start": 4301, - "end": 4305, + "start": 4269, + "end": 4273, "loc": { "start": { "line": 114, @@ -18359,8 +18164,8 @@ }, "property": { "type": "Identifier", - "start": 4306, - "end": 4314, + "start": 4274, + "end": 4282, "loc": { "start": { "line": 114, @@ -18378,8 +18183,8 @@ }, "property": { "type": "Identifier", - "start": 4315, - "end": 4328, + "start": 4283, + "end": 4296, "loc": { "start": { "line": 114, @@ -18402,8 +18207,8 @@ { "type": "CommentLine", "value": " Get the catalog number from the specimen object if present.", - "start": 4186, - "end": 4248, + "start": 4154, + "end": 4216, "loc": { "start": { "line": 113, @@ -18420,8 +18225,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract a", - "start": 4335, - "end": 4406, + "start": 4303, + "end": 4374, "loc": { "start": { "line": 116, @@ -18436,8 +18241,8 @@ { "type": "CommentLine", "value": " catalogNumber from there.", - "start": 4411, - "end": 4439, + "start": 4379, + "end": 4407, "loc": { "start": { "line": 117, @@ -18453,8 +18258,8 @@ }, { "type": "IfStatement", - "start": 4444, - "end": 4649, + "start": 4412, + "end": 4617, "loc": { "start": { "line": 118, @@ -18467,8 +18272,8 @@ }, "test": { "type": "CallExpression", - "start": 4448, - "end": 4482, + "start": 4416, + "end": 4450, "loc": { "start": { "line": 118, @@ -18481,8 +18286,8 @@ }, "callee": { "type": "Identifier", - "start": 4448, - "end": 4451, + "start": 4416, + "end": 4419, "loc": { "start": { "line": 118, @@ -18500,8 +18305,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 4452, - "end": 4465, + "start": 4420, + "end": 4433, "loc": { "start": { "line": 118, @@ -18514,8 +18319,8 @@ }, "object": { "type": "ThisExpression", - "start": 4452, - "end": 4456, + "start": 4420, + "end": 4424, "loc": { "start": { "line": 118, @@ -18529,8 +18334,8 @@ }, "property": { "type": "Identifier", - "start": 4457, - "end": 4465, + "start": 4425, + "end": 4433, "loc": { "start": { "line": 118, @@ -18548,8 +18353,8 @@ }, { "type": "StringLiteral", - "start": 4467, - "end": 4481, + "start": 4435, + "end": 4449, "loc": { "start": { "line": 118, @@ -18571,8 +18376,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 4484, - "end": 4649, + "start": 4452, + "end": 4617, "loc": { "start": { "line": 118, @@ -18586,8 +18391,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 4492, - "end": 4570, + "start": 4460, + "end": 4538, "loc": { "start": { "line": 119, @@ -18601,8 +18406,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 4498, - "end": 4569, + "start": 4466, + "end": 4537, "loc": { "start": { "line": 119, @@ -18615,8 +18420,8 @@ }, "id": { "type": "Identifier", - "start": 4498, - "end": 4506, + "start": 4466, + "end": 4474, "loc": { "start": { "line": 119, @@ -18632,8 +18437,8 @@ }, "init": { "type": "CallExpression", - "start": 4509, - "end": 4569, + "start": 4477, + "end": 4537, "loc": { "start": { "line": 119, @@ -18646,8 +18451,8 @@ }, "callee": { "type": "MemberExpression", - "start": 4509, - "end": 4541, + "start": 4477, + "end": 4509, "loc": { "start": { "line": 119, @@ -18660,8 +18465,8 @@ }, "object": { "type": "Identifier", - "start": 4509, - "end": 4524, + "start": 4477, + "end": 4492, "loc": { "start": { "line": 119, @@ -18677,8 +18482,8 @@ }, "property": { "type": "Identifier", - "start": 4525, - "end": 4541, + "start": 4493, + "end": 4509, "loc": { "start": { "line": 119, @@ -18697,8 +18502,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 4542, - "end": 4568, + "start": 4510, + "end": 4536, "loc": { "start": { "line": 119, @@ -18711,8 +18516,8 @@ }, "object": { "type": "MemberExpression", - "start": 4542, - "end": 4555, + "start": 4510, + "end": 4523, "loc": { "start": { "line": 119, @@ -18725,8 +18530,8 @@ }, "object": { "type": "ThisExpression", - "start": 4542, - "end": 4546, + "start": 4510, + "end": 4514, "loc": { "start": { "line": 119, @@ -18740,8 +18545,8 @@ }, "property": { "type": "Identifier", - "start": 4547, - "end": 4555, + "start": 4515, + "end": 4523, "loc": { "start": { "line": 119, @@ -18759,8 +18564,8 @@ }, "property": { "type": "Identifier", - "start": 4556, - "end": 4568, + "start": 4524, + "end": 4536, "loc": { "start": { "line": 119, @@ -18784,8 +18589,8 @@ }, { "type": "IfStatement", - "start": 4577, - "end": 4643, + "start": 4545, + "end": 4611, "loc": { "start": { "line": 120, @@ -18798,8 +18603,8 @@ }, "test": { "type": "CallExpression", - "start": 4581, - "end": 4611, + "start": 4549, + "end": 4579, "loc": { "start": { "line": 120, @@ -18812,8 +18617,8 @@ }, "callee": { "type": "Identifier", - "start": 4581, - "end": 4584, + "start": 4549, + "end": 4552, "loc": { "start": { "line": 120, @@ -18830,8 +18635,8 @@ "arguments": [ { "type": "Identifier", - "start": 4585, - "end": 4593, + "start": 4553, + "end": 4561, "loc": { "start": { "line": 120, @@ -18847,8 +18652,8 @@ }, { "type": "StringLiteral", - "start": 4595, - "end": 4610, + "start": 4563, + "end": 4578, "loc": { "start": { "line": 120, @@ -18869,8 +18674,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 4613, - "end": 4643, + "start": 4581, + "end": 4611, "loc": { "start": { "line": 120, @@ -18883,8 +18688,8 @@ }, "argument": { "type": "MemberExpression", - "start": 4620, - "end": 4642, + "start": 4588, + "end": 4610, "loc": { "start": { "line": 120, @@ -18897,8 +18702,8 @@ }, "object": { "type": "Identifier", - "start": 4620, - "end": 4628, + "start": 4588, + "end": 4596, "loc": { "start": { "line": 120, @@ -18914,8 +18719,8 @@ }, "property": { "type": "Identifier", - "start": 4629, - "end": 4642, + "start": 4597, + "end": 4610, "loc": { "start": { "line": 120, @@ -18942,8 +18747,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract a", - "start": 4335, - "end": 4406, + "start": 4303, + "end": 4374, "loc": { "start": { "line": 116, @@ -18958,8 +18763,8 @@ { "type": "CommentLine", "value": " catalogNumber from there.", - "start": 4411, - "end": 4439, + "start": 4379, + "end": 4407, "loc": { "start": { "line": 117, @@ -18975,8 +18780,8 @@ }, { "type": "ReturnStatement", - "start": 4654, - "end": 4671, + "start": 4622, + "end": 4639, "loc": { "start": { "line": 122, @@ -18989,8 +18794,8 @@ }, "argument": { "type": "Identifier", - "start": 4661, - "end": 4670, + "start": 4629, + "end": 4638, "loc": { "start": { "line": 122, @@ -19013,8 +18818,8 @@ { "type": "CommentBlock", "value": "*\n * Get the catalogNumber if present.\n ", - "start": 4109, - "end": 4157, + "start": 4077, + "end": 4125, "loc": { "start": { "line": 109, @@ -19031,8 +18836,8 @@ { "type": "CommentBlock", "value": "*\n * Get the institutionCode if present.\n ", - "start": 4679, - "end": 4729, + "start": 4647, + "end": 4697, "loc": { "start": { "line": 125, @@ -19048,8 +18853,8 @@ }, { "type": "ClassMethod", - "start": 4732, - "end": 5259, + "start": 4700, + "end": 5227, "loc": { "start": { "line": 128, @@ -19064,8 +18869,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4736, - "end": 4751, + "start": 4704, + "end": 4719, "loc": { "start": { "line": 128, @@ -19087,8 +18892,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 4754, - "end": 5259, + "start": 4722, + "end": 5227, "loc": { "start": { "line": 128, @@ -19102,8 +18907,8 @@ "body": [ { "type": "IfStatement", - "start": 4829, - "end": 4909, + "start": 4797, + "end": 4877, "loc": { "start": { "line": 130, @@ -19116,8 +18921,8 @@ }, "test": { "type": "CallExpression", - "start": 4833, - "end": 4870, + "start": 4801, + "end": 4838, "loc": { "start": { "line": 130, @@ -19130,8 +18935,8 @@ }, "callee": { "type": "Identifier", - "start": 4833, - "end": 4836, + "start": 4801, + "end": 4804, "loc": { "start": { "line": 130, @@ -19149,8 +18954,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 4837, - "end": 4850, + "start": 4805, + "end": 4818, "loc": { "start": { "line": 130, @@ -19163,8 +18968,8 @@ }, "object": { "type": "ThisExpression", - "start": 4837, - "end": 4841, + "start": 4805, + "end": 4809, "loc": { "start": { "line": 130, @@ -19178,8 +18983,8 @@ }, "property": { "type": "Identifier", - "start": 4842, - "end": 4850, + "start": 4810, + "end": 4818, "loc": { "start": { "line": 130, @@ -19197,8 +19002,8 @@ }, { "type": "StringLiteral", - "start": 4852, - "end": 4869, + "start": 4820, + "end": 4837, "loc": { "start": { "line": 130, @@ -19220,8 +19025,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 4872, - "end": 4909, + "start": 4840, + "end": 4877, "loc": { "start": { "line": 130, @@ -19234,8 +19039,8 @@ }, "argument": { "type": "MemberExpression", - "start": 4879, - "end": 4908, + "start": 4847, + "end": 4876, "loc": { "start": { "line": 130, @@ -19248,8 +19053,8 @@ }, "object": { "type": "MemberExpression", - "start": 4879, - "end": 4892, + "start": 4847, + "end": 4860, "loc": { "start": { "line": 130, @@ -19262,8 +19067,8 @@ }, "object": { "type": "ThisExpression", - "start": 4879, - "end": 4883, + "start": 4847, + "end": 4851, "loc": { "start": { "line": 130, @@ -19277,8 +19082,8 @@ }, "property": { "type": "Identifier", - "start": 4884, - "end": 4892, + "start": 4852, + "end": 4860, "loc": { "start": { "line": 130, @@ -19296,8 +19101,8 @@ }, "property": { "type": "Identifier", - "start": 4893, - "end": 4908, + "start": 4861, + "end": 4876, "loc": { "start": { "line": 130, @@ -19320,8 +19125,8 @@ { "type": "CommentLine", "value": " Get the institution code from the specimen object if present.", - "start": 4760, - "end": 4824, + "start": 4728, + "end": 4792, "loc": { "start": { "line": 129, @@ -19338,8 +19143,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 4915, - "end": 4987, + "start": 4883, + "end": 4955, "loc": { "start": { "line": 132, @@ -19354,8 +19159,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 4992, - "end": 5019, + "start": 4960, + "end": 4987, "loc": { "start": { "line": 133, @@ -19371,8 +19176,8 @@ }, { "type": "IfStatement", - "start": 5024, - "end": 5233, + "start": 4992, + "end": 5201, "loc": { "start": { "line": 134, @@ -19385,8 +19190,8 @@ }, "test": { "type": "CallExpression", - "start": 5028, - "end": 5062, + "start": 4996, + "end": 5030, "loc": { "start": { "line": 134, @@ -19399,8 +19204,8 @@ }, "callee": { "type": "Identifier", - "start": 5028, - "end": 5031, + "start": 4996, + "end": 4999, "loc": { "start": { "line": 134, @@ -19418,8 +19223,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5032, - "end": 5045, + "start": 5000, + "end": 5013, "loc": { "start": { "line": 134, @@ -19432,8 +19237,8 @@ }, "object": { "type": "ThisExpression", - "start": 5032, - "end": 5036, + "start": 5000, + "end": 5004, "loc": { "start": { "line": 134, @@ -19447,8 +19252,8 @@ }, "property": { "type": "Identifier", - "start": 5037, - "end": 5045, + "start": 5005, + "end": 5013, "loc": { "start": { "line": 134, @@ -19466,8 +19271,8 @@ }, { "type": "StringLiteral", - "start": 5047, - "end": 5061, + "start": 5015, + "end": 5029, "loc": { "start": { "line": 134, @@ -19489,8 +19294,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 5064, - "end": 5233, + "start": 5032, + "end": 5201, "loc": { "start": { "line": 134, @@ -19504,8 +19309,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 5072, - "end": 5150, + "start": 5040, + "end": 5118, "loc": { "start": { "line": 135, @@ -19519,8 +19324,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 5078, - "end": 5149, + "start": 5046, + "end": 5117, "loc": { "start": { "line": 135, @@ -19533,8 +19338,8 @@ }, "id": { "type": "Identifier", - "start": 5078, - "end": 5086, + "start": 5046, + "end": 5054, "loc": { "start": { "line": 135, @@ -19550,8 +19355,8 @@ }, "init": { "type": "CallExpression", - "start": 5089, - "end": 5149, + "start": 5057, + "end": 5117, "loc": { "start": { "line": 135, @@ -19564,8 +19369,8 @@ }, "callee": { "type": "MemberExpression", - "start": 5089, - "end": 5121, + "start": 5057, + "end": 5089, "loc": { "start": { "line": 135, @@ -19578,8 +19383,8 @@ }, "object": { "type": "Identifier", - "start": 5089, - "end": 5104, + "start": 5057, + "end": 5072, "loc": { "start": { "line": 135, @@ -19595,8 +19400,8 @@ }, "property": { "type": "Identifier", - "start": 5105, - "end": 5121, + "start": 5073, + "end": 5089, "loc": { "start": { "line": 135, @@ -19615,8 +19420,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5122, - "end": 5148, + "start": 5090, + "end": 5116, "loc": { "start": { "line": 135, @@ -19629,8 +19434,8 @@ }, "object": { "type": "MemberExpression", - "start": 5122, - "end": 5135, + "start": 5090, + "end": 5103, "loc": { "start": { "line": 135, @@ -19643,8 +19448,8 @@ }, "object": { "type": "ThisExpression", - "start": 5122, - "end": 5126, + "start": 5090, + "end": 5094, "loc": { "start": { "line": 135, @@ -19658,8 +19463,8 @@ }, "property": { "type": "Identifier", - "start": 5127, - "end": 5135, + "start": 5095, + "end": 5103, "loc": { "start": { "line": 135, @@ -19677,8 +19482,8 @@ }, "property": { "type": "Identifier", - "start": 5136, - "end": 5148, + "start": 5104, + "end": 5116, "loc": { "start": { "line": 135, @@ -19702,8 +19507,8 @@ }, { "type": "IfStatement", - "start": 5157, - "end": 5227, + "start": 5125, + "end": 5195, "loc": { "start": { "line": 136, @@ -19716,8 +19521,8 @@ }, "test": { "type": "CallExpression", - "start": 5161, - "end": 5193, + "start": 5129, + "end": 5161, "loc": { "start": { "line": 136, @@ -19730,8 +19535,8 @@ }, "callee": { "type": "Identifier", - "start": 5161, - "end": 5164, + "start": 5129, + "end": 5132, "loc": { "start": { "line": 136, @@ -19748,8 +19553,8 @@ "arguments": [ { "type": "Identifier", - "start": 5165, - "end": 5173, + "start": 5133, + "end": 5141, "loc": { "start": { "line": 136, @@ -19765,8 +19570,8 @@ }, { "type": "StringLiteral", - "start": 5175, - "end": 5192, + "start": 5143, + "end": 5160, "loc": { "start": { "line": 136, @@ -19787,8 +19592,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 5195, - "end": 5227, + "start": 5163, + "end": 5195, "loc": { "start": { "line": 136, @@ -19801,8 +19606,8 @@ }, "argument": { "type": "MemberExpression", - "start": 5202, - "end": 5226, + "start": 5170, + "end": 5194, "loc": { "start": { "line": 136, @@ -19815,8 +19620,8 @@ }, "object": { "type": "Identifier", - "start": 5202, - "end": 5210, + "start": 5170, + "end": 5178, "loc": { "start": { "line": 136, @@ -19832,8 +19637,8 @@ }, "property": { "type": "Identifier", - "start": 5211, - "end": 5226, + "start": 5179, + "end": 5194, "loc": { "start": { "line": 136, @@ -19860,8 +19665,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 4915, - "end": 4987, + "start": 4883, + "end": 4955, "loc": { "start": { "line": 132, @@ -19876,8 +19681,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 4992, - "end": 5019, + "start": 4960, + "end": 4987, "loc": { "start": { "line": 133, @@ -19893,8 +19698,8 @@ }, { "type": "ReturnStatement", - "start": 5238, - "end": 5255, + "start": 5206, + "end": 5223, "loc": { "start": { "line": 138, @@ -19907,8 +19712,8 @@ }, "argument": { "type": "Identifier", - "start": 5245, - "end": 5254, + "start": 5213, + "end": 5222, "loc": { "start": { "line": 138, @@ -19931,8 +19736,8 @@ { "type": "CommentBlock", "value": "*\n * Get the institutionCode if present.\n ", - "start": 4679, - "end": 4729, + "start": 4647, + "end": 4697, "loc": { "start": { "line": 125, @@ -19949,8 +19754,8 @@ { "type": "CommentBlock", "value": "*\n * Get the collectionCode if present.\n ", - "start": 5263, - "end": 5312, + "start": 5231, + "end": 5280, "loc": { "start": { "line": 141, @@ -19966,8 +19771,8 @@ }, { "type": "ClassMethod", - "start": 5315, - "end": 5836, + "start": 5283, + "end": 5804, "loc": { "start": { "line": 144, @@ -19982,8 +19787,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 5319, - "end": 5333, + "start": 5287, + "end": 5301, "loc": { "start": { "line": 144, @@ -20005,8 +19810,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 5336, - "end": 5836, + "start": 5304, + "end": 5804, "loc": { "start": { "line": 144, @@ -20020,8 +19825,8 @@ "body": [ { "type": "IfStatement", - "start": 5410, - "end": 5488, + "start": 5378, + "end": 5456, "loc": { "start": { "line": 146, @@ -20034,8 +19839,8 @@ }, "test": { "type": "CallExpression", - "start": 5414, - "end": 5450, + "start": 5382, + "end": 5418, "loc": { "start": { "line": 146, @@ -20048,8 +19853,8 @@ }, "callee": { "type": "Identifier", - "start": 5414, - "end": 5417, + "start": 5382, + "end": 5385, "loc": { "start": { "line": 146, @@ -20067,8 +19872,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5418, - "end": 5431, + "start": 5386, + "end": 5399, "loc": { "start": { "line": 146, @@ -20081,8 +19886,8 @@ }, "object": { "type": "ThisExpression", - "start": 5418, - "end": 5422, + "start": 5386, + "end": 5390, "loc": { "start": { "line": 146, @@ -20096,8 +19901,8 @@ }, "property": { "type": "Identifier", - "start": 5423, - "end": 5431, + "start": 5391, + "end": 5399, "loc": { "start": { "line": 146, @@ -20115,8 +19920,8 @@ }, { "type": "StringLiteral", - "start": 5433, - "end": 5449, + "start": 5401, + "end": 5417, "loc": { "start": { "line": 146, @@ -20138,8 +19943,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 5452, - "end": 5488, + "start": 5420, + "end": 5456, "loc": { "start": { "line": 146, @@ -20152,8 +19957,8 @@ }, "argument": { "type": "MemberExpression", - "start": 5459, - "end": 5487, + "start": 5427, + "end": 5455, "loc": { "start": { "line": 146, @@ -20166,8 +19971,8 @@ }, "object": { "type": "MemberExpression", - "start": 5459, - "end": 5472, + "start": 5427, + "end": 5440, "loc": { "start": { "line": 146, @@ -20180,8 +19985,8 @@ }, "object": { "type": "ThisExpression", - "start": 5459, - "end": 5463, + "start": 5427, + "end": 5431, "loc": { "start": { "line": 146, @@ -20195,8 +20000,8 @@ }, "property": { "type": "Identifier", - "start": 5464, - "end": 5472, + "start": 5432, + "end": 5440, "loc": { "start": { "line": 146, @@ -20214,8 +20019,8 @@ }, "property": { "type": "Identifier", - "start": 5473, - "end": 5487, + "start": 5441, + "end": 5455, "loc": { "start": { "line": 146, @@ -20238,8 +20043,8 @@ { "type": "CommentLine", "value": " Get the collection code from the specimen object if present.", - "start": 5342, - "end": 5405, + "start": 5310, + "end": 5373, "loc": { "start": { "line": 145, @@ -20256,8 +20061,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 5494, - "end": 5566, + "start": 5462, + "end": 5534, "loc": { "start": { "line": 148, @@ -20272,8 +20077,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 5571, - "end": 5598, + "start": 5539, + "end": 5566, "loc": { "start": { "line": 149, @@ -20289,8 +20094,8 @@ }, { "type": "IfStatement", - "start": 5603, - "end": 5810, + "start": 5571, + "end": 5778, "loc": { "start": { "line": 150, @@ -20303,8 +20108,8 @@ }, "test": { "type": "CallExpression", - "start": 5607, - "end": 5641, + "start": 5575, + "end": 5609, "loc": { "start": { "line": 150, @@ -20317,8 +20122,8 @@ }, "callee": { "type": "Identifier", - "start": 5607, - "end": 5610, + "start": 5575, + "end": 5578, "loc": { "start": { "line": 150, @@ -20336,8 +20141,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5611, - "end": 5624, + "start": 5579, + "end": 5592, "loc": { "start": { "line": 150, @@ -20350,8 +20155,8 @@ }, "object": { "type": "ThisExpression", - "start": 5611, - "end": 5615, + "start": 5579, + "end": 5583, "loc": { "start": { "line": 150, @@ -20365,8 +20170,8 @@ }, "property": { "type": "Identifier", - "start": 5616, - "end": 5624, + "start": 5584, + "end": 5592, "loc": { "start": { "line": 150, @@ -20384,8 +20189,8 @@ }, { "type": "StringLiteral", - "start": 5626, - "end": 5640, + "start": 5594, + "end": 5608, "loc": { "start": { "line": 150, @@ -20407,8 +20212,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 5643, - "end": 5810, + "start": 5611, + "end": 5778, "loc": { "start": { "line": 150, @@ -20422,8 +20227,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 5651, - "end": 5729, + "start": 5619, + "end": 5697, "loc": { "start": { "line": 151, @@ -20437,8 +20242,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 5657, - "end": 5728, + "start": 5625, + "end": 5696, "loc": { "start": { "line": 151, @@ -20451,8 +20256,8 @@ }, "id": { "type": "Identifier", - "start": 5657, - "end": 5665, + "start": 5625, + "end": 5633, "loc": { "start": { "line": 151, @@ -20468,8 +20273,8 @@ }, "init": { "type": "CallExpression", - "start": 5668, - "end": 5728, + "start": 5636, + "end": 5696, "loc": { "start": { "line": 151, @@ -20482,8 +20287,8 @@ }, "callee": { "type": "MemberExpression", - "start": 5668, - "end": 5700, + "start": 5636, + "end": 5668, "loc": { "start": { "line": 151, @@ -20496,8 +20301,8 @@ }, "object": { "type": "Identifier", - "start": 5668, - "end": 5683, + "start": 5636, + "end": 5651, "loc": { "start": { "line": 151, @@ -20513,8 +20318,8 @@ }, "property": { "type": "Identifier", - "start": 5684, - "end": 5700, + "start": 5652, + "end": 5668, "loc": { "start": { "line": 151, @@ -20533,8 +20338,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 5701, - "end": 5727, + "start": 5669, + "end": 5695, "loc": { "start": { "line": 151, @@ -20547,8 +20352,8 @@ }, "object": { "type": "MemberExpression", - "start": 5701, - "end": 5714, + "start": 5669, + "end": 5682, "loc": { "start": { "line": 151, @@ -20561,8 +20366,8 @@ }, "object": { "type": "ThisExpression", - "start": 5701, - "end": 5705, + "start": 5669, + "end": 5673, "loc": { "start": { "line": 151, @@ -20576,8 +20381,8 @@ }, "property": { "type": "Identifier", - "start": 5706, - "end": 5714, + "start": 5674, + "end": 5682, "loc": { "start": { "line": 151, @@ -20595,8 +20400,8 @@ }, "property": { "type": "Identifier", - "start": 5715, - "end": 5727, + "start": 5683, + "end": 5695, "loc": { "start": { "line": 151, @@ -20620,8 +20425,8 @@ }, { "type": "IfStatement", - "start": 5736, - "end": 5804, + "start": 5704, + "end": 5772, "loc": { "start": { "line": 152, @@ -20634,8 +20439,8 @@ }, "test": { "type": "CallExpression", - "start": 5740, - "end": 5771, + "start": 5708, + "end": 5739, "loc": { "start": { "line": 152, @@ -20648,8 +20453,8 @@ }, "callee": { "type": "Identifier", - "start": 5740, - "end": 5743, + "start": 5708, + "end": 5711, "loc": { "start": { "line": 152, @@ -20666,8 +20471,8 @@ "arguments": [ { "type": "Identifier", - "start": 5744, - "end": 5752, + "start": 5712, + "end": 5720, "loc": { "start": { "line": 152, @@ -20683,8 +20488,8 @@ }, { "type": "StringLiteral", - "start": 5754, - "end": 5770, + "start": 5722, + "end": 5738, "loc": { "start": { "line": 152, @@ -20705,8 +20510,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 5773, - "end": 5804, + "start": 5741, + "end": 5772, "loc": { "start": { "line": 152, @@ -20719,8 +20524,8 @@ }, "argument": { "type": "MemberExpression", - "start": 5780, - "end": 5803, + "start": 5748, + "end": 5771, "loc": { "start": { "line": 152, @@ -20733,8 +20538,8 @@ }, "object": { "type": "Identifier", - "start": 5780, - "end": 5788, + "start": 5748, + "end": 5756, "loc": { "start": { "line": 152, @@ -20750,8 +20555,8 @@ }, "property": { "type": "Identifier", - "start": 5789, - "end": 5803, + "start": 5757, + "end": 5771, "loc": { "start": { "line": 152, @@ -20778,8 +20583,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 5494, - "end": 5566, + "start": 5462, + "end": 5534, "loc": { "start": { "line": 148, @@ -20794,8 +20599,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 5571, - "end": 5598, + "start": 5539, + "end": 5566, "loc": { "start": { "line": 149, @@ -20811,8 +20616,8 @@ }, { "type": "ReturnStatement", - "start": 5815, - "end": 5832, + "start": 5783, + "end": 5800, "loc": { "start": { "line": 154, @@ -20825,8 +20630,8 @@ }, "argument": { "type": "Identifier", - "start": 5822, - "end": 5831, + "start": 5790, + "end": 5799, "loc": { "start": { "line": 154, @@ -20849,8 +20654,8 @@ { "type": "CommentBlock", "value": "*\n * Get the collectionCode if present.\n ", - "start": 5263, - "end": 5312, + "start": 5231, + "end": 5280, "loc": { "start": { "line": 141, @@ -20867,8 +20672,8 @@ { "type": "CommentBlock", "value": "*\n * Return the occurrence ID of this specimen, if we have one. Otherwise, we\n * attempt to construct one in the form:\n * \"urn:catalog:\" + institutionCode (if present) + ':' +\n * collectionCode (if present) + ':' + catalogNumber (if present)\n ", - "start": 5840, - "end": 6099, + "start": 5808, + "end": 6067, "loc": { "start": { "line": 157, @@ -20884,8 +20689,8 @@ }, { "type": "ClassMethod", - "start": 6102, - "end": 7142, + "start": 6070, + "end": 7066, "loc": { "start": { "line": 163, @@ -20900,8 +20705,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 6106, - "end": 6118, + "start": 6074, + "end": 6086, "loc": { "start": { "line": 163, @@ -20923,8 +20728,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 6121, - "end": 7142, + "start": 6089, + "end": 7066, "loc": { "start": { "line": 163, @@ -20938,8 +20743,8 @@ "body": [ { "type": "IfStatement", - "start": 6172, - "end": 6311, + "start": 6140, + "end": 6235, "loc": { "start": { "line": 165, @@ -20951,9 +20756,9 @@ } }, "test": { - "type": "LogicalExpression", - "start": 6176, - "end": 6254, + "type": "CallExpression", + "start": 6144, + "end": 6178, "loc": { "start": { "line": 165, @@ -20961,13 +20766,13 @@ }, "end": { "line": 165, - "column": 86 + "column": 42 } }, - "left": { - "type": "CallExpression", - "start": 6176, - "end": 6210, + "callee": { + "type": "Identifier", + "start": 6144, + "end": 6147, "loc": { "start": { "line": 165, @@ -20975,32 +20780,32 @@ }, "end": { "line": 165, - "column": 42 - } + "column": 11 + }, + "identifierName": "has" }, - "callee": { - "type": "Identifier", - "start": 6176, - "end": 6179, + "name": "has", + "leadingComments": null + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 6148, + "end": 6161, "loc": { "start": { "line": 165, - "column": 8 + "column": 12 }, "end": { "line": 165, - "column": 11 - }, - "identifierName": "has" + "column": 25 + } }, - "name": "has", - "leadingComments": null - }, - "arguments": [ - { - "type": "MemberExpression", - "start": 6180, - "end": 6193, + "object": { + "type": "ThisExpression", + "start": 6148, + "end": 6152, "loc": { "start": { "line": 165, @@ -21008,243 +20813,60 @@ }, "end": { "line": 165, - "column": 25 - } - }, - "object": { - "type": "ThisExpression", - "start": 6180, - "end": 6184, - "loc": { - "start": { - "line": 165, - "column": 12 - }, - "end": { - "line": 165, - "column": 16 - } - } - }, - "property": { - "type": "Identifier", - "start": 6185, - "end": 6193, - "loc": { - "start": { - "line": 165, - "column": 17 - }, - "end": { - "line": 165, - "column": 25 - }, - "identifierName": "specimen" - }, - "name": "specimen" - }, - "computed": false - }, - { - "type": "StringLiteral", - "start": 6195, - "end": 6209, - "loc": { - "start": { - "line": 165, - "column": 27 - }, - "end": { - "line": 165, - "column": 41 + "column": 16 } - }, - "extra": { - "rawValue": "occurrenceID", - "raw": "'occurrenceID'" - }, - "value": "occurrenceID" - } - ], - "leadingComments": null - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "start": 6214, - "end": 6254, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 86 - } - }, - "left": { - "type": "CallExpression", - "start": 6214, - "end": 6247, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 79 } }, - "callee": { - "type": "MemberExpression", - "start": 6214, - "end": 6245, + "property": { + "type": "Identifier", + "start": 6153, + "end": 6161, "loc": { "start": { "line": 165, - "column": 46 + "column": 17 }, "end": { "line": 165, - "column": 77 - } - }, - "object": { - "type": "MemberExpression", - "start": 6214, - "end": 6240, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 72 - } - }, - "object": { - "type": "MemberExpression", - "start": 6214, - "end": 6227, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 59 - } - }, - "object": { - "type": "ThisExpression", - "start": 6214, - "end": 6218, - "loc": { - "start": { - "line": 165, - "column": 46 - }, - "end": { - "line": 165, - "column": 50 - } - } - }, - "property": { - "type": "Identifier", - "start": 6219, - "end": 6227, - "loc": { - "start": { - "line": 165, - "column": 51 - }, - "end": { - "line": 165, - "column": 59 - }, - "identifierName": "specimen" - }, - "name": "specimen" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 6228, - "end": 6240, - "loc": { - "start": { - "line": 165, - "column": 60 - }, - "end": { - "line": 165, - "column": 72 - }, - "identifierName": "occurrenceID" - }, - "name": "occurrenceID" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 6241, - "end": 6245, - "loc": { - "start": { - "line": 165, - "column": 73 - }, - "end": { - "line": 165, - "column": 77 - }, - "identifierName": "trim" + "column": 25 }, - "name": "trim" + "identifierName": "specimen" }, - "computed": false + "name": "specimen" }, - "arguments": [] + "computed": false }, - "operator": "!==", - "right": { + { "type": "StringLiteral", - "start": 6252, - "end": 6254, + "start": 6163, + "end": 6177, "loc": { "start": { "line": 165, - "column": 84 + "column": 27 }, "end": { "line": 165, - "column": 86 + "column": 41 } }, "extra": { - "rawValue": "", - "raw": "''" + "rawValue": "occurrenceID", + "raw": "'occurrenceID'" }, - "value": "" + "value": "occurrenceID" } - }, + ], "leadingComments": null }, "consequent": { "type": "BlockStatement", - "start": 6256, - "end": 6311, + "start": 6180, + "end": 6235, "loc": { "start": { "line": 165, - "column": 88 + "column": 44 }, "end": { "line": 167, @@ -21254,8 +20876,8 @@ "body": [ { "type": "ReturnStatement", - "start": 6264, - "end": 6305, + "start": 6188, + "end": 6229, "loc": { "start": { "line": 166, @@ -21268,8 +20890,8 @@ }, "argument": { "type": "CallExpression", - "start": 6271, - "end": 6304, + "start": 6195, + "end": 6228, "loc": { "start": { "line": 166, @@ -21282,8 +20904,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6271, - "end": 6302, + "start": 6195, + "end": 6226, "loc": { "start": { "line": 166, @@ -21296,8 +20918,8 @@ }, "object": { "type": "MemberExpression", - "start": 6271, - "end": 6297, + "start": 6195, + "end": 6221, "loc": { "start": { "line": 166, @@ -21310,8 +20932,8 @@ }, "object": { "type": "MemberExpression", - "start": 6271, - "end": 6284, + "start": 6195, + "end": 6208, "loc": { "start": { "line": 166, @@ -21324,8 +20946,8 @@ }, "object": { "type": "ThisExpression", - "start": 6271, - "end": 6275, + "start": 6195, + "end": 6199, "loc": { "start": { "line": 166, @@ -21339,8 +20961,8 @@ }, "property": { "type": "Identifier", - "start": 6276, - "end": 6284, + "start": 6200, + "end": 6208, "loc": { "start": { "line": 166, @@ -21358,8 +20980,8 @@ }, "property": { "type": "Identifier", - "start": 6285, - "end": 6297, + "start": 6209, + "end": 6221, "loc": { "start": { "line": 166, @@ -21377,8 +20999,8 @@ }, "property": { "type": "Identifier", - "start": 6298, - "end": 6302, + "start": 6222, + "end": 6226, "loc": { "start": { "line": 166, @@ -21406,8 +21028,8 @@ { "type": "CommentLine", "value": " Return the occurrenceID if it exists.", - "start": 6127, - "end": 6167, + "start": 6095, + "end": 6135, "loc": { "start": { "line": 164, @@ -21424,8 +21046,8 @@ { "type": "CommentLine", "value": " Otherwise, we could try to construct the occurrenceID from its components.", - "start": 6317, - "end": 6394, + "start": 6241, + "end": 6318, "loc": { "start": { "line": 169, @@ -21441,8 +21063,8 @@ }, { "type": "IfStatement", - "start": 6399, - "end": 7060, + "start": 6323, + "end": 6984, "loc": { "start": { "line": 170, @@ -21455,8 +21077,8 @@ }, "test": { "type": "CallExpression", - "start": 6403, - "end": 6438, + "start": 6327, + "end": 6362, "loc": { "start": { "line": 170, @@ -21469,8 +21091,8 @@ }, "callee": { "type": "Identifier", - "start": 6403, - "end": 6406, + "start": 6327, + "end": 6330, "loc": { "start": { "line": 170, @@ -21488,8 +21110,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 6407, - "end": 6420, + "start": 6331, + "end": 6344, "loc": { "start": { "line": 170, @@ -21502,8 +21124,8 @@ }, "object": { "type": "ThisExpression", - "start": 6407, - "end": 6411, + "start": 6331, + "end": 6335, "loc": { "start": { "line": 170, @@ -21517,8 +21139,8 @@ }, "property": { "type": "Identifier", - "start": 6412, - "end": 6420, + "start": 6336, + "end": 6344, "loc": { "start": { "line": 170, @@ -21536,8 +21158,8 @@ }, { "type": "StringLiteral", - "start": 6422, - "end": 6437, + "start": 6346, + "end": 6361, "loc": { "start": { "line": 170, @@ -21559,8 +21181,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 6440, - "end": 7060, + "start": 6364, + "end": 6984, "loc": { "start": { "line": 170, @@ -21574,8 +21196,8 @@ "body": [ { "type": "IfStatement", - "start": 6448, - "end": 6820, + "start": 6372, + "end": 6744, "loc": { "start": { "line": 171, @@ -21588,8 +21210,8 @@ }, "test": { "type": "CallExpression", - "start": 6452, - "end": 6489, + "start": 6376, + "end": 6413, "loc": { "start": { "line": 171, @@ -21602,8 +21224,8 @@ }, "callee": { "type": "Identifier", - "start": 6452, - "end": 6455, + "start": 6376, + "end": 6379, "loc": { "start": { "line": 171, @@ -21620,8 +21242,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 6456, - "end": 6469, + "start": 6380, + "end": 6393, "loc": { "start": { "line": 171, @@ -21634,8 +21256,8 @@ }, "object": { "type": "ThisExpression", - "start": 6456, - "end": 6460, + "start": 6380, + "end": 6384, "loc": { "start": { "line": 171, @@ -21649,8 +21271,8 @@ }, "property": { "type": "Identifier", - "start": 6461, - "end": 6469, + "start": 6385, + "end": 6393, "loc": { "start": { "line": 171, @@ -21668,8 +21290,8 @@ }, { "type": "StringLiteral", - "start": 6471, - "end": 6488, + "start": 6395, + "end": 6412, "loc": { "start": { "line": 171, @@ -21690,8 +21312,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 6491, - "end": 6820, + "start": 6415, + "end": 6744, "loc": { "start": { "line": 171, @@ -21705,8 +21327,8 @@ "body": [ { "type": "IfStatement", - "start": 6501, - "end": 6703, + "start": 6425, + "end": 6627, "loc": { "start": { "line": 172, @@ -21719,8 +21341,8 @@ }, "test": { "type": "CallExpression", - "start": 6505, - "end": 6541, + "start": 6429, + "end": 6465, "loc": { "start": { "line": 172, @@ -21733,8 +21355,8 @@ }, "callee": { "type": "Identifier", - "start": 6505, - "end": 6508, + "start": 6429, + "end": 6432, "loc": { "start": { "line": 172, @@ -21751,8 +21373,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 6509, - "end": 6522, + "start": 6433, + "end": 6446, "loc": { "start": { "line": 172, @@ -21765,8 +21387,8 @@ }, "object": { "type": "ThisExpression", - "start": 6509, - "end": 6513, + "start": 6433, + "end": 6437, "loc": { "start": { "line": 172, @@ -21780,8 +21402,8 @@ }, "property": { "type": "Identifier", - "start": 6514, - "end": 6522, + "start": 6438, + "end": 6446, "loc": { "start": { "line": 172, @@ -21799,8 +21421,8 @@ }, { "type": "StringLiteral", - "start": 6524, - "end": 6540, + "start": 6448, + "end": 6464, "loc": { "start": { "line": 172, @@ -21821,8 +21443,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 6543, - "end": 6703, + "start": 6467, + "end": 6627, "loc": { "start": { "line": 172, @@ -21836,8 +21458,8 @@ "body": [ { "type": "ReturnStatement", - "start": 6555, - "end": 6693, + "start": 6479, + "end": 6617, "loc": { "start": { "line": 173, @@ -21850,8 +21472,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 6562, - "end": 6692, + "start": 6486, + "end": 6616, "loc": { "start": { "line": 173, @@ -21865,8 +21487,8 @@ "expressions": [ { "type": "CallExpression", - "start": 6577, - "end": 6613, + "start": 6501, + "end": 6537, "loc": { "start": { "line": 173, @@ -21879,8 +21501,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6577, - "end": 6611, + "start": 6501, + "end": 6535, "loc": { "start": { "line": 173, @@ -21893,8 +21515,8 @@ }, "object": { "type": "MemberExpression", - "start": 6577, - "end": 6606, + "start": 6501, + "end": 6530, "loc": { "start": { "line": 173, @@ -21907,8 +21529,8 @@ }, "object": { "type": "MemberExpression", - "start": 6577, - "end": 6590, + "start": 6501, + "end": 6514, "loc": { "start": { "line": 173, @@ -21921,8 +21543,8 @@ }, "object": { "type": "ThisExpression", - "start": 6577, - "end": 6581, + "start": 6501, + "end": 6505, "loc": { "start": { "line": 173, @@ -21936,8 +21558,8 @@ }, "property": { "type": "Identifier", - "start": 6582, - "end": 6590, + "start": 6506, + "end": 6514, "loc": { "start": { "line": 173, @@ -21955,8 +21577,8 @@ }, "property": { "type": "Identifier", - "start": 6591, - "end": 6606, + "start": 6515, + "end": 6530, "loc": { "start": { "line": 173, @@ -21974,8 +21596,8 @@ }, "property": { "type": "Identifier", - "start": 6607, - "end": 6611, + "start": 6531, + "end": 6535, "loc": { "start": { "line": 173, @@ -21995,8 +21617,8 @@ }, { "type": "CallExpression", - "start": 6617, - "end": 6652, + "start": 6541, + "end": 6576, "loc": { "start": { "line": 173, @@ -22009,8 +21631,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6617, - "end": 6650, + "start": 6541, + "end": 6574, "loc": { "start": { "line": 173, @@ -22023,8 +21645,8 @@ }, "object": { "type": "MemberExpression", - "start": 6617, - "end": 6645, + "start": 6541, + "end": 6569, "loc": { "start": { "line": 173, @@ -22037,8 +21659,8 @@ }, "object": { "type": "MemberExpression", - "start": 6617, - "end": 6630, + "start": 6541, + "end": 6554, "loc": { "start": { "line": 173, @@ -22051,8 +21673,8 @@ }, "object": { "type": "ThisExpression", - "start": 6617, - "end": 6621, + "start": 6541, + "end": 6545, "loc": { "start": { "line": 173, @@ -22066,8 +21688,8 @@ }, "property": { "type": "Identifier", - "start": 6622, - "end": 6630, + "start": 6546, + "end": 6554, "loc": { "start": { "line": 173, @@ -22085,8 +21707,8 @@ }, "property": { "type": "Identifier", - "start": 6631, - "end": 6645, + "start": 6555, + "end": 6569, "loc": { "start": { "line": 173, @@ -22104,8 +21726,8 @@ }, "property": { "type": "Identifier", - "start": 6646, - "end": 6650, + "start": 6570, + "end": 6574, "loc": { "start": { "line": 173, @@ -22125,8 +21747,8 @@ }, { "type": "CallExpression", - "start": 6656, - "end": 6690, + "start": 6580, + "end": 6614, "loc": { "start": { "line": 173, @@ -22139,8 +21761,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6656, - "end": 6688, + "start": 6580, + "end": 6612, "loc": { "start": { "line": 173, @@ -22153,8 +21775,8 @@ }, "object": { "type": "MemberExpression", - "start": 6656, - "end": 6683, + "start": 6580, + "end": 6607, "loc": { "start": { "line": 173, @@ -22167,8 +21789,8 @@ }, "object": { "type": "MemberExpression", - "start": 6656, - "end": 6669, + "start": 6580, + "end": 6593, "loc": { "start": { "line": 173, @@ -22181,8 +21803,8 @@ }, "object": { "type": "ThisExpression", - "start": 6656, - "end": 6660, + "start": 6580, + "end": 6584, "loc": { "start": { "line": 173, @@ -22196,8 +21818,8 @@ }, "property": { "type": "Identifier", - "start": 6661, - "end": 6669, + "start": 6585, + "end": 6593, "loc": { "start": { "line": 173, @@ -22215,8 +21837,8 @@ }, "property": { "type": "Identifier", - "start": 6670, - "end": 6683, + "start": 6594, + "end": 6607, "loc": { "start": { "line": 173, @@ -22234,8 +21856,8 @@ }, "property": { "type": "Identifier", - "start": 6684, - "end": 6688, + "start": 6608, + "end": 6612, "loc": { "start": { "line": 173, @@ -22257,8 +21879,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 6563, - "end": 6575, + "start": 6487, + "end": 6499, "loc": { "start": { "line": 173, @@ -22277,8 +21899,8 @@ }, { "type": "TemplateElement", - "start": 6614, - "end": 6615, + "start": 6538, + "end": 6539, "loc": { "start": { "line": 173, @@ -22297,8 +21919,8 @@ }, { "type": "TemplateElement", - "start": 6653, - "end": 6654, + "start": 6577, + "end": 6578, "loc": { "start": { "line": 173, @@ -22317,8 +21939,8 @@ }, { "type": "TemplateElement", - "start": 6691, - "end": 6691, + "start": 6615, + "end": 6615, "loc": { "start": { "line": 173, @@ -22345,8 +21967,8 @@ }, { "type": "ReturnStatement", - "start": 6712, - "end": 6812, + "start": 6636, + "end": 6736, "loc": { "start": { "line": 175, @@ -22359,8 +21981,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 6719, - "end": 6811, + "start": 6643, + "end": 6735, "loc": { "start": { "line": 175, @@ -22374,8 +21996,8 @@ "expressions": [ { "type": "CallExpression", - "start": 6734, - "end": 6770, + "start": 6658, + "end": 6694, "loc": { "start": { "line": 175, @@ -22388,8 +22010,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6734, - "end": 6768, + "start": 6658, + "end": 6692, "loc": { "start": { "line": 175, @@ -22402,8 +22024,8 @@ }, "object": { "type": "MemberExpression", - "start": 6734, - "end": 6763, + "start": 6658, + "end": 6687, "loc": { "start": { "line": 175, @@ -22416,8 +22038,8 @@ }, "object": { "type": "MemberExpression", - "start": 6734, - "end": 6747, + "start": 6658, + "end": 6671, "loc": { "start": { "line": 175, @@ -22430,8 +22052,8 @@ }, "object": { "type": "ThisExpression", - "start": 6734, - "end": 6738, + "start": 6658, + "end": 6662, "loc": { "start": { "line": 175, @@ -22445,8 +22067,8 @@ }, "property": { "type": "Identifier", - "start": 6739, - "end": 6747, + "start": 6663, + "end": 6671, "loc": { "start": { "line": 175, @@ -22464,8 +22086,8 @@ }, "property": { "type": "Identifier", - "start": 6748, - "end": 6763, + "start": 6672, + "end": 6687, "loc": { "start": { "line": 175, @@ -22483,8 +22105,8 @@ }, "property": { "type": "Identifier", - "start": 6764, - "end": 6768, + "start": 6688, + "end": 6692, "loc": { "start": { "line": 175, @@ -22504,8 +22126,8 @@ }, { "type": "CallExpression", - "start": 6775, - "end": 6809, + "start": 6699, + "end": 6733, "loc": { "start": { "line": 175, @@ -22518,8 +22140,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6775, - "end": 6807, + "start": 6699, + "end": 6731, "loc": { "start": { "line": 175, @@ -22532,8 +22154,8 @@ }, "object": { "type": "MemberExpression", - "start": 6775, - "end": 6802, + "start": 6699, + "end": 6726, "loc": { "start": { "line": 175, @@ -22546,8 +22168,8 @@ }, "object": { "type": "MemberExpression", - "start": 6775, - "end": 6788, + "start": 6699, + "end": 6712, "loc": { "start": { "line": 175, @@ -22560,8 +22182,8 @@ }, "object": { "type": "ThisExpression", - "start": 6775, - "end": 6779, + "start": 6699, + "end": 6703, "loc": { "start": { "line": 175, @@ -22575,8 +22197,8 @@ }, "property": { "type": "Identifier", - "start": 6780, - "end": 6788, + "start": 6704, + "end": 6712, "loc": { "start": { "line": 175, @@ -22594,8 +22216,8 @@ }, "property": { "type": "Identifier", - "start": 6789, - "end": 6802, + "start": 6713, + "end": 6726, "loc": { "start": { "line": 175, @@ -22613,8 +22235,8 @@ }, "property": { "type": "Identifier", - "start": 6803, - "end": 6807, + "start": 6727, + "end": 6731, "loc": { "start": { "line": 175, @@ -22636,8 +22258,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 6720, - "end": 6732, + "start": 6644, + "end": 6656, "loc": { "start": { "line": 175, @@ -22656,8 +22278,8 @@ }, { "type": "TemplateElement", - "start": 6771, - "end": 6773, + "start": 6695, + "end": 6697, "loc": { "start": { "line": 175, @@ -22676,8 +22298,8 @@ }, { "type": "TemplateElement", - "start": 6810, - "end": 6810, + "start": 6734, + "end": 6734, "loc": { "start": { "line": 175, @@ -22704,8 +22326,8 @@ }, { "type": "IfStatement", - "start": 6827, - "end": 6986, + "start": 6751, + "end": 6910, "loc": { "start": { "line": 177, @@ -22718,8 +22340,8 @@ }, "test": { "type": "CallExpression", - "start": 6831, - "end": 6867, + "start": 6755, + "end": 6791, "loc": { "start": { "line": 177, @@ -22732,8 +22354,8 @@ }, "callee": { "type": "Identifier", - "start": 6831, - "end": 6834, + "start": 6755, + "end": 6758, "loc": { "start": { "line": 177, @@ -22750,8 +22372,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 6835, - "end": 6848, + "start": 6759, + "end": 6772, "loc": { "start": { "line": 177, @@ -22764,8 +22386,8 @@ }, "object": { "type": "ThisExpression", - "start": 6835, - "end": 6839, + "start": 6759, + "end": 6763, "loc": { "start": { "line": 177, @@ -22779,8 +22401,8 @@ }, "property": { "type": "Identifier", - "start": 6840, - "end": 6848, + "start": 6764, + "end": 6772, "loc": { "start": { "line": 177, @@ -22798,8 +22420,8 @@ }, { "type": "StringLiteral", - "start": 6850, - "end": 6866, + "start": 6774, + "end": 6790, "loc": { "start": { "line": 177, @@ -22820,8 +22442,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 6869, - "end": 6986, + "start": 6793, + "end": 6910, "loc": { "start": { "line": 177, @@ -22835,8 +22457,8 @@ "body": [ { "type": "ReturnStatement", - "start": 6879, - "end": 6978, + "start": 6803, + "end": 6902, "loc": { "start": { "line": 178, @@ -22849,8 +22471,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 6886, - "end": 6977, + "start": 6810, + "end": 6901, "loc": { "start": { "line": 178, @@ -22864,8 +22486,8 @@ "expressions": [ { "type": "CallExpression", - "start": 6902, - "end": 6937, + "start": 6826, + "end": 6861, "loc": { "start": { "line": 178, @@ -22878,8 +22500,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6902, - "end": 6935, + "start": 6826, + "end": 6859, "loc": { "start": { "line": 178, @@ -22892,8 +22514,8 @@ }, "object": { "type": "MemberExpression", - "start": 6902, - "end": 6930, + "start": 6826, + "end": 6854, "loc": { "start": { "line": 178, @@ -22906,8 +22528,8 @@ }, "object": { "type": "MemberExpression", - "start": 6902, - "end": 6915, + "start": 6826, + "end": 6839, "loc": { "start": { "line": 178, @@ -22920,8 +22542,8 @@ }, "object": { "type": "ThisExpression", - "start": 6902, - "end": 6906, + "start": 6826, + "end": 6830, "loc": { "start": { "line": 178, @@ -22935,8 +22557,8 @@ }, "property": { "type": "Identifier", - "start": 6907, - "end": 6915, + "start": 6831, + "end": 6839, "loc": { "start": { "line": 178, @@ -22954,8 +22576,8 @@ }, "property": { "type": "Identifier", - "start": 6916, - "end": 6930, + "start": 6840, + "end": 6854, "loc": { "start": { "line": 178, @@ -22973,8 +22595,8 @@ }, "property": { "type": "Identifier", - "start": 6931, - "end": 6935, + "start": 6855, + "end": 6859, "loc": { "start": { "line": 178, @@ -22994,8 +22616,8 @@ }, { "type": "CallExpression", - "start": 6941, - "end": 6975, + "start": 6865, + "end": 6899, "loc": { "start": { "line": 178, @@ -23008,8 +22630,8 @@ }, "callee": { "type": "MemberExpression", - "start": 6941, - "end": 6973, + "start": 6865, + "end": 6897, "loc": { "start": { "line": 178, @@ -23022,8 +22644,8 @@ }, "object": { "type": "MemberExpression", - "start": 6941, - "end": 6968, + "start": 6865, + "end": 6892, "loc": { "start": { "line": 178, @@ -23036,8 +22658,8 @@ }, "object": { "type": "MemberExpression", - "start": 6941, - "end": 6954, + "start": 6865, + "end": 6878, "loc": { "start": { "line": 178, @@ -23050,8 +22672,8 @@ }, "object": { "type": "ThisExpression", - "start": 6941, - "end": 6945, + "start": 6865, + "end": 6869, "loc": { "start": { "line": 178, @@ -23065,8 +22687,8 @@ }, "property": { "type": "Identifier", - "start": 6946, - "end": 6954, + "start": 6870, + "end": 6878, "loc": { "start": { "line": 178, @@ -23084,8 +22706,8 @@ }, "property": { "type": "Identifier", - "start": 6955, - "end": 6968, + "start": 6879, + "end": 6892, "loc": { "start": { "line": 178, @@ -23103,8 +22725,8 @@ }, "property": { "type": "Identifier", - "start": 6969, - "end": 6973, + "start": 6893, + "end": 6897, "loc": { "start": { "line": 178, @@ -23126,8 +22748,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 6887, - "end": 6900, + "start": 6811, + "end": 6824, "loc": { "start": { "line": 178, @@ -23146,8 +22768,8 @@ }, { "type": "TemplateElement", - "start": 6938, - "end": 6939, + "start": 6862, + "end": 6863, "loc": { "start": { "line": 178, @@ -23166,8 +22788,8 @@ }, { "type": "TemplateElement", - "start": 6976, - "end": 6976, + "start": 6900, + "end": 6900, "loc": { "start": { "line": 178, @@ -23194,8 +22816,8 @@ }, { "type": "ReturnStatement", - "start": 6993, - "end": 7054, + "start": 6917, + "end": 6978, "loc": { "start": { "line": 180, @@ -23208,8 +22830,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 7000, - "end": 7053, + "start": 6924, + "end": 6977, "loc": { "start": { "line": 180, @@ -23223,8 +22845,8 @@ "expressions": [ { "type": "CallExpression", - "start": 7017, - "end": 7051, + "start": 6941, + "end": 6975, "loc": { "start": { "line": 180, @@ -23237,8 +22859,8 @@ }, "callee": { "type": "MemberExpression", - "start": 7017, - "end": 7049, + "start": 6941, + "end": 6973, "loc": { "start": { "line": 180, @@ -23251,8 +22873,8 @@ }, "object": { "type": "MemberExpression", - "start": 7017, - "end": 7044, + "start": 6941, + "end": 6968, "loc": { "start": { "line": 180, @@ -23265,8 +22887,8 @@ }, "object": { "type": "MemberExpression", - "start": 7017, - "end": 7030, + "start": 6941, + "end": 6954, "loc": { "start": { "line": 180, @@ -23279,8 +22901,8 @@ }, "object": { "type": "ThisExpression", - "start": 7017, - "end": 7021, + "start": 6941, + "end": 6945, "loc": { "start": { "line": 180, @@ -23294,8 +22916,8 @@ }, "property": { "type": "Identifier", - "start": 7022, - "end": 7030, + "start": 6946, + "end": 6954, "loc": { "start": { "line": 180, @@ -23313,8 +22935,8 @@ }, "property": { "type": "Identifier", - "start": 7031, - "end": 7044, + "start": 6955, + "end": 6968, "loc": { "start": { "line": 180, @@ -23332,8 +22954,8 @@ }, "property": { "type": "Identifier", - "start": 7045, - "end": 7049, + "start": 6969, + "end": 6973, "loc": { "start": { "line": 180, @@ -23355,8 +22977,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 7001, - "end": 7015, + "start": 6925, + "end": 6939, "loc": { "start": { "line": 180, @@ -23375,8 +22997,8 @@ }, { "type": "TemplateElement", - "start": 7052, - "end": 7052, + "start": 6976, + "end": 6976, "loc": { "start": { "line": 180, @@ -23405,8 +23027,8 @@ { "type": "CommentLine", "value": " Otherwise, we could try to construct the occurrenceID from its components.", - "start": 6317, - "end": 6394, + "start": 6241, + "end": 6318, "loc": { "start": { "line": 169, @@ -23423,8 +23045,8 @@ { "type": "CommentLine", "value": " None of our specimen identifier schemes worked.", - "start": 7066, - "end": 7116, + "start": 6990, + "end": 7040, "loc": { "start": { "line": 183, @@ -23440,8 +23062,8 @@ }, { "type": "ReturnStatement", - "start": 7121, - "end": 7138, + "start": 7045, + "end": 7062, "loc": { "start": { "line": 184, @@ -23454,8 +23076,8 @@ }, "argument": { "type": "Identifier", - "start": 7128, - "end": 7137, + "start": 7052, + "end": 7061, "loc": { "start": { "line": 184, @@ -23474,8 +23096,8 @@ { "type": "CommentLine", "value": " None of our specimen identifier schemes worked.", - "start": 7066, - "end": 7116, + "start": 6990, + "end": 7040, "loc": { "start": { "line": 183, @@ -23497,8 +23119,8 @@ { "type": "CommentBlock", "value": "*\n * Return the occurrence ID of this specimen, if we have one. Otherwise, we\n * attempt to construct one in the form:\n * \"urn:catalog:\" + institutionCode (if present) + ':' +\n * collectionCode (if present) + ':' + catalogNumber (if present)\n ", - "start": 5840, - "end": 6099, + "start": 5808, + "end": 6067, "loc": { "start": { "line": 157, @@ -23515,8 +23137,8 @@ { "type": "CommentBlock", "value": "*\n * Return the basis of record, if one is present.\n ", - "start": 7146, - "end": 7207, + "start": 7070, + "end": 7131, "loc": { "start": { "line": 187, @@ -23532,8 +23154,8 @@ }, { "type": "ClassMethod", - "start": 7210, - "end": 7349, + "start": 7134, + "end": 7262, "loc": { "start": { "line": 190, @@ -23548,8 +23170,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 7214, - "end": 7227, + "start": 7138, + "end": 7151, "loc": { "start": { "line": 190, @@ -23571,8 +23193,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 7230, - "end": 7349, + "start": 7154, + "end": 7262, "loc": { "start": { "line": 190, @@ -23586,8 +23208,8 @@ "body": [ { "type": "IfStatement", - "start": 7236, - "end": 7323, + "start": 7160, + "end": 7236, "loc": { "start": { "line": 191, @@ -23595,13 +23217,13 @@ }, "end": { "line": 191, - "column": 91 + "column": 80 } }, "test": { "type": "CallExpression", - "start": 7240, - "end": 7279, + "start": 7164, + "end": 7199, "loc": { "start": { "line": 191, @@ -23609,13 +23231,13 @@ }, "end": { "line": 191, - "column": 47 + "column": 43 } }, "callee": { "type": "Identifier", - "start": 7240, - "end": 7243, + "start": 7164, + "end": 7167, "loc": { "start": { "line": 191, @@ -23632,8 +23254,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 7244, - "end": 7257, + "start": 7168, + "end": 7181, "loc": { "start": { "line": 191, @@ -23646,8 +23268,8 @@ }, "object": { "type": "ThisExpression", - "start": 7244, - "end": 7248, + "start": 7168, + "end": 7172, "loc": { "start": { "line": 191, @@ -23661,8 +23283,8 @@ }, "property": { "type": "Identifier", - "start": 7249, - "end": 7257, + "start": 7173, + "end": 7181, "loc": { "start": { "line": 191, @@ -23680,8 +23302,8 @@ }, { "type": "StringLiteral", - "start": 7259, - "end": 7278, + "start": 7183, + "end": 7198, "loc": { "start": { "line": 191, @@ -23689,86 +23311,86 @@ }, "end": { "line": 191, - "column": 46 + "column": 42 } }, "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "rawValue": "basisOfRecord", + "raw": "'basisOfRecord'" }, - "value": "dwc:basisOfRecord" + "value": "basisOfRecord" } ] }, "consequent": { "type": "ReturnStatement", - "start": 7281, - "end": 7323, + "start": 7201, + "end": 7236, "loc": { "start": { "line": 191, - "column": 49 + "column": 45 }, "end": { "line": 191, - "column": 91 + "column": 80 } }, "argument": { "type": "MemberExpression", - "start": 7288, - "end": 7322, + "start": 7208, + "end": 7235, "loc": { "start": { "line": 191, - "column": 56 + "column": 52 }, "end": { "line": 191, - "column": 90 + "column": 79 } }, "object": { "type": "MemberExpression", - "start": 7288, - "end": 7301, + "start": 7208, + "end": 7221, "loc": { "start": { "line": 191, - "column": 56 + "column": 52 }, "end": { "line": 191, - "column": 69 + "column": 65 } }, "object": { "type": "ThisExpression", - "start": 7288, - "end": 7292, + "start": 7208, + "end": 7212, "loc": { "start": { "line": 191, - "column": 56 + "column": 52 }, "end": { "line": 191, - "column": 60 + "column": 56 } } }, "property": { "type": "Identifier", - "start": 7293, - "end": 7301, + "start": 7213, + "end": 7221, "loc": { "start": { "line": 191, - "column": 61 + "column": 57 }, "end": { "line": 191, - "column": 69 + "column": 65 }, "identifierName": "specimen" }, @@ -23777,34 +23399,31 @@ "computed": false }, "property": { - "type": "StringLiteral", - "start": 7302, - "end": 7321, + "type": "Identifier", + "start": 7222, + "end": 7235, "loc": { "start": { "line": 191, - "column": 70 + "column": 66 }, "end": { "line": 191, - "column": 89 - } - }, - "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "column": 79 + }, + "identifierName": "basisOfRecord" }, - "value": "dwc:basisOfRecord" + "name": "basisOfRecord" }, - "computed": true + "computed": false } }, "alternate": null }, { "type": "ReturnStatement", - "start": 7328, - "end": 7345, + "start": 7241, + "end": 7258, "loc": { "start": { "line": 192, @@ -23817,8 +23436,8 @@ }, "argument": { "type": "Identifier", - "start": 7335, - "end": 7344, + "start": 7248, + "end": 7257, "loc": { "start": { "line": 192, @@ -23841,8 +23460,8 @@ { "type": "CommentBlock", "value": "*\n * Return the basis of record, if one is present.\n ", - "start": 7146, - "end": 7207, + "start": 7070, + "end": 7131, "loc": { "start": { "line": 187, @@ -23859,8 +23478,8 @@ { "type": "CommentBlock", "value": "*\n * Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for\n * recommended values.\n ", - "start": 7353, - "end": 7468, + "start": 7266, + "end": 7381, "loc": { "start": { "line": 195, @@ -23876,8 +23495,8 @@ }, { "type": "ClassMethod", - "start": 7471, - "end": 7545, + "start": 7384, + "end": 7451, "loc": { "start": { "line": 199, @@ -23892,8 +23511,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 7475, - "end": 7488, + "start": 7388, + "end": 7401, "loc": { "start": { "line": 199, @@ -23915,8 +23534,8 @@ "params": [ { "type": "Identifier", - "start": 7489, - "end": 7492, + "start": 7402, + "end": 7405, "loc": { "start": { "line": 199, @@ -23933,8 +23552,8 @@ ], "body": { "type": "BlockStatement", - "start": 7494, - "end": 7545, + "start": 7407, + "end": 7451, "loc": { "start": { "line": 199, @@ -23948,8 +23567,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 7500, - "end": 7541, + "start": 7413, + "end": 7447, "loc": { "start": { "line": 200, @@ -23957,13 +23576,13 @@ }, "end": { "line": 200, - "column": 45 + "column": 38 } }, "expression": { "type": "AssignmentExpression", - "start": 7500, - "end": 7540, + "start": 7413, + "end": 7446, "loc": { "start": { "line": 200, @@ -23971,14 +23590,14 @@ }, "end": { "line": 200, - "column": 44 + "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 7500, - "end": 7534, + "start": 7413, + "end": 7440, "loc": { "start": { "line": 200, @@ -23986,13 +23605,13 @@ }, "end": { "line": 200, - "column": 38 + "column": 31 } }, "object": { "type": "MemberExpression", - "start": 7500, - "end": 7513, + "start": 7413, + "end": 7426, "loc": { "start": { "line": 200, @@ -24005,8 +23624,8 @@ }, "object": { "type": "ThisExpression", - "start": 7500, - "end": 7504, + "start": 7413, + "end": 7417, "loc": { "start": { "line": 200, @@ -24020,8 +23639,8 @@ }, "property": { "type": "Identifier", - "start": 7505, - "end": 7513, + "start": 7418, + "end": 7426, "loc": { "start": { "line": 200, @@ -24038,9 +23657,9 @@ "computed": false }, "property": { - "type": "StringLiteral", - "start": 7514, - "end": 7533, + "type": "Identifier", + "start": 7427, + "end": 7440, "loc": { "start": { "line": 200, @@ -24048,29 +23667,26 @@ }, "end": { "line": 200, - "column": 37 - } - }, - "extra": { - "rawValue": "dwc:basisOfRecord", - "raw": "'dwc:basisOfRecord'" + "column": 31 + }, + "identifierName": "basisOfRecord" }, - "value": "dwc:basisOfRecord" + "name": "basisOfRecord" }, - "computed": true + "computed": false }, "right": { "type": "Identifier", - "start": 7537, - "end": 7540, + "start": 7443, + "end": 7446, "loc": { "start": { "line": 200, - "column": 41 + "column": 34 }, "end": { "line": 200, - "column": 44 + "column": 37 }, "identifierName": "bor" }, @@ -24086,8 +23702,8 @@ { "type": "CommentBlock", "value": "*\n * Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for\n * recommended values.\n ", - "start": 7353, - "end": 7468, + "start": 7266, + "end": 7381, "loc": { "start": { "line": 195, @@ -24104,8 +23720,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as a taxon concept if it contains taxon name information. ", - "start": 7549, - "end": 7634, + "start": 7455, + "end": 7540, "loc": { "start": { "line": 203, @@ -24121,8 +23737,8 @@ }, { "type": "ClassMethod", - "start": 7637, - "end": 7808, + "start": 7543, + "end": 7714, "loc": { "start": { "line": 204, @@ -24137,8 +23753,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 7641, - "end": 7653, + "start": 7547, + "end": 7559, "loc": { "start": { "line": 204, @@ -24160,8 +23776,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 7656, - "end": 7808, + "start": 7562, + "end": 7714, "loc": { "start": { "line": 204, @@ -24175,8 +23791,8 @@ "body": [ { "type": "IfStatement", - "start": 7662, - "end": 7718, + "start": 7568, + "end": 7624, "loc": { "start": { "line": 205, @@ -24189,8 +23805,8 @@ }, "test": { "type": "CallExpression", - "start": 7666, - "end": 7695, + "start": 7572, + "end": 7601, "loc": { "start": { "line": 205, @@ -24203,8 +23819,8 @@ }, "callee": { "type": "Identifier", - "start": 7666, - "end": 7669, + "start": 7572, + "end": 7575, "loc": { "start": { "line": 205, @@ -24221,8 +23837,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 7670, - "end": 7683, + "start": 7576, + "end": 7589, "loc": { "start": { "line": 205, @@ -24235,8 +23851,8 @@ }, "object": { "type": "ThisExpression", - "start": 7670, - "end": 7674, + "start": 7576, + "end": 7580, "loc": { "start": { "line": 205, @@ -24250,8 +23866,8 @@ }, "property": { "type": "Identifier", - "start": 7675, - "end": 7683, + "start": 7581, + "end": 7589, "loc": { "start": { "line": 205, @@ -24269,8 +23885,8 @@ }, { "type": "StringLiteral", - "start": 7685, - "end": 7694, + "start": 7591, + "end": 7600, "loc": { "start": { "line": 205, @@ -24291,8 +23907,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 7697, - "end": 7718, + "start": 7603, + "end": 7624, "loc": { "start": { "line": 205, @@ -24305,8 +23921,8 @@ }, "argument": { "type": "MemberExpression", - "start": 7704, - "end": 7717, + "start": 7610, + "end": 7623, "loc": { "start": { "line": 205, @@ -24319,8 +23935,8 @@ }, "object": { "type": "ThisExpression", - "start": 7704, - "end": 7708, + "start": 7610, + "end": 7614, "loc": { "start": { "line": 205, @@ -24334,8 +23950,8 @@ }, "property": { "type": "Identifier", - "start": 7709, - "end": 7717, + "start": 7615, + "end": 7623, "loc": { "start": { "line": 205, @@ -24356,8 +23972,8 @@ }, { "type": "IfStatement", - "start": 7723, - "end": 7782, + "start": 7629, + "end": 7688, "loc": { "start": { "line": 206, @@ -24370,8 +23986,8 @@ }, "test": { "type": "CallExpression", - "start": 7727, - "end": 7759, + "start": 7633, + "end": 7665, "loc": { "start": { "line": 206, @@ -24384,8 +24000,8 @@ }, "callee": { "type": "Identifier", - "start": 7727, - "end": 7730, + "start": 7633, + "end": 7636, "loc": { "start": { "line": 206, @@ -24402,8 +24018,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 7731, - "end": 7744, + "start": 7637, + "end": 7650, "loc": { "start": { "line": 206, @@ -24416,8 +24032,8 @@ }, "object": { "type": "ThisExpression", - "start": 7731, - "end": 7735, + "start": 7637, + "end": 7641, "loc": { "start": { "line": 206, @@ -24431,8 +24047,8 @@ }, "property": { "type": "Identifier", - "start": 7736, - "end": 7744, + "start": 7642, + "end": 7650, "loc": { "start": { "line": 206, @@ -24450,8 +24066,8 @@ }, { "type": "StringLiteral", - "start": 7746, - "end": 7758, + "start": 7652, + "end": 7664, "loc": { "start": { "line": 206, @@ -24472,8 +24088,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 7761, - "end": 7782, + "start": 7667, + "end": 7688, "loc": { "start": { "line": 206, @@ -24486,8 +24102,8 @@ }, "argument": { "type": "MemberExpression", - "start": 7768, - "end": 7781, + "start": 7674, + "end": 7687, "loc": { "start": { "line": 206, @@ -24500,8 +24116,8 @@ }, "object": { "type": "ThisExpression", - "start": 7768, - "end": 7772, + "start": 7674, + "end": 7678, "loc": { "start": { "line": 206, @@ -24515,8 +24131,8 @@ }, "property": { "type": "Identifier", - "start": 7773, - "end": 7781, + "start": 7679, + "end": 7687, "loc": { "start": { "line": 206, @@ -24537,8 +24153,8 @@ }, { "type": "ReturnStatement", - "start": 7787, - "end": 7804, + "start": 7693, + "end": 7710, "loc": { "start": { "line": 207, @@ -24551,8 +24167,8 @@ }, "argument": { "type": "Identifier", - "start": 7794, - "end": 7803, + "start": 7700, + "end": 7709, "loc": { "start": { "line": 207, @@ -24575,8 +24191,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as a taxon concept if it contains taxon name information. ", - "start": 7549, - "end": 7634, + "start": 7455, + "end": 7540, "loc": { "start": { "line": 203, @@ -24593,8 +24209,8 @@ { "type": "CommentBlock", "value": "* Return a label for this specimen. ", - "start": 7812, - "end": 7852, + "start": 7718, + "end": 7758, "loc": { "start": { "line": 210, @@ -24610,8 +24226,8 @@ }, { "type": "ClassMethod", - "start": 7855, - "end": 8337, + "start": 7761, + "end": 8243, "loc": { "start": { "line": 211, @@ -24626,8 +24242,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 7859, - "end": 7864, + "start": 7765, + "end": 7770, "loc": { "start": { "line": 211, @@ -24649,8 +24265,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 7867, - "end": 8337, + "start": 7773, + "end": 8243, "loc": { "start": { "line": 211, @@ -24664,8 +24280,8 @@ "body": [ { "type": "IfStatement", - "start": 7930, - "end": 7971, + "start": 7836, + "end": 7877, "loc": { "start": { "line": 213, @@ -24678,8 +24294,8 @@ }, "test": { "type": "UnaryExpression", - "start": 7934, - "end": 7952, + "start": 7840, + "end": 7858, "loc": { "start": { "line": 213, @@ -24694,8 +24310,8 @@ "prefix": true, "argument": { "type": "MemberExpression", - "start": 7935, - "end": 7952, + "start": 7841, + "end": 7858, "loc": { "start": { "line": 213, @@ -24708,8 +24324,8 @@ }, "object": { "type": "ThisExpression", - "start": 7935, - "end": 7939, + "start": 7841, + "end": 7845, "loc": { "start": { "line": 213, @@ -24724,8 +24340,8 @@ }, "property": { "type": "Identifier", - "start": 7940, - "end": 7952, + "start": 7846, + "end": 7858, "loc": { "start": { "line": 213, @@ -24749,8 +24365,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 7954, - "end": 7971, + "start": 7860, + "end": 7877, "loc": { "start": { "line": 213, @@ -24763,8 +24379,8 @@ }, "argument": { "type": "Identifier", - "start": 7961, - "end": 7970, + "start": 7867, + "end": 7876, "loc": { "start": { "line": 213, @@ -24785,8 +24401,8 @@ { "type": "CommentLine", "value": " We can't return anything without an occurrenceID.", - "start": 7873, - "end": 7925, + "start": 7779, + "end": 7831, "loc": { "start": { "line": 212, @@ -24803,8 +24419,8 @@ { "type": "CommentLine", "value": " Note that specimens may be identified to a taxon concept. If so, we should", - "start": 7977, - "end": 8054, + "start": 7883, + "end": 7960, "loc": { "start": { "line": 215, @@ -24819,8 +24435,8 @@ { "type": "CommentLine", "value": " include that information in the label.", - "start": 8059, - "end": 8100, + "start": 7965, + "end": 8006, "loc": { "start": { "line": 216, @@ -24836,8 +24452,8 @@ }, { "type": "IfStatement", - "start": 8105, - "end": 8247, + "start": 8011, + "end": 8153, "loc": { "start": { "line": 217, @@ -24850,8 +24466,8 @@ }, "test": { "type": "MemberExpression", - "start": 8109, - "end": 8126, + "start": 8015, + "end": 8032, "loc": { "start": { "line": 217, @@ -24864,8 +24480,8 @@ }, "object": { "type": "ThisExpression", - "start": 8109, - "end": 8113, + "start": 8015, + "end": 8019, "loc": { "start": { "line": 217, @@ -24880,8 +24496,8 @@ }, "property": { "type": "Identifier", - "start": 8114, - "end": 8126, + "start": 8020, + "end": 8032, "loc": { "start": { "line": 217, @@ -24900,8 +24516,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 8128, - "end": 8247, + "start": 8034, + "end": 8153, "loc": { "start": { "line": 217, @@ -24915,8 +24531,8 @@ "body": [ { "type": "ReturnStatement", - "start": 8136, - "end": 8241, + "start": 8042, + "end": 8147, "loc": { "start": { "line": 218, @@ -24929,8 +24545,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 8143, - "end": 8240, + "start": 8049, + "end": 8146, "loc": { "start": { "line": 218, @@ -24944,8 +24560,8 @@ "expressions": [ { "type": "MemberExpression", - "start": 8155, - "end": 8172, + "start": 8061, + "end": 8078, "loc": { "start": { "line": 218, @@ -24958,8 +24574,8 @@ }, "object": { "type": "ThisExpression", - "start": 8155, - "end": 8159, + "start": 8061, + "end": 8065, "loc": { "start": { "line": 218, @@ -24973,8 +24589,8 @@ }, "property": { "type": "Identifier", - "start": 8160, - "end": 8172, + "start": 8066, + "end": 8078, "loc": { "start": { "line": 218, @@ -24992,8 +24608,8 @@ }, { "type": "MemberExpression", - "start": 8190, - "end": 8238, + "start": 8096, + "end": 8144, "loc": { "start": { "line": 218, @@ -25006,8 +24622,8 @@ }, "object": { "type": "NewExpression", - "start": 8190, - "end": 8232, + "start": 8096, + "end": 8138, "loc": { "start": { "line": 218, @@ -25020,8 +24636,8 @@ }, "callee": { "type": "Identifier", - "start": 8194, - "end": 8213, + "start": 8100, + "end": 8119, "loc": { "start": { "line": 218, @@ -25038,8 +24654,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 8214, - "end": 8231, + "start": 8120, + "end": 8137, "loc": { "start": { "line": 218, @@ -25052,8 +24668,8 @@ }, "object": { "type": "ThisExpression", - "start": 8214, - "end": 8218, + "start": 8120, + "end": 8124, "loc": { "start": { "line": 218, @@ -25067,8 +24683,8 @@ }, "property": { "type": "Identifier", - "start": 8219, - "end": 8231, + "start": 8125, + "end": 8137, "loc": { "start": { "line": 218, @@ -25088,8 +24704,8 @@ }, "property": { "type": "Identifier", - "start": 8233, - "end": 8238, + "start": 8139, + "end": 8144, "loc": { "start": { "line": 218, @@ -25109,8 +24725,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 8144, - "end": 8153, + "start": 8050, + "end": 8059, "loc": { "start": { "line": 218, @@ -25129,8 +24745,8 @@ }, { "type": "TemplateElement", - "start": 8173, - "end": 8188, + "start": 8079, + "end": 8094, "loc": { "start": { "line": 218, @@ -25149,8 +24765,8 @@ }, { "type": "TemplateElement", - "start": 8239, - "end": 8239, + "start": 8145, + "end": 8145, "loc": { "start": { "line": 218, @@ -25179,8 +24795,8 @@ { "type": "CommentLine", "value": " Note that specimens may be identified to a taxon concept. If so, we should", - "start": 7977, - "end": 8054, + "start": 7883, + "end": 7960, "loc": { "start": { "line": 215, @@ -25195,8 +24811,8 @@ { "type": "CommentLine", "value": " include that information in the label.", - "start": 8059, - "end": 8100, + "start": 7965, + "end": 8006, "loc": { "start": { "line": 216, @@ -25213,8 +24829,8 @@ { "type": "CommentLine", "value": " Return a label for this specimen.", - "start": 8253, - "end": 8289, + "start": 8159, + "end": 8195, "loc": { "start": { "line": 221, @@ -25230,8 +24846,8 @@ }, { "type": "ReturnStatement", - "start": 8294, - "end": 8333, + "start": 8200, + "end": 8239, "loc": { "start": { "line": 222, @@ -25244,8 +24860,8 @@ }, "argument": { "type": "TemplateLiteral", - "start": 8301, - "end": 8332, + "start": 8207, + "end": 8238, "loc": { "start": { "line": 222, @@ -25259,8 +24875,8 @@ "expressions": [ { "type": "MemberExpression", - "start": 8313, - "end": 8330, + "start": 8219, + "end": 8236, "loc": { "start": { "line": 222, @@ -25273,8 +24889,8 @@ }, "object": { "type": "ThisExpression", - "start": 8313, - "end": 8317, + "start": 8219, + "end": 8223, "loc": { "start": { "line": 222, @@ -25288,8 +24904,8 @@ }, "property": { "type": "Identifier", - "start": 8318, - "end": 8330, + "start": 8224, + "end": 8236, "loc": { "start": { "line": 222, @@ -25309,8 +24925,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 8302, - "end": 8311, + "start": 8208, + "end": 8217, "loc": { "start": { "line": 222, @@ -25330,8 +24946,8 @@ }, { "type": "TemplateElement", - "start": 8331, - "end": 8331, + "start": 8237, + "end": 8237, "loc": { "start": { "line": 222, @@ -25355,8 +24971,8 @@ { "type": "CommentLine", "value": " Return a label for this specimen.", - "start": 8253, - "end": 8289, + "start": 8159, + "end": 8195, "loc": { "start": { "line": 221, @@ -25378,8 +24994,8 @@ { "type": "CommentBlock", "value": "* Return a label for this specimen. ", - "start": 7812, - "end": 7852, + "start": 7718, + "end": 7758, "loc": { "start": { "line": 210, @@ -25396,8 +25012,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as an equivalentClass expression. ", - "start": 8341, - "end": 8402, + "start": 8247, + "end": 8308, "loc": { "start": { "line": 225, @@ -25413,8 +25029,8 @@ }, { "type": "ClassMethod", - "start": 8405, - "end": 8834, + "start": 8311, + "end": 8740, "loc": { "start": { "line": 226, @@ -25429,8 +25045,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 8409, - "end": 8424, + "start": 8315, + "end": 8330, "loc": { "start": { "line": 226, @@ -25452,8 +25068,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 8427, - "end": 8834, + "start": 8333, + "end": 8740, "loc": { "start": { "line": 226, @@ -25467,8 +25083,8 @@ "body": [ { "type": "IfStatement", - "start": 8487, - "end": 8528, + "start": 8393, + "end": 8434, "loc": { "start": { "line": 228, @@ -25481,8 +25097,8 @@ }, "test": { "type": "UnaryExpression", - "start": 8491, - "end": 8509, + "start": 8397, + "end": 8415, "loc": { "start": { "line": 228, @@ -25497,8 +25113,8 @@ "prefix": true, "argument": { "type": "MemberExpression", - "start": 8492, - "end": 8509, + "start": 8398, + "end": 8415, "loc": { "start": { "line": 228, @@ -25511,8 +25127,8 @@ }, "object": { "type": "ThisExpression", - "start": 8492, - "end": 8496, + "start": 8398, + "end": 8402, "loc": { "start": { "line": 228, @@ -25527,8 +25143,8 @@ }, "property": { "type": "Identifier", - "start": 8497, - "end": 8509, + "start": 8403, + "end": 8415, "loc": { "start": { "line": 228, @@ -25552,8 +25168,8 @@ }, "consequent": { "type": "ReturnStatement", - "start": 8511, - "end": 8528, + "start": 8417, + "end": 8434, "loc": { "start": { "line": 228, @@ -25566,8 +25182,8 @@ }, "argument": { "type": "Identifier", - "start": 8518, - "end": 8527, + "start": 8424, + "end": 8433, "loc": { "start": { "line": 228, @@ -25588,8 +25204,8 @@ { "type": "CommentLine", "value": " We can't do anything without an occurrence ID!", - "start": 8433, - "end": 8482, + "start": 8339, + "end": 8388, "loc": { "start": { "line": 227, @@ -25606,8 +25222,8 @@ { "type": "CommentLine", "value": " TODO: Should we also match by this.taxonConcept is one is available?", - "start": 8534, - "end": 8605, + "start": 8440, + "end": 8511, "loc": { "start": { "line": 230, @@ -25622,8 +25238,8 @@ { "type": "CommentLine", "value": " Technically no, but it might be useful. Hmm.", - "start": 8610, - "end": 8657, + "start": 8516, + "end": 8563, "loc": { "start": { "line": 231, @@ -25638,8 +25254,8 @@ { "type": "CommentLine", "value": " Return as an OWL restriction.", - "start": 8663, - "end": 8695, + "start": 8569, + "end": 8601, "loc": { "start": { "line": 233, @@ -25655,8 +25271,8 @@ }, { "type": "ReturnStatement", - "start": 8700, - "end": 8830, + "start": 8606, + "end": 8736, "loc": { "start": { "line": 234, @@ -25669,8 +25285,8 @@ }, "argument": { "type": "ObjectExpression", - "start": 8707, - "end": 8829, + "start": 8613, + "end": 8735, "loc": { "start": { "line": 234, @@ -25684,8 +25300,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 8715, - "end": 8741, + "start": 8621, + "end": 8647, "loc": { "start": { "line": 235, @@ -25701,8 +25317,8 @@ "computed": false, "key": { "type": "StringLiteral", - "start": 8715, - "end": 8722, + "start": 8621, + "end": 8628, "loc": { "start": { "line": 235, @@ -25722,8 +25338,8 @@ }, "value": { "type": "StringLiteral", - "start": 8724, - "end": 8741, + "start": 8630, + "end": 8647, "loc": { "start": { "line": 235, @@ -25744,8 +25360,8 @@ }, { "type": "ObjectProperty", - "start": 8749, - "end": 8787, + "start": 8655, + "end": 8693, "loc": { "start": { "line": 236, @@ -25761,8 +25377,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 8749, - "end": 8759, + "start": 8655, + "end": 8665, "loc": { "start": { "line": 236, @@ -25778,8 +25394,8 @@ }, "value": { "type": "MemberExpression", - "start": 8761, - "end": 8787, + "start": 8667, + "end": 8693, "loc": { "start": { "line": 236, @@ -25792,8 +25408,8 @@ }, "object": { "type": "Identifier", - "start": 8761, - "end": 8769, + "start": 8667, + "end": 8675, "loc": { "start": { "line": 236, @@ -25809,8 +25425,8 @@ }, "property": { "type": "Identifier", - "start": 8770, - "end": 8787, + "start": 8676, + "end": 8693, "loc": { "start": { "line": 236, @@ -25829,8 +25445,8 @@ }, { "type": "ObjectProperty", - "start": 8795, - "end": 8822, + "start": 8701, + "end": 8728, "loc": { "start": { "line": 237, @@ -25846,8 +25462,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 8795, - "end": 8803, + "start": 8701, + "end": 8709, "loc": { "start": { "line": 237, @@ -25863,8 +25479,8 @@ }, "value": { "type": "MemberExpression", - "start": 8805, - "end": 8822, + "start": 8711, + "end": 8728, "loc": { "start": { "line": 237, @@ -25877,8 +25493,8 @@ }, "object": { "type": "ThisExpression", - "start": 8805, - "end": 8809, + "start": 8711, + "end": 8715, "loc": { "start": { "line": 237, @@ -25892,8 +25508,8 @@ }, "property": { "type": "Identifier", - "start": 8810, - "end": 8822, + "start": 8716, + "end": 8728, "loc": { "start": { "line": 237, @@ -25917,8 +25533,8 @@ { "type": "CommentLine", "value": " TODO: Should we also match by this.taxonConcept is one is available?", - "start": 8534, - "end": 8605, + "start": 8440, + "end": 8511, "loc": { "start": { "line": 230, @@ -25933,8 +25549,8 @@ { "type": "CommentLine", "value": " Technically no, but it might be useful. Hmm.", - "start": 8610, - "end": 8657, + "start": 8516, + "end": 8563, "loc": { "start": { "line": 231, @@ -25949,8 +25565,8 @@ { "type": "CommentLine", "value": " Return as an OWL restriction.", - "start": 8663, - "end": 8695, + "start": 8569, + "end": 8601, "loc": { "start": { "line": 233, @@ -25971,8 +25587,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as an equivalentClass expression. ", - "start": 8341, - "end": 8402, + "start": 8247, + "end": 8308, "loc": { "start": { "line": 225, @@ -25991,9 +25607,9 @@ "leadingComments": [ { "type": "CommentBlock", - "value": "*\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a dwc:occurrenceID with the occurrence identifier.\n * - Should have a dwc:basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n ", + "value": "*\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a occurrenceID with the occurrence identifier.\n * - Should have a basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n ", "start": 325, - "end": 1088, + "end": 1080, "loc": { "start": { "line": 9, @@ -26019,9 +25635,9 @@ "comments": [ { "type": "CommentBlock", - "value": "*\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a dwc:occurrenceID with the occurrence identifier.\n * - Should have a dwc:basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n ", + "value": "*\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a occurrenceID with the occurrence identifier.\n * - Should have a basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n ", "start": 325, - "end": 1088, + "end": 1080, "loc": { "start": { "line": 9, @@ -26036,8 +25652,8 @@ { "type": "CommentBlock", "value": "* The '@type' of specimens in JSON-LD document. ", - "start": 1115, - "end": 1167, + "start": 1107, + "end": 1159, "loc": { "start": { "line": 25, @@ -26052,8 +25668,8 @@ { "type": "CommentBlock", "value": "* Construct a wrapper around a specimen. ", - "start": 1242, - "end": 1287, + "start": 1234, + "end": 1279, "loc": { "start": { "line": 30, @@ -26068,8 +25684,8 @@ { "type": "CommentBlock", "value": "*\n * Normalize the specified specimen.\n * @param specimen A specimen to be normalized.\n ", - "start": 1351, - "end": 1449, + "start": 1343, + "end": 1441, "loc": { "start": { "line": 35, @@ -26084,8 +25700,8 @@ { "type": "CommentBlock", "value": "*\n * Parse the provided occurrence ID. The two expected formats are:\n * - 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]'\n * (in which case, we ignore the first two \"components\" here)\n * - '[institutionCode]:[collectionCode]:[catalogNumber]'\n ", - "start": 1986, - "end": 2267, + "start": 1972, + "end": 2253, "loc": { "start": { "line": 54, @@ -26100,8 +25716,8 @@ { "type": "CommentLine", "value": " Copy the occurrence ID so we can truncate it if necessary.", - "start": 2351, - "end": 2412, + "start": 2337, + "end": 2398, "loc": { "start": { "line": 61, @@ -26116,8 +25732,8 @@ { "type": "CommentLine", "value": " Prepare the specimen.", - "start": 2524, - "end": 2548, + "start": 2513, + "end": 2537, "loc": { "start": { "line": 65, @@ -26132,8 +25748,8 @@ { "type": "CommentLine", "value": " Look for certain prefixes that suggest that we've been passed a URN or", - "start": 2701, - "end": 2774, + "start": 2669, + "end": 2742, "loc": { "start": { "line": 72, @@ -26148,8 +25764,8 @@ { "type": "CommentLine", "value": " URL instead. If so, don't do any further processing!", - "start": 2779, - "end": 2834, + "start": 2747, + "end": 2802, "loc": { "start": { "line": 73, @@ -26164,8 +25780,8 @@ { "type": "CommentLine", "value": " Parsing an occurrence ID takes some time, so we should memoize it.", - "start": 3104, - "end": 3173, + "start": 3072, + "end": 3141, "loc": { "start": { "line": 86, @@ -26180,8 +25796,8 @@ { "type": "CommentLine", "value": " Split the occurrence ID into components, and store them in the appropriate fields.", - "start": 3344, - "end": 3429, + "start": 3312, + "end": 3397, "loc": { "start": { "line": 91, @@ -26196,8 +25812,8 @@ { "type": "CommentLine", "value": " specimen.institutionCode = undefined;", - "start": 3504, - "end": 3544, + "start": 3472, + "end": 3512, "loc": { "start": { "line": 94, @@ -26212,8 +25828,8 @@ { "type": "CommentLine", "value": " specimen.collectionCode = undefined;", - "start": 3551, - "end": 3590, + "start": 3519, + "end": 3558, "loc": { "start": { "line": 95, @@ -26228,8 +25844,8 @@ { "type": "CommentLine", "value": " Store all split catalog number values.", - "start": 3803, - "end": 3844, + "start": 3771, + "end": 3812, "loc": { "start": { "line": 100, @@ -26244,8 +25860,8 @@ { "type": "CommentBlock", "value": "*\n * Get the catalogNumber if present.\n ", - "start": 4109, - "end": 4157, + "start": 4077, + "end": 4125, "loc": { "start": { "line": 109, @@ -26260,8 +25876,8 @@ { "type": "CommentLine", "value": " Get the catalog number from the specimen object if present.", - "start": 4186, - "end": 4248, + "start": 4154, + "end": 4216, "loc": { "start": { "line": 113, @@ -26276,8 +25892,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract a", - "start": 4335, - "end": 4406, + "start": 4303, + "end": 4374, "loc": { "start": { "line": 116, @@ -26292,8 +25908,8 @@ { "type": "CommentLine", "value": " catalogNumber from there.", - "start": 4411, - "end": 4439, + "start": 4379, + "end": 4407, "loc": { "start": { "line": 117, @@ -26308,8 +25924,8 @@ { "type": "CommentBlock", "value": "*\n * Get the institutionCode if present.\n ", - "start": 4679, - "end": 4729, + "start": 4647, + "end": 4697, "loc": { "start": { "line": 125, @@ -26324,8 +25940,8 @@ { "type": "CommentLine", "value": " Get the institution code from the specimen object if present.", - "start": 4760, - "end": 4824, + "start": 4728, + "end": 4792, "loc": { "start": { "line": 129, @@ -26340,8 +25956,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 4915, - "end": 4987, + "start": 4883, + "end": 4955, "loc": { "start": { "line": 132, @@ -26356,8 +25972,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 4992, - "end": 5019, + "start": 4960, + "end": 4987, "loc": { "start": { "line": 133, @@ -26372,8 +25988,8 @@ { "type": "CommentBlock", "value": "*\n * Get the collectionCode if present.\n ", - "start": 5263, - "end": 5312, + "start": 5231, + "end": 5280, "loc": { "start": { "line": 141, @@ -26388,8 +26004,8 @@ { "type": "CommentLine", "value": " Get the collection code from the specimen object if present.", - "start": 5342, - "end": 5405, + "start": 5310, + "end": 5373, "loc": { "start": { "line": 145, @@ -26404,8 +26020,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 5494, - "end": 5566, + "start": 5462, + "end": 5534, "loc": { "start": { "line": 148, @@ -26420,8 +26036,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 5571, - "end": 5598, + "start": 5539, + "end": 5566, "loc": { "start": { "line": 149, @@ -26436,8 +26052,8 @@ { "type": "CommentBlock", "value": "*\n * Return the occurrence ID of this specimen, if we have one. Otherwise, we\n * attempt to construct one in the form:\n * \"urn:catalog:\" + institutionCode (if present) + ':' +\n * collectionCode (if present) + ':' + catalogNumber (if present)\n ", - "start": 5840, - "end": 6099, + "start": 5808, + "end": 6067, "loc": { "start": { "line": 157, @@ -26452,8 +26068,8 @@ { "type": "CommentLine", "value": " Return the occurrenceID if it exists.", - "start": 6127, - "end": 6167, + "start": 6095, + "end": 6135, "loc": { "start": { "line": 164, @@ -26468,8 +26084,8 @@ { "type": "CommentLine", "value": " Otherwise, we could try to construct the occurrenceID from its components.", - "start": 6317, - "end": 6394, + "start": 6241, + "end": 6318, "loc": { "start": { "line": 169, @@ -26484,8 +26100,8 @@ { "type": "CommentLine", "value": " None of our specimen identifier schemes worked.", - "start": 7066, - "end": 7116, + "start": 6990, + "end": 7040, "loc": { "start": { "line": 183, @@ -26500,8 +26116,8 @@ { "type": "CommentBlock", "value": "*\n * Return the basis of record, if one is present.\n ", - "start": 7146, - "end": 7207, + "start": 7070, + "end": 7131, "loc": { "start": { "line": 187, @@ -26516,8 +26132,8 @@ { "type": "CommentBlock", "value": "*\n * Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for\n * recommended values.\n ", - "start": 7353, - "end": 7468, + "start": 7266, + "end": 7381, "loc": { "start": { "line": 195, @@ -26532,8 +26148,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as a taxon concept if it contains taxon name information. ", - "start": 7549, - "end": 7634, + "start": 7455, + "end": 7540, "loc": { "start": { "line": 203, @@ -26548,8 +26164,8 @@ { "type": "CommentBlock", "value": "* Return a label for this specimen. ", - "start": 7812, - "end": 7852, + "start": 7718, + "end": 7758, "loc": { "start": { "line": 210, @@ -26564,8 +26180,8 @@ { "type": "CommentLine", "value": " We can't return anything without an occurrenceID.", - "start": 7873, - "end": 7925, + "start": 7779, + "end": 7831, "loc": { "start": { "line": 212, @@ -26580,8 +26196,8 @@ { "type": "CommentLine", "value": " Note that specimens may be identified to a taxon concept. If so, we should", - "start": 7977, - "end": 8054, + "start": 7883, + "end": 7960, "loc": { "start": { "line": 215, @@ -26596,8 +26212,8 @@ { "type": "CommentLine", "value": " include that information in the label.", - "start": 8059, - "end": 8100, + "start": 7965, + "end": 8006, "loc": { "start": { "line": 216, @@ -26612,8 +26228,8 @@ { "type": "CommentLine", "value": " Return a label for this specimen.", - "start": 8253, - "end": 8289, + "start": 8159, + "end": 8195, "loc": { "start": { "line": 221, @@ -26628,8 +26244,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as an equivalentClass expression. ", - "start": 8341, - "end": 8402, + "start": 8247, + "end": 8308, "loc": { "start": { "line": 225, @@ -26644,8 +26260,8 @@ { "type": "CommentLine", "value": " We can't do anything without an occurrence ID!", - "start": 8433, - "end": 8482, + "start": 8339, + "end": 8388, "loc": { "start": { "line": 227, @@ -26660,8 +26276,8 @@ { "type": "CommentLine", "value": " TODO: Should we also match by this.taxonConcept is one is available?", - "start": 8534, - "end": 8605, + "start": 8440, + "end": 8511, "loc": { "start": { "line": 230, @@ -26676,8 +26292,8 @@ { "type": "CommentLine", "value": " Technically no, but it might be useful. Hmm.", - "start": 8610, - "end": 8657, + "start": 8516, + "end": 8563, "loc": { "start": { "line": 231, @@ -26692,8 +26308,8 @@ { "type": "CommentLine", "value": " Return as an OWL restriction.", - "start": 8663, - "end": 8695, + "start": 8569, + "end": 8601, "loc": { "start": { "line": 233, @@ -26800,7 +26416,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8J7MTDE", + "value": "M50HFXVTJPWM5", "start": 12, "end": 25, "loc": { @@ -27036,7 +26652,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8J7MTDE", + "value": "M50HFXVTJPWM5", "start": 58, "end": 71, "loc": { @@ -27169,7 +26785,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8JTNLQE", + "value": "M50HFXVT2CD2B", "start": 85, "end": 98, "loc": { @@ -27405,7 +27021,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8JTNLQE", + "value": "M50HFXVT2CD2B", "start": 162, "end": 175, "loc": { @@ -27671,7 +27287,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8JDZPL7", + "value": "M50HFXVT6MY40", "start": 231, "end": 244, "loc": { @@ -27907,7 +27523,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8JDZPL7", + "value": "M50HFXVT6MY40", "start": 309, "end": 322, "loc": { @@ -27949,9 +27565,9 @@ }, { "type": "CommentBlock", - "value": "*\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a dwc:occurrenceID with the occurrence identifier.\n * - Should have a dwc:basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n ", + "value": "*\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a occurrenceID with the occurrence identifier.\n * - Should have a basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n ", "start": 325, - "end": 1088, + "end": 1080, "loc": { "start": { "line": 9, @@ -27978,8 +27594,8 @@ "updateContext": null }, "value": "class", - "start": 1089, - "end": 1094, + "start": 1081, + "end": 1086, "loc": { "start": { "line": 24, @@ -28004,8 +27620,8 @@ "binop": null }, "value": "SpecimenWrapper", - "start": 1095, - "end": 1110, + "start": 1087, + "end": 1102, "loc": { "start": { "line": 24, @@ -28029,8 +27645,8 @@ "postfix": false, "binop": null }, - "start": 1111, - "end": 1112, + "start": 1103, + "end": 1104, "loc": { "start": { "line": 24, @@ -28045,8 +27661,8 @@ { "type": "CommentBlock", "value": "* The '@type' of specimens in JSON-LD document. ", - "start": 1115, - "end": 1167, + "start": 1107, + "end": 1159, "loc": { "start": { "line": 25, @@ -28071,8 +27687,8 @@ "binop": null }, "value": "static", - "start": 1170, - "end": 1176, + "start": 1162, + "end": 1168, "loc": { "start": { "line": 26, @@ -28097,8 +27713,8 @@ "binop": null }, "value": "get", - "start": 1177, - "end": 1180, + "start": 1169, + "end": 1172, "loc": { "start": { "line": 26, @@ -28123,8 +27739,8 @@ "binop": null }, "value": "TYPE_SPECIMEN", - "start": 1181, - "end": 1194, + "start": 1173, + "end": 1186, "loc": { "start": { "line": 26, @@ -28148,8 +27764,8 @@ "postfix": false, "binop": null }, - "start": 1194, - "end": 1195, + "start": 1186, + "end": 1187, "loc": { "start": { "line": 26, @@ -28173,8 +27789,8 @@ "postfix": false, "binop": null }, - "start": 1195, - "end": 1196, + "start": 1187, + "end": 1188, "loc": { "start": { "line": 26, @@ -28198,8 +27814,8 @@ "postfix": false, "binop": null }, - "start": 1197, - "end": 1198, + "start": 1189, + "end": 1190, "loc": { "start": { "line": 26, @@ -28226,8 +27842,8 @@ "updateContext": null }, "value": "return", - "start": 1203, - "end": 1209, + "start": 1195, + "end": 1201, "loc": { "start": { "line": 27, @@ -28252,8 +27868,8 @@ "binop": null }, "value": "owlterms", - "start": 1210, - "end": 1218, + "start": 1202, + "end": 1210, "loc": { "start": { "line": 27, @@ -28278,8 +27894,8 @@ "binop": null, "updateContext": null }, - "start": 1218, - "end": 1219, + "start": 1210, + "end": 1211, "loc": { "start": { "line": 27, @@ -28304,8 +27920,8 @@ "binop": null }, "value": "DWC_OCCURRENCE", - "start": 1219, - "end": 1233, + "start": 1211, + "end": 1225, "loc": { "start": { "line": 27, @@ -28330,8 +27946,8 @@ "binop": null, "updateContext": null }, - "start": 1233, - "end": 1234, + "start": 1225, + "end": 1226, "loc": { "start": { "line": 27, @@ -28355,8 +27971,8 @@ "postfix": false, "binop": null }, - "start": 1237, - "end": 1238, + "start": 1229, + "end": 1230, "loc": { "start": { "line": 28, @@ -28371,8 +27987,8 @@ { "type": "CommentBlock", "value": "* Construct a wrapper around a specimen. ", - "start": 1242, - "end": 1287, + "start": 1234, + "end": 1279, "loc": { "start": { "line": 30, @@ -28397,8 +28013,8 @@ "binop": null }, "value": "constructor", - "start": 1290, - "end": 1301, + "start": 1282, + "end": 1293, "loc": { "start": { "line": 31, @@ -28422,8 +28038,8 @@ "postfix": false, "binop": null }, - "start": 1301, - "end": 1302, + "start": 1293, + "end": 1294, "loc": { "start": { "line": 31, @@ -28448,8 +28064,8 @@ "binop": null }, "value": "specimen", - "start": 1302, - "end": 1310, + "start": 1294, + "end": 1302, "loc": { "start": { "line": 31, @@ -28473,8 +28089,8 @@ "postfix": false, "binop": null }, - "start": 1310, - "end": 1311, + "start": 1302, + "end": 1303, "loc": { "start": { "line": 31, @@ -28498,8 +28114,8 @@ "postfix": false, "binop": null }, - "start": 1312, - "end": 1313, + "start": 1304, + "end": 1305, "loc": { "start": { "line": 31, @@ -28526,8 +28142,8 @@ "updateContext": null }, "value": "this", - "start": 1318, - "end": 1322, + "start": 1310, + "end": 1314, "loc": { "start": { "line": 32, @@ -28552,8 +28168,8 @@ "binop": null, "updateContext": null }, - "start": 1322, - "end": 1323, + "start": 1314, + "end": 1315, "loc": { "start": { "line": 32, @@ -28578,8 +28194,8 @@ "binop": null }, "value": "specimen", - "start": 1323, - "end": 1331, + "start": 1315, + "end": 1323, "loc": { "start": { "line": 32, @@ -28605,8 +28221,8 @@ "updateContext": null }, "value": "=", - "start": 1332, - "end": 1333, + "start": 1324, + "end": 1325, "loc": { "start": { "line": 32, @@ -28631,8 +28247,8 @@ "binop": null }, "value": "specimen", - "start": 1334, - "end": 1342, + "start": 1326, + "end": 1334, "loc": { "start": { "line": 32, @@ -28657,8 +28273,8 @@ "binop": null, "updateContext": null }, - "start": 1342, - "end": 1343, + "start": 1334, + "end": 1335, "loc": { "start": { "line": 32, @@ -28682,8 +28298,8 @@ "postfix": false, "binop": null }, - "start": 1346, - "end": 1347, + "start": 1338, + "end": 1339, "loc": { "start": { "line": 33, @@ -28698,8 +28314,8 @@ { "type": "CommentBlock", "value": "*\n * Normalize the specified specimen.\n * @param specimen A specimen to be normalized.\n ", - "start": 1351, - "end": 1449, + "start": 1343, + "end": 1441, "loc": { "start": { "line": 35, @@ -28724,8 +28340,8 @@ "binop": null }, "value": "static", - "start": 1452, - "end": 1458, + "start": 1444, + "end": 1450, "loc": { "start": { "line": 39, @@ -28750,8 +28366,8 @@ "binop": null }, "value": "normalize", - "start": 1459, - "end": 1468, + "start": 1451, + "end": 1460, "loc": { "start": { "line": 39, @@ -28775,8 +28391,8 @@ "postfix": false, "binop": null }, - "start": 1468, - "end": 1469, + "start": 1460, + "end": 1461, "loc": { "start": { "line": 39, @@ -28801,8 +28417,8 @@ "binop": null }, "value": "specimen", - "start": 1469, - "end": 1477, + "start": 1461, + "end": 1469, "loc": { "start": { "line": 39, @@ -28826,8 +28442,8 @@ "postfix": false, "binop": null }, - "start": 1477, - "end": 1478, + "start": 1469, + "end": 1470, "loc": { "start": { "line": 39, @@ -28851,8 +28467,8 @@ "postfix": false, "binop": null }, - "start": 1479, - "end": 1480, + "start": 1471, + "end": 1472, "loc": { "start": { "line": 39, @@ -28879,8 +28495,8 @@ "updateContext": null }, "value": "const", - "start": 1485, - "end": 1490, + "start": 1477, + "end": 1482, "loc": { "start": { "line": 40, @@ -28905,8 +28521,8 @@ "binop": null }, "value": "wrapped", - "start": 1491, - "end": 1498, + "start": 1483, + "end": 1490, "loc": { "start": { "line": 40, @@ -28932,8 +28548,8 @@ "updateContext": null }, "value": "=", - "start": 1499, - "end": 1500, + "start": 1491, + "end": 1492, "loc": { "start": { "line": 40, @@ -28960,8 +28576,8 @@ "updateContext": null }, "value": "new", - "start": 1501, - "end": 1504, + "start": 1493, + "end": 1496, "loc": { "start": { "line": 40, @@ -28986,8 +28602,8 @@ "binop": null }, "value": "SpecimenWrapper", - "start": 1505, - "end": 1520, + "start": 1497, + "end": 1512, "loc": { "start": { "line": 40, @@ -29011,8 +28627,8 @@ "postfix": false, "binop": null }, - "start": 1520, - "end": 1521, + "start": 1512, + "end": 1513, "loc": { "start": { "line": 40, @@ -29037,8 +28653,8 @@ "binop": null }, "value": "specimen", - "start": 1521, - "end": 1529, + "start": 1513, + "end": 1521, "loc": { "start": { "line": 40, @@ -29062,8 +28678,8 @@ "postfix": false, "binop": null }, - "start": 1529, - "end": 1530, + "start": 1521, + "end": 1522, "loc": { "start": { "line": 40, @@ -29088,8 +28704,8 @@ "binop": null, "updateContext": null }, - "start": 1530, - "end": 1531, + "start": 1522, + "end": 1523, "loc": { "start": { "line": 40, @@ -29116,8 +28732,8 @@ "updateContext": null }, "value": "const", - "start": 1536, - "end": 1541, + "start": 1528, + "end": 1533, "loc": { "start": { "line": 41, @@ -29142,8 +28758,8 @@ "binop": null }, "value": "normalizedSpecimen", - "start": 1542, - "end": 1560, + "start": 1534, + "end": 1552, "loc": { "start": { "line": 41, @@ -29169,8 +28785,8 @@ "updateContext": null }, "value": "=", - "start": 1561, - "end": 1562, + "start": 1553, + "end": 1554, "loc": { "start": { "line": 41, @@ -29194,8 +28810,8 @@ "postfix": false, "binop": null }, - "start": 1563, - "end": 1564, + "start": 1555, + "end": 1556, "loc": { "start": { "line": 41, @@ -29221,8 +28837,8 @@ "updateContext": null }, "value": "@type", - "start": 1571, - "end": 1578, + "start": 1563, + "end": 1570, "loc": { "start": { "line": 42, @@ -29247,8 +28863,8 @@ "binop": null, "updateContext": null }, - "start": 1578, - "end": 1579, + "start": 1570, + "end": 1571, "loc": { "start": { "line": 42, @@ -29273,8 +28889,8 @@ "binop": null }, "value": "SpecimenWrapper", - "start": 1580, - "end": 1595, + "start": 1572, + "end": 1587, "loc": { "start": { "line": 42, @@ -29299,8 +28915,8 @@ "binop": null, "updateContext": null }, - "start": 1595, - "end": 1596, + "start": 1587, + "end": 1588, "loc": { "start": { "line": 42, @@ -29325,8 +28941,8 @@ "binop": null }, "value": "TYPE_SPECIMEN", - "start": 1596, - "end": 1609, + "start": 1588, + "end": 1601, "loc": { "start": { "line": 42, @@ -29351,8 +28967,8 @@ "binop": null, "updateContext": null }, - "start": 1609, - "end": 1610, + "start": 1601, + "end": 1602, "loc": { "start": { "line": 42, @@ -29377,8 +28993,8 @@ "binop": null }, "value": "label", - "start": 1617, - "end": 1622, + "start": 1609, + "end": 1614, "loc": { "start": { "line": 43, @@ -29403,8 +29019,8 @@ "binop": null, "updateContext": null }, - "start": 1622, - "end": 1623, + "start": 1614, + "end": 1615, "loc": { "start": { "line": 43, @@ -29429,8 +29045,8 @@ "binop": null }, "value": "wrapped", - "start": 1624, - "end": 1631, + "start": 1616, + "end": 1623, "loc": { "start": { "line": 43, @@ -29455,8 +29071,8 @@ "binop": null, "updateContext": null }, - "start": 1631, - "end": 1632, + "start": 1623, + "end": 1624, "loc": { "start": { "line": 43, @@ -29481,8 +29097,8 @@ "binop": null }, "value": "label", - "start": 1632, - "end": 1637, + "start": 1624, + "end": 1629, "loc": { "start": { "line": 43, @@ -29507,8 +29123,8 @@ "binop": null, "updateContext": null }, - "start": 1637, - "end": 1638, + "start": 1629, + "end": 1630, "loc": { "start": { "line": 43, @@ -29522,7 +29138,7 @@ }, { "type": { - "label": "string", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -29530,12 +29146,11 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "dwc:basisOfRecord", - "start": 1645, - "end": 1664, + "value": "basisOfRecord", + "start": 1637, + "end": 1650, "loc": { "start": { "line": 44, @@ -29543,7 +29158,7 @@ }, "end": { "line": 44, - "column": 25 + "column": 19 } } }, @@ -29560,16 +29175,16 @@ "binop": null, "updateContext": null }, - "start": 1664, - "end": 1665, + "start": 1650, + "end": 1651, "loc": { "start": { "line": 44, - "column": 25 + "column": 19 }, "end": { "line": 44, - "column": 26 + "column": 20 } } }, @@ -29586,16 +29201,16 @@ "binop": null }, "value": "wrapped", - "start": 1666, - "end": 1673, + "start": 1652, + "end": 1659, "loc": { "start": { "line": 44, - "column": 27 + "column": 21 }, "end": { "line": 44, - "column": 34 + "column": 28 } } }, @@ -29612,16 +29227,16 @@ "binop": null, "updateContext": null }, - "start": 1673, - "end": 1674, + "start": 1659, + "end": 1660, "loc": { "start": { "line": 44, - "column": 34 + "column": 28 }, "end": { "line": 44, - "column": 35 + "column": 29 } } }, @@ -29638,16 +29253,16 @@ "binop": null }, "value": "basisOfRecord", - "start": 1674, - "end": 1687, + "start": 1660, + "end": 1673, "loc": { "start": { "line": 44, - "column": 35 + "column": 29 }, "end": { "line": 44, - "column": 48 + "column": 42 } } }, @@ -29664,16 +29279,16 @@ "binop": null, "updateContext": null }, - "start": 1687, - "end": 1688, + "start": 1673, + "end": 1674, "loc": { "start": { "line": 44, - "column": 48 + "column": 42 }, "end": { "line": 44, - "column": 49 + "column": 43 } } }, @@ -29690,8 +29305,8 @@ "binop": null }, "value": "occurrenceID", - "start": 1695, - "end": 1707, + "start": 1681, + "end": 1693, "loc": { "start": { "line": 45, @@ -29716,8 +29331,8 @@ "binop": null, "updateContext": null }, - "start": 1707, - "end": 1708, + "start": 1693, + "end": 1694, "loc": { "start": { "line": 45, @@ -29742,8 +29357,8 @@ "binop": null }, "value": "wrapped", - "start": 1709, - "end": 1716, + "start": 1695, + "end": 1702, "loc": { "start": { "line": 45, @@ -29768,8 +29383,8 @@ "binop": null, "updateContext": null }, - "start": 1716, - "end": 1717, + "start": 1702, + "end": 1703, "loc": { "start": { "line": 45, @@ -29794,8 +29409,8 @@ "binop": null }, "value": "occurrenceID", - "start": 1717, - "end": 1729, + "start": 1703, + "end": 1715, "loc": { "start": { "line": 45, @@ -29820,8 +29435,8 @@ "binop": null, "updateContext": null }, - "start": 1729, - "end": 1730, + "start": 1715, + "end": 1716, "loc": { "start": { "line": 45, @@ -29846,8 +29461,8 @@ "binop": null }, "value": "catalogNumber", - "start": 1737, - "end": 1750, + "start": 1723, + "end": 1736, "loc": { "start": { "line": 46, @@ -29872,8 +29487,8 @@ "binop": null, "updateContext": null }, - "start": 1750, - "end": 1751, + "start": 1736, + "end": 1737, "loc": { "start": { "line": 46, @@ -29898,8 +29513,8 @@ "binop": null }, "value": "wrapped", - "start": 1752, - "end": 1759, + "start": 1738, + "end": 1745, "loc": { "start": { "line": 46, @@ -29924,8 +29539,8 @@ "binop": null, "updateContext": null }, - "start": 1759, - "end": 1760, + "start": 1745, + "end": 1746, "loc": { "start": { "line": 46, @@ -29950,8 +29565,8 @@ "binop": null }, "value": "catalogNumber", - "start": 1760, - "end": 1773, + "start": 1746, + "end": 1759, "loc": { "start": { "line": 46, @@ -29976,8 +29591,8 @@ "binop": null, "updateContext": null }, - "start": 1773, - "end": 1774, + "start": 1759, + "end": 1760, "loc": { "start": { "line": 46, @@ -30002,8 +29617,8 @@ "binop": null }, "value": "institutionCode", - "start": 1781, - "end": 1796, + "start": 1767, + "end": 1782, "loc": { "start": { "line": 47, @@ -30028,8 +29643,8 @@ "binop": null, "updateContext": null }, - "start": 1796, - "end": 1797, + "start": 1782, + "end": 1783, "loc": { "start": { "line": 47, @@ -30054,8 +29669,8 @@ "binop": null }, "value": "wrapped", - "start": 1798, - "end": 1805, + "start": 1784, + "end": 1791, "loc": { "start": { "line": 47, @@ -30080,8 +29695,8 @@ "binop": null, "updateContext": null }, - "start": 1805, - "end": 1806, + "start": 1791, + "end": 1792, "loc": { "start": { "line": 47, @@ -30106,8 +29721,8 @@ "binop": null }, "value": "institutionCode", - "start": 1806, - "end": 1821, + "start": 1792, + "end": 1807, "loc": { "start": { "line": 47, @@ -30132,8 +29747,8 @@ "binop": null, "updateContext": null }, - "start": 1821, - "end": 1822, + "start": 1807, + "end": 1808, "loc": { "start": { "line": 47, @@ -30158,8 +29773,8 @@ "binop": null }, "value": "collectionCode", - "start": 1829, - "end": 1843, + "start": 1815, + "end": 1829, "loc": { "start": { "line": 48, @@ -30184,8 +29799,8 @@ "binop": null, "updateContext": null }, - "start": 1843, - "end": 1844, + "start": 1829, + "end": 1830, "loc": { "start": { "line": 48, @@ -30210,8 +29825,8 @@ "binop": null }, "value": "wrapped", - "start": 1845, - "end": 1852, + "start": 1831, + "end": 1838, "loc": { "start": { "line": 48, @@ -30236,8 +29851,8 @@ "binop": null, "updateContext": null }, - "start": 1852, - "end": 1853, + "start": 1838, + "end": 1839, "loc": { "start": { "line": 48, @@ -30262,8 +29877,8 @@ "binop": null }, "value": "collectionCode", - "start": 1853, - "end": 1867, + "start": 1839, + "end": 1853, "loc": { "start": { "line": 48, @@ -30288,8 +29903,8 @@ "binop": null, "updateContext": null }, - "start": 1867, - "end": 1868, + "start": 1853, + "end": 1854, "loc": { "start": { "line": 48, @@ -30313,8 +29928,8 @@ "postfix": false, "binop": null }, - "start": 1873, - "end": 1874, + "start": 1859, + "end": 1860, "loc": { "start": { "line": 49, @@ -30339,8 +29954,8 @@ "binop": null, "updateContext": null }, - "start": 1874, - "end": 1875, + "start": 1860, + "end": 1861, "loc": { "start": { "line": 49, @@ -30367,8 +29982,8 @@ "updateContext": null }, "value": "if", - "start": 1880, - "end": 1882, + "start": 1866, + "end": 1868, "loc": { "start": { "line": 50, @@ -30392,8 +30007,8 @@ "postfix": false, "binop": null }, - "start": 1883, - "end": 1884, + "start": 1869, + "end": 1870, "loc": { "start": { "line": 50, @@ -30419,8 +30034,8 @@ "updateContext": null }, "value": "@id", - "start": 1884, - "end": 1889, + "start": 1870, + "end": 1875, "loc": { "start": { "line": 50, @@ -30447,8 +30062,8 @@ "updateContext": null }, "value": "in", - "start": 1890, - "end": 1892, + "start": 1876, + "end": 1878, "loc": { "start": { "line": 50, @@ -30473,8 +30088,8 @@ "binop": null }, "value": "specimen", - "start": 1893, - "end": 1901, + "start": 1879, + "end": 1887, "loc": { "start": { "line": 50, @@ -30498,8 +30113,8 @@ "postfix": false, "binop": null }, - "start": 1901, - "end": 1902, + "start": 1887, + "end": 1888, "loc": { "start": { "line": 50, @@ -30524,8 +30139,8 @@ "binop": null }, "value": "normalizedSpecimen", - "start": 1903, - "end": 1921, + "start": 1889, + "end": 1907, "loc": { "start": { "line": 50, @@ -30550,8 +30165,8 @@ "binop": null, "updateContext": null }, - "start": 1921, - "end": 1922, + "start": 1907, + "end": 1908, "loc": { "start": { "line": 50, @@ -30577,8 +30192,8 @@ "updateContext": null }, "value": "@id", - "start": 1922, - "end": 1927, + "start": 1908, + "end": 1913, "loc": { "start": { "line": 50, @@ -30603,8 +30218,8 @@ "binop": null, "updateContext": null }, - "start": 1927, - "end": 1928, + "start": 1913, + "end": 1914, "loc": { "start": { "line": 50, @@ -30630,8 +30245,8 @@ "updateContext": null }, "value": "=", - "start": 1929, - "end": 1930, + "start": 1915, + "end": 1916, "loc": { "start": { "line": 50, @@ -30656,8 +30271,8 @@ "binop": null }, "value": "specimen", - "start": 1931, - "end": 1939, + "start": 1917, + "end": 1925, "loc": { "start": { "line": 50, @@ -30682,8 +30297,8 @@ "binop": null, "updateContext": null }, - "start": 1939, - "end": 1940, + "start": 1925, + "end": 1926, "loc": { "start": { "line": 50, @@ -30709,8 +30324,8 @@ "updateContext": null }, "value": "@id", - "start": 1940, - "end": 1945, + "start": 1926, + "end": 1931, "loc": { "start": { "line": 50, @@ -30735,8 +30350,8 @@ "binop": null, "updateContext": null }, - "start": 1945, - "end": 1946, + "start": 1931, + "end": 1932, "loc": { "start": { "line": 50, @@ -30761,8 +30376,8 @@ "binop": null, "updateContext": null }, - "start": 1946, - "end": 1947, + "start": 1932, + "end": 1933, "loc": { "start": { "line": 50, @@ -30789,8 +30404,8 @@ "updateContext": null }, "value": "return", - "start": 1952, - "end": 1958, + "start": 1938, + "end": 1944, "loc": { "start": { "line": 51, @@ -30815,8 +30430,8 @@ "binop": null }, "value": "normalizedSpecimen", - "start": 1959, - "end": 1977, + "start": 1945, + "end": 1963, "loc": { "start": { "line": 51, @@ -30841,8 +30456,8 @@ "binop": null, "updateContext": null }, - "start": 1977, - "end": 1978, + "start": 1963, + "end": 1964, "loc": { "start": { "line": 51, @@ -30866,8 +30481,8 @@ "postfix": false, "binop": null }, - "start": 1981, - "end": 1982, + "start": 1967, + "end": 1968, "loc": { "start": { "line": 52, @@ -30882,8 +30497,8 @@ { "type": "CommentBlock", "value": "*\n * Parse the provided occurrence ID. The two expected formats are:\n * - 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]'\n * (in which case, we ignore the first two \"components\" here)\n * - '[institutionCode]:[collectionCode]:[catalogNumber]'\n ", - "start": 1986, - "end": 2267, + "start": 1972, + "end": 2253, "loc": { "start": { "line": 54, @@ -30908,8 +30523,8 @@ "binop": null }, "value": "static", - "start": 2270, - "end": 2276, + "start": 2256, + "end": 2262, "loc": { "start": { "line": 60, @@ -30934,8 +30549,8 @@ "binop": null }, "value": "fromOccurrenceID", - "start": 2277, - "end": 2293, + "start": 2263, + "end": 2279, "loc": { "start": { "line": 60, @@ -30959,8 +30574,8 @@ "postfix": false, "binop": null }, - "start": 2293, - "end": 2294, + "start": 2279, + "end": 2280, "loc": { "start": { "line": 60, @@ -30985,8 +30600,8 @@ "binop": null }, "value": "occurrenceID", - "start": 2294, - "end": 2306, + "start": 2280, + "end": 2292, "loc": { "start": { "line": 60, @@ -31011,8 +30626,8 @@ "binop": null, "updateContext": null }, - "start": 2306, - "end": 2307, + "start": 2292, + "end": 2293, "loc": { "start": { "line": 60, @@ -31037,8 +30652,8 @@ "binop": null }, "value": "basisOfRecord", - "start": 2308, - "end": 2321, + "start": 2294, + "end": 2307, "loc": { "start": { "line": 60, @@ -31064,8 +30679,8 @@ "updateContext": null }, "value": "=", - "start": 2322, - "end": 2323, + "start": 2308, + "end": 2309, "loc": { "start": { "line": 60, @@ -31091,8 +30706,8 @@ "updateContext": null }, "value": "PreservedSpecimen", - "start": 2324, - "end": 2343, + "start": 2310, + "end": 2329, "loc": { "start": { "line": 60, @@ -31116,8 +30731,8 @@ "postfix": false, "binop": null }, - "start": 2343, - "end": 2344, + "start": 2329, + "end": 2330, "loc": { "start": { "line": 60, @@ -31141,8 +30756,8 @@ "postfix": false, "binop": null }, - "start": 2345, - "end": 2346, + "start": 2331, + "end": 2332, "loc": { "start": { "line": 60, @@ -31157,8 +30772,8 @@ { "type": "CommentLine", "value": " Copy the occurrence ID so we can truncate it if necessary.", - "start": 2351, - "end": 2412, + "start": 2337, + "end": 2398, "loc": { "start": { "line": 61, @@ -31185,8 +30800,8 @@ "updateContext": null }, "value": "let", - "start": 2417, - "end": 2420, + "start": 2403, + "end": 2406, "loc": { "start": { "line": 62, @@ -31211,8 +30826,8 @@ "binop": null }, "value": "occurID", - "start": 2421, - "end": 2428, + "start": 2407, + "end": 2414, "loc": { "start": { "line": 62, @@ -31238,8 +30853,8 @@ "updateContext": null }, "value": "=", - "start": 2429, - "end": 2430, + "start": 2415, + "end": 2416, "loc": { "start": { "line": 62, @@ -31264,8 +30879,8 @@ "binop": null }, "value": "occurrenceID", - "start": 2431, - "end": 2443, + "start": 2417, + "end": 2429, "loc": { "start": { "line": 62, @@ -31290,8 +30905,8 @@ "binop": null, "updateContext": null }, - "start": 2443, - "end": 2444, + "start": 2429, + "end": 2430, "loc": { "start": { "line": 62, @@ -31318,8 +30933,8 @@ "updateContext": null }, "value": "if", - "start": 2449, - "end": 2451, + "start": 2435, + "end": 2437, "loc": { "start": { "line": 63, @@ -31343,8 +30958,8 @@ "postfix": false, "binop": null }, - "start": 2452, - "end": 2453, + "start": 2438, + "end": 2439, "loc": { "start": { "line": 63, @@ -31369,8 +30984,8 @@ "binop": null }, "value": "occurID", - "start": 2453, - "end": 2460, + "start": 2439, + "end": 2446, "loc": { "start": { "line": 63, @@ -31395,8 +31010,8 @@ "binop": null, "updateContext": null }, - "start": 2460, - "end": 2461, + "start": 2446, + "end": 2447, "loc": { "start": { "line": 63, @@ -31421,8 +31036,8 @@ "binop": null }, "value": "startsWith", - "start": 2461, - "end": 2471, + "start": 2447, + "end": 2457, "loc": { "start": { "line": 63, @@ -31446,8 +31061,8 @@ "postfix": false, "binop": null }, - "start": 2471, - "end": 2472, + "start": 2457, + "end": 2458, "loc": { "start": { "line": 63, @@ -31473,8 +31088,8 @@ "updateContext": null }, "value": "urn:catalog:", - "start": 2472, - "end": 2486, + "start": 2458, + "end": 2472, "loc": { "start": { "line": 63, @@ -31498,8 +31113,8 @@ "postfix": false, "binop": null }, - "start": 2486, - "end": 2487, + "start": 2472, + "end": 2473, "loc": { "start": { "line": 63, @@ -31523,8 +31138,8 @@ "postfix": false, "binop": null }, - "start": 2487, - "end": 2488, + "start": 2473, + "end": 2474, "loc": { "start": { "line": 63, @@ -31549,8 +31164,8 @@ "binop": null }, "value": "occurID", - "start": 2489, - "end": 2496, + "start": 2475, + "end": 2482, "loc": { "start": { "line": 63, @@ -31576,8 +31191,8 @@ "updateContext": null }, "value": "=", - "start": 2497, - "end": 2498, + "start": 2483, + "end": 2484, "loc": { "start": { "line": 63, @@ -31602,8 +31217,8 @@ "binop": null }, "value": "occurID", - "start": 2499, - "end": 2506, + "start": 2485, + "end": 2492, "loc": { "start": { "line": 63, @@ -31628,8 +31243,8 @@ "binop": null, "updateContext": null }, - "start": 2506, - "end": 2507, + "start": 2492, + "end": 2493, "loc": { "start": { "line": 63, @@ -31653,9 +31268,9 @@ "postfix": false, "binop": null }, - "value": "substr", - "start": 2507, - "end": 2513, + "value": "substring", + "start": 2493, + "end": 2502, "loc": { "start": { "line": 63, @@ -31663,7 +31278,7 @@ }, "end": { "line": 63, - "column": 68 + "column": 71 } } }, @@ -31679,16 +31294,16 @@ "postfix": false, "binop": null }, - "start": 2513, - "end": 2514, + "start": 2502, + "end": 2503, "loc": { "start": { "line": 63, - "column": 68 + "column": 71 }, "end": { "line": 63, - "column": 69 + "column": 72 } } }, @@ -31706,16 +31321,16 @@ "updateContext": null }, "value": 12, - "start": 2514, - "end": 2516, + "start": 2503, + "end": 2505, "loc": { "start": { "line": 63, - "column": 69 + "column": 72 }, "end": { "line": 63, - "column": 71 + "column": 74 } } }, @@ -31731,16 +31346,16 @@ "postfix": false, "binop": null }, - "start": 2516, - "end": 2517, + "start": 2505, + "end": 2506, "loc": { "start": { "line": 63, - "column": 71 + "column": 74 }, "end": { "line": 63, - "column": 72 + "column": 75 } } }, @@ -31757,24 +31372,24 @@ "binop": null, "updateContext": null }, - "start": 2517, - "end": 2518, + "start": 2506, + "end": 2507, "loc": { "start": { "line": 63, - "column": 72 + "column": 75 }, "end": { "line": 63, - "column": 73 + "column": 76 } } }, { "type": "CommentLine", "value": " Prepare the specimen.", - "start": 2524, - "end": 2548, + "start": 2513, + "end": 2537, "loc": { "start": { "line": 65, @@ -31801,8 +31416,8 @@ "updateContext": null }, "value": "const", - "start": 2553, - "end": 2558, + "start": 2542, + "end": 2547, "loc": { "start": { "line": 66, @@ -31827,8 +31442,8 @@ "binop": null }, "value": "specimen", - "start": 2559, - "end": 2567, + "start": 2548, + "end": 2556, "loc": { "start": { "line": 66, @@ -31854,8 +31469,8 @@ "updateContext": null }, "value": "=", - "start": 2568, - "end": 2569, + "start": 2557, + "end": 2558, "loc": { "start": { "line": 66, @@ -31879,8 +31494,8 @@ "postfix": false, "binop": null }, - "start": 2570, - "end": 2571, + "start": 2559, + "end": 2560, "loc": { "start": { "line": 66, @@ -31906,8 +31521,8 @@ "updateContext": null }, "value": "@type", - "start": 2578, - "end": 2585, + "start": 2567, + "end": 2574, "loc": { "start": { "line": 67, @@ -31932,8 +31547,8 @@ "binop": null, "updateContext": null }, - "start": 2585, - "end": 2586, + "start": 2574, + "end": 2575, "loc": { "start": { "line": 67, @@ -31958,8 +31573,8 @@ "binop": null }, "value": "SpecimenWrapper", - "start": 2587, - "end": 2602, + "start": 2576, + "end": 2591, "loc": { "start": { "line": 67, @@ -31984,8 +31599,8 @@ "binop": null, "updateContext": null }, - "start": 2602, - "end": 2603, + "start": 2591, + "end": 2592, "loc": { "start": { "line": 67, @@ -32010,8 +31625,8 @@ "binop": null }, "value": "TYPE_SPECIMEN", - "start": 2603, - "end": 2616, + "start": 2592, + "end": 2605, "loc": { "start": { "line": 67, @@ -32036,8 +31651,8 @@ "binop": null, "updateContext": null }, - "start": 2616, - "end": 2617, + "start": 2605, + "end": 2606, "loc": { "start": { "line": 67, @@ -32049,59 +31664,6 @@ } } }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "dwc:basisOfRecord", - "start": 2624, - "end": 2643, - "loc": { - "start": { - "line": 68, - "column": 6 - }, - "end": { - "line": 68, - "column": 25 - } - } - }, - { - "type": { - "label": ":", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 2643, - "end": 2644, - "loc": { - "start": { - "line": 68, - "column": 25 - }, - "end": { - "line": 68, - "column": 26 - } - } - }, { "type": { "label": "name", @@ -32115,16 +31677,16 @@ "binop": null }, "value": "basisOfRecord", - "start": 2645, - "end": 2658, + "start": 2613, + "end": 2626, "loc": { "start": { "line": 68, - "column": 27 + "column": 6 }, "end": { "line": 68, - "column": 40 + "column": 19 } } }, @@ -32141,16 +31703,16 @@ "binop": null, "updateContext": null }, - "start": 2658, - "end": 2659, + "start": 2626, + "end": 2627, "loc": { "start": { "line": 68, - "column": 40 + "column": 19 }, "end": { "line": 68, - "column": 41 + "column": 20 } } }, @@ -32167,8 +31729,8 @@ "binop": null }, "value": "occurrenceID", - "start": 2666, - "end": 2678, + "start": 2634, + "end": 2646, "loc": { "start": { "line": 69, @@ -32193,8 +31755,8 @@ "binop": null, "updateContext": null }, - "start": 2678, - "end": 2679, + "start": 2646, + "end": 2647, "loc": { "start": { "line": 69, @@ -32219,8 +31781,8 @@ "binop": null }, "value": "occurID", - "start": 2680, - "end": 2687, + "start": 2648, + "end": 2655, "loc": { "start": { "line": 69, @@ -32245,8 +31807,8 @@ "binop": null, "updateContext": null }, - "start": 2687, - "end": 2688, + "start": 2655, + "end": 2656, "loc": { "start": { "line": 69, @@ -32270,8 +31832,8 @@ "postfix": false, "binop": null }, - "start": 2693, - "end": 2694, + "start": 2661, + "end": 2662, "loc": { "start": { "line": 70, @@ -32296,8 +31858,8 @@ "binop": null, "updateContext": null }, - "start": 2694, - "end": 2695, + "start": 2662, + "end": 2663, "loc": { "start": { "line": 70, @@ -32312,8 +31874,8 @@ { "type": "CommentLine", "value": " Look for certain prefixes that suggest that we've been passed a URN or", - "start": 2701, - "end": 2774, + "start": 2669, + "end": 2742, "loc": { "start": { "line": 72, @@ -32328,8 +31890,8 @@ { "type": "CommentLine", "value": " URL instead. If so, don't do any further processing!", - "start": 2779, - "end": 2834, + "start": 2747, + "end": 2802, "loc": { "start": { "line": 73, @@ -32356,8 +31918,8 @@ "updateContext": null }, "value": "const", - "start": 2839, - "end": 2844, + "start": 2807, + "end": 2812, "loc": { "start": { "line": 74, @@ -32382,8 +31944,8 @@ "binop": null }, "value": "URL_URN_PREFIXES", - "start": 2845, - "end": 2861, + "start": 2813, + "end": 2829, "loc": { "start": { "line": 74, @@ -32409,8 +31971,8 @@ "updateContext": null }, "value": "=", - "start": 2862, - "end": 2863, + "start": 2830, + "end": 2831, "loc": { "start": { "line": 74, @@ -32435,8 +31997,8 @@ "binop": null, "updateContext": null }, - "start": 2864, - "end": 2865, + "start": 2832, + "end": 2833, "loc": { "start": { "line": 74, @@ -32462,8 +32024,8 @@ "updateContext": null }, "value": "http://", - "start": 2872, - "end": 2881, + "start": 2840, + "end": 2849, "loc": { "start": { "line": 75, @@ -32488,8 +32050,8 @@ "binop": null, "updateContext": null }, - "start": 2881, - "end": 2882, + "start": 2849, + "end": 2850, "loc": { "start": { "line": 75, @@ -32515,8 +32077,8 @@ "updateContext": null }, "value": "https://", - "start": 2889, - "end": 2899, + "start": 2857, + "end": 2867, "loc": { "start": { "line": 76, @@ -32541,8 +32103,8 @@ "binop": null, "updateContext": null }, - "start": 2899, - "end": 2900, + "start": 2867, + "end": 2868, "loc": { "start": { "line": 76, @@ -32568,8 +32130,8 @@ "updateContext": null }, "value": "ftp://", - "start": 2907, - "end": 2915, + "start": 2875, + "end": 2883, "loc": { "start": { "line": 77, @@ -32594,8 +32156,8 @@ "binop": null, "updateContext": null }, - "start": 2915, - "end": 2916, + "start": 2883, + "end": 2884, "loc": { "start": { "line": 77, @@ -32621,8 +32183,8 @@ "updateContext": null }, "value": "sftp://", - "start": 2923, - "end": 2932, + "start": 2891, + "end": 2900, "loc": { "start": { "line": 78, @@ -32647,8 +32209,8 @@ "binop": null, "updateContext": null }, - "start": 2932, - "end": 2933, + "start": 2900, + "end": 2901, "loc": { "start": { "line": 78, @@ -32674,8 +32236,8 @@ "updateContext": null }, "value": "file://", - "start": 2940, - "end": 2949, + "start": 2908, + "end": 2917, "loc": { "start": { "line": 79, @@ -32700,8 +32262,8 @@ "binop": null, "updateContext": null }, - "start": 2949, - "end": 2950, + "start": 2917, + "end": 2918, "loc": { "start": { "line": 79, @@ -32727,8 +32289,8 @@ "updateContext": null }, "value": "urn:", - "start": 2957, - "end": 2963, + "start": 2925, + "end": 2931, "loc": { "start": { "line": 80, @@ -32753,8 +32315,8 @@ "binop": null, "updateContext": null }, - "start": 2963, - "end": 2964, + "start": 2931, + "end": 2932, "loc": { "start": { "line": 80, @@ -32779,8 +32341,8 @@ "binop": null, "updateContext": null }, - "start": 2969, - "end": 2970, + "start": 2937, + "end": 2938, "loc": { "start": { "line": 81, @@ -32805,8 +32367,8 @@ "binop": null, "updateContext": null }, - "start": 2970, - "end": 2971, + "start": 2938, + "end": 2939, "loc": { "start": { "line": 81, @@ -32833,8 +32395,8 @@ "updateContext": null }, "value": "if", - "start": 2976, - "end": 2978, + "start": 2944, + "end": 2946, "loc": { "start": { "line": 82, @@ -32858,8 +32420,8 @@ "postfix": false, "binop": null }, - "start": 2979, - "end": 2980, + "start": 2947, + "end": 2948, "loc": { "start": { "line": 82, @@ -32884,8 +32446,8 @@ "binop": null }, "value": "URL_URN_PREFIXES", - "start": 2980, - "end": 2996, + "start": 2948, + "end": 2964, "loc": { "start": { "line": 82, @@ -32910,8 +32472,8 @@ "binop": null, "updateContext": null }, - "start": 2996, - "end": 2997, + "start": 2964, + "end": 2965, "loc": { "start": { "line": 82, @@ -32936,8 +32498,8 @@ "binop": null }, "value": "filter", - "start": 2997, - "end": 3003, + "start": 2965, + "end": 2971, "loc": { "start": { "line": 82, @@ -32961,8 +32523,8 @@ "postfix": false, "binop": null }, - "start": 3003, - "end": 3004, + "start": 2971, + "end": 2972, "loc": { "start": { "line": 82, @@ -32987,8 +32549,8 @@ "binop": null }, "value": "prefix", - "start": 3004, - "end": 3010, + "start": 2972, + "end": 2978, "loc": { "start": { "line": 82, @@ -33013,8 +32575,8 @@ "binop": null, "updateContext": null }, - "start": 3011, - "end": 3013, + "start": 2979, + "end": 2981, "loc": { "start": { "line": 82, @@ -33039,8 +32601,8 @@ "binop": null }, "value": "occurID", - "start": 3014, - "end": 3021, + "start": 2982, + "end": 2989, "loc": { "start": { "line": 82, @@ -33065,8 +32627,8 @@ "binop": null, "updateContext": null }, - "start": 3021, - "end": 3022, + "start": 2989, + "end": 2990, "loc": { "start": { "line": 82, @@ -33091,8 +32653,8 @@ "binop": null }, "value": "toLowerCase", - "start": 3022, - "end": 3033, + "start": 2990, + "end": 3001, "loc": { "start": { "line": 82, @@ -33116,8 +32678,8 @@ "postfix": false, "binop": null }, - "start": 3033, - "end": 3034, + "start": 3001, + "end": 3002, "loc": { "start": { "line": 82, @@ -33141,8 +32703,8 @@ "postfix": false, "binop": null }, - "start": 3034, - "end": 3035, + "start": 3002, + "end": 3003, "loc": { "start": { "line": 82, @@ -33167,8 +32729,8 @@ "binop": null, "updateContext": null }, - "start": 3035, - "end": 3036, + "start": 3003, + "end": 3004, "loc": { "start": { "line": 82, @@ -33193,8 +32755,8 @@ "binop": null }, "value": "startsWith", - "start": 3036, - "end": 3046, + "start": 3004, + "end": 3014, "loc": { "start": { "line": 82, @@ -33218,8 +32780,8 @@ "postfix": false, "binop": null }, - "start": 3046, - "end": 3047, + "start": 3014, + "end": 3015, "loc": { "start": { "line": 82, @@ -33244,8 +32806,8 @@ "binop": null }, "value": "prefix", - "start": 3047, - "end": 3053, + "start": 3015, + "end": 3021, "loc": { "start": { "line": 82, @@ -33269,8 +32831,8 @@ "postfix": false, "binop": null }, - "start": 3053, - "end": 3054, + "start": 3021, + "end": 3022, "loc": { "start": { "line": 82, @@ -33294,8 +32856,8 @@ "postfix": false, "binop": null }, - "start": 3054, - "end": 3055, + "start": 3022, + "end": 3023, "loc": { "start": { "line": 82, @@ -33320,8 +32882,8 @@ "binop": null, "updateContext": null }, - "start": 3055, - "end": 3056, + "start": 3023, + "end": 3024, "loc": { "start": { "line": 82, @@ -33346,8 +32908,8 @@ "binop": null }, "value": "length", - "start": 3056, - "end": 3062, + "start": 3024, + "end": 3030, "loc": { "start": { "line": 82, @@ -33373,8 +32935,8 @@ "updateContext": null }, "value": ">", - "start": 3063, - "end": 3064, + "start": 3031, + "end": 3032, "loc": { "start": { "line": 82, @@ -33400,8 +32962,8 @@ "updateContext": null }, "value": 0, - "start": 3065, - "end": 3066, + "start": 3033, + "end": 3034, "loc": { "start": { "line": 82, @@ -33425,8 +32987,8 @@ "postfix": false, "binop": null }, - "start": 3066, - "end": 3067, + "start": 3034, + "end": 3035, "loc": { "start": { "line": 82, @@ -33450,8 +33012,8 @@ "postfix": false, "binop": null }, - "start": 3068, - "end": 3069, + "start": 3036, + "end": 3037, "loc": { "start": { "line": 82, @@ -33478,8 +33040,8 @@ "updateContext": null }, "value": "return", - "start": 3076, - "end": 3082, + "start": 3044, + "end": 3050, "loc": { "start": { "line": 83, @@ -33504,8 +33066,8 @@ "binop": null }, "value": "specimen", - "start": 3083, - "end": 3091, + "start": 3051, + "end": 3059, "loc": { "start": { "line": 83, @@ -33530,8 +33092,8 @@ "binop": null, "updateContext": null }, - "start": 3091, - "end": 3092, + "start": 3059, + "end": 3060, "loc": { "start": { "line": 83, @@ -33555,8 +33117,8 @@ "postfix": false, "binop": null }, - "start": 3097, - "end": 3098, + "start": 3065, + "end": 3066, "loc": { "start": { "line": 84, @@ -33571,8 +33133,8 @@ { "type": "CommentLine", "value": " Parsing an occurrence ID takes some time, so we should memoize it.", - "start": 3104, - "end": 3173, + "start": 3072, + "end": 3141, "loc": { "start": { "line": 86, @@ -33599,8 +33161,8 @@ "updateContext": null }, "value": "if", - "start": 3178, - "end": 3180, + "start": 3146, + "end": 3148, "loc": { "start": { "line": 87, @@ -33624,8 +33186,8 @@ "postfix": false, "binop": null }, - "start": 3181, - "end": 3182, + "start": 3149, + "end": 3150, "loc": { "start": { "line": 87, @@ -33650,8 +33212,8 @@ "binop": null }, "value": "PhyxCacheManager", - "start": 3182, - "end": 3198, + "start": 3150, + "end": 3166, "loc": { "start": { "line": 87, @@ -33676,8 +33238,8 @@ "binop": null, "updateContext": null }, - "start": 3198, - "end": 3199, + "start": 3166, + "end": 3167, "loc": { "start": { "line": 87, @@ -33702,8 +33264,8 @@ "binop": null }, "value": "has", - "start": 3199, - "end": 3202, + "start": 3167, + "end": 3170, "loc": { "start": { "line": 87, @@ -33727,8 +33289,8 @@ "postfix": false, "binop": null }, - "start": 3202, - "end": 3203, + "start": 3170, + "end": 3171, "loc": { "start": { "line": 87, @@ -33754,8 +33316,8 @@ "updateContext": null }, "value": "SpecimenWrapper.occurrenceIDCache", - "start": 3203, - "end": 3238, + "start": 3171, + "end": 3206, "loc": { "start": { "line": 87, @@ -33780,8 +33342,8 @@ "binop": null, "updateContext": null }, - "start": 3238, - "end": 3239, + "start": 3206, + "end": 3207, "loc": { "start": { "line": 87, @@ -33806,8 +33368,8 @@ "binop": null }, "value": "occurID", - "start": 3240, - "end": 3247, + "start": 3208, + "end": 3215, "loc": { "start": { "line": 87, @@ -33831,8 +33393,8 @@ "postfix": false, "binop": null }, - "start": 3247, - "end": 3248, + "start": 3215, + "end": 3216, "loc": { "start": { "line": 87, @@ -33856,8 +33418,8 @@ "postfix": false, "binop": null }, - "start": 3248, - "end": 3249, + "start": 3216, + "end": 3217, "loc": { "start": { "line": 87, @@ -33881,8 +33443,8 @@ "postfix": false, "binop": null }, - "start": 3250, - "end": 3251, + "start": 3218, + "end": 3219, "loc": { "start": { "line": 87, @@ -33909,8 +33471,8 @@ "updateContext": null }, "value": "return", - "start": 3258, - "end": 3264, + "start": 3226, + "end": 3232, "loc": { "start": { "line": 88, @@ -33935,8 +33497,8 @@ "binop": null }, "value": "PhyxCacheManager", - "start": 3265, - "end": 3281, + "start": 3233, + "end": 3249, "loc": { "start": { "line": 88, @@ -33961,8 +33523,8 @@ "binop": null, "updateContext": null }, - "start": 3281, - "end": 3282, + "start": 3249, + "end": 3250, "loc": { "start": { "line": 88, @@ -33987,8 +33549,8 @@ "binop": null }, "value": "get", - "start": 3282, - "end": 3285, + "start": 3250, + "end": 3253, "loc": { "start": { "line": 88, @@ -34012,8 +33574,8 @@ "postfix": false, "binop": null }, - "start": 3285, - "end": 3286, + "start": 3253, + "end": 3254, "loc": { "start": { "line": 88, @@ -34039,8 +33601,8 @@ "updateContext": null }, "value": "SpecimenWrapper.occurrenceIDCache", - "start": 3286, - "end": 3321, + "start": 3254, + "end": 3289, "loc": { "start": { "line": 88, @@ -34065,8 +33627,8 @@ "binop": null, "updateContext": null }, - "start": 3321, - "end": 3322, + "start": 3289, + "end": 3290, "loc": { "start": { "line": 88, @@ -34091,8 +33653,8 @@ "binop": null }, "value": "occurID", - "start": 3323, - "end": 3330, + "start": 3291, + "end": 3298, "loc": { "start": { "line": 88, @@ -34116,8 +33678,8 @@ "postfix": false, "binop": null }, - "start": 3330, - "end": 3331, + "start": 3298, + "end": 3299, "loc": { "start": { "line": 88, @@ -34142,8 +33704,8 @@ "binop": null, "updateContext": null }, - "start": 3331, - "end": 3332, + "start": 3299, + "end": 3300, "loc": { "start": { "line": 88, @@ -34167,8 +33729,8 @@ "postfix": false, "binop": null }, - "start": 3337, - "end": 3338, + "start": 3305, + "end": 3306, "loc": { "start": { "line": 89, @@ -34183,8 +33745,8 @@ { "type": "CommentLine", "value": " Split the occurrence ID into components, and store them in the appropriate fields.", - "start": 3344, - "end": 3429, + "start": 3312, + "end": 3397, "loc": { "start": { "line": 91, @@ -34211,8 +33773,8 @@ "updateContext": null }, "value": "const", - "start": 3434, - "end": 3439, + "start": 3402, + "end": 3407, "loc": { "start": { "line": 92, @@ -34237,8 +33799,8 @@ "binop": null }, "value": "comps", - "start": 3440, - "end": 3445, + "start": 3408, + "end": 3413, "loc": { "start": { "line": 92, @@ -34264,8 +33826,8 @@ "updateContext": null }, "value": "=", - "start": 3446, - "end": 3447, + "start": 3414, + "end": 3415, "loc": { "start": { "line": 92, @@ -34290,8 +33852,8 @@ "binop": null }, "value": "occurID", - "start": 3448, - "end": 3455, + "start": 3416, + "end": 3423, "loc": { "start": { "line": 92, @@ -34316,8 +33878,8 @@ "binop": null, "updateContext": null }, - "start": 3455, - "end": 3456, + "start": 3423, + "end": 3424, "loc": { "start": { "line": 92, @@ -34342,8 +33904,8 @@ "binop": null }, "value": "split", - "start": 3456, - "end": 3461, + "start": 3424, + "end": 3429, "loc": { "start": { "line": 92, @@ -34367,8 +33929,8 @@ "postfix": false, "binop": null }, - "start": 3461, - "end": 3462, + "start": 3429, + "end": 3430, "loc": { "start": { "line": 92, @@ -34397,8 +33959,8 @@ "pattern": ":", "flags": "" }, - "start": 3462, - "end": 3465, + "start": 3430, + "end": 3433, "loc": { "start": { "line": 92, @@ -34422,8 +33984,8 @@ "postfix": false, "binop": null }, - "start": 3465, - "end": 3466, + "start": 3433, + "end": 3434, "loc": { "start": { "line": 92, @@ -34448,8 +34010,8 @@ "binop": null, "updateContext": null }, - "start": 3466, - "end": 3467, + "start": 3434, + "end": 3435, "loc": { "start": { "line": 92, @@ -34476,8 +34038,8 @@ "updateContext": null }, "value": "if", - "start": 3472, - "end": 3474, + "start": 3440, + "end": 3442, "loc": { "start": { "line": 93, @@ -34501,8 +34063,8 @@ "postfix": false, "binop": null }, - "start": 3475, - "end": 3476, + "start": 3443, + "end": 3444, "loc": { "start": { "line": 93, @@ -34527,8 +34089,8 @@ "binop": null }, "value": "comps", - "start": 3476, - "end": 3481, + "start": 3444, + "end": 3449, "loc": { "start": { "line": 93, @@ -34553,8 +34115,8 @@ "binop": null, "updateContext": null }, - "start": 3481, - "end": 3482, + "start": 3449, + "end": 3450, "loc": { "start": { "line": 93, @@ -34579,8 +34141,8 @@ "binop": null }, "value": "length", - "start": 3482, - "end": 3488, + "start": 3450, + "end": 3456, "loc": { "start": { "line": 93, @@ -34606,8 +34168,8 @@ "updateContext": null }, "value": "===", - "start": 3489, - "end": 3492, + "start": 3457, + "end": 3460, "loc": { "start": { "line": 93, @@ -34633,8 +34195,8 @@ "updateContext": null }, "value": 1, - "start": 3493, - "end": 3494, + "start": 3461, + "end": 3462, "loc": { "start": { "line": 93, @@ -34658,8 +34220,8 @@ "postfix": false, "binop": null }, - "start": 3494, - "end": 3495, + "start": 3462, + "end": 3463, "loc": { "start": { "line": 93, @@ -34683,8 +34245,8 @@ "postfix": false, "binop": null }, - "start": 3496, - "end": 3497, + "start": 3464, + "end": 3465, "loc": { "start": { "line": 93, @@ -34699,8 +34261,8 @@ { "type": "CommentLine", "value": " specimen.institutionCode = undefined;", - "start": 3504, - "end": 3544, + "start": 3472, + "end": 3512, "loc": { "start": { "line": 94, @@ -34715,8 +34277,8 @@ { "type": "CommentLine", "value": " specimen.collectionCode = undefined;", - "start": 3551, - "end": 3590, + "start": 3519, + "end": 3558, "loc": { "start": { "line": 95, @@ -34741,8 +34303,8 @@ "binop": null, "updateContext": null }, - "start": 3597, - "end": 3598, + "start": 3565, + "end": 3566, "loc": { "start": { "line": 96, @@ -34767,8 +34329,8 @@ "binop": null }, "value": "specimen", - "start": 3598, - "end": 3606, + "start": 3566, + "end": 3574, "loc": { "start": { "line": 96, @@ -34793,8 +34355,8 @@ "binop": null, "updateContext": null }, - "start": 3606, - "end": 3607, + "start": 3574, + "end": 3575, "loc": { "start": { "line": 96, @@ -34819,8 +34381,8 @@ "binop": null }, "value": "catalogNumber", - "start": 3607, - "end": 3620, + "start": 3575, + "end": 3588, "loc": { "start": { "line": 96, @@ -34845,8 +34407,8 @@ "binop": null, "updateContext": null }, - "start": 3620, - "end": 3621, + "start": 3588, + "end": 3589, "loc": { "start": { "line": 96, @@ -34872,8 +34434,8 @@ "updateContext": null }, "value": "=", - "start": 3622, - "end": 3623, + "start": 3590, + "end": 3591, "loc": { "start": { "line": 96, @@ -34898,8 +34460,8 @@ "binop": null }, "value": "comps", - "start": 3624, - "end": 3629, + "start": 3592, + "end": 3597, "loc": { "start": { "line": 96, @@ -34924,8 +34486,8 @@ "binop": null, "updateContext": null }, - "start": 3629, - "end": 3630, + "start": 3597, + "end": 3598, "loc": { "start": { "line": 96, @@ -34949,8 +34511,8 @@ "postfix": false, "binop": null }, - "start": 3635, - "end": 3636, + "start": 3603, + "end": 3604, "loc": { "start": { "line": 97, @@ -34977,8 +34539,8 @@ "updateContext": null }, "value": "else", - "start": 3637, - "end": 3641, + "start": 3605, + "end": 3609, "loc": { "start": { "line": 97, @@ -35005,8 +34567,8 @@ "updateContext": null }, "value": "if", - "start": 3642, - "end": 3644, + "start": 3610, + "end": 3612, "loc": { "start": { "line": 97, @@ -35030,8 +34592,8 @@ "postfix": false, "binop": null }, - "start": 3645, - "end": 3646, + "start": 3613, + "end": 3614, "loc": { "start": { "line": 97, @@ -35056,8 +34618,8 @@ "binop": null }, "value": "comps", - "start": 3646, - "end": 3651, + "start": 3614, + "end": 3619, "loc": { "start": { "line": 97, @@ -35082,8 +34644,8 @@ "binop": null, "updateContext": null }, - "start": 3651, - "end": 3652, + "start": 3619, + "end": 3620, "loc": { "start": { "line": 97, @@ -35108,8 +34670,8 @@ "binop": null }, "value": "length", - "start": 3652, - "end": 3658, + "start": 3620, + "end": 3626, "loc": { "start": { "line": 97, @@ -35135,8 +34697,8 @@ "updateContext": null }, "value": "===", - "start": 3659, - "end": 3662, + "start": 3627, + "end": 3630, "loc": { "start": { "line": 97, @@ -35162,8 +34724,8 @@ "updateContext": null }, "value": 2, - "start": 3663, - "end": 3664, + "start": 3631, + "end": 3632, "loc": { "start": { "line": 97, @@ -35187,8 +34749,8 @@ "postfix": false, "binop": null }, - "start": 3664, - "end": 3665, + "start": 3632, + "end": 3633, "loc": { "start": { "line": 97, @@ -35212,8 +34774,8 @@ "postfix": false, "binop": null }, - "start": 3666, - "end": 3667, + "start": 3634, + "end": 3635, "loc": { "start": { "line": 97, @@ -35238,8 +34800,8 @@ "binop": null, "updateContext": null }, - "start": 3674, - "end": 3675, + "start": 3642, + "end": 3643, "loc": { "start": { "line": 98, @@ -35264,8 +34826,8 @@ "binop": null }, "value": "specimen", - "start": 3675, - "end": 3683, + "start": 3643, + "end": 3651, "loc": { "start": { "line": 98, @@ -35290,8 +34852,8 @@ "binop": null, "updateContext": null }, - "start": 3683, - "end": 3684, + "start": 3651, + "end": 3652, "loc": { "start": { "line": 98, @@ -35316,8 +34878,8 @@ "binop": null }, "value": "institutionCode", - "start": 3684, - "end": 3699, + "start": 3652, + "end": 3667, "loc": { "start": { "line": 98, @@ -35342,8 +34904,8 @@ "binop": null, "updateContext": null }, - "start": 3699, - "end": 3700, + "start": 3667, + "end": 3668, "loc": { "start": { "line": 98, @@ -35368,8 +34930,8 @@ "binop": null }, "value": "specimen", - "start": 3701, - "end": 3709, + "start": 3669, + "end": 3677, "loc": { "start": { "line": 98, @@ -35394,8 +34956,8 @@ "binop": null, "updateContext": null }, - "start": 3709, - "end": 3710, + "start": 3677, + "end": 3678, "loc": { "start": { "line": 98, @@ -35420,8 +34982,8 @@ "binop": null }, "value": "catalogNumber", - "start": 3710, - "end": 3723, + "start": 3678, + "end": 3691, "loc": { "start": { "line": 98, @@ -35446,8 +35008,8 @@ "binop": null, "updateContext": null }, - "start": 3723, - "end": 3724, + "start": 3691, + "end": 3692, "loc": { "start": { "line": 98, @@ -35473,8 +35035,8 @@ "updateContext": null }, "value": "=", - "start": 3725, - "end": 3726, + "start": 3693, + "end": 3694, "loc": { "start": { "line": 98, @@ -35499,8 +35061,8 @@ "binop": null }, "value": "comps", - "start": 3727, - "end": 3732, + "start": 3695, + "end": 3700, "loc": { "start": { "line": 98, @@ -35525,8 +35087,8 @@ "binop": null, "updateContext": null }, - "start": 3732, - "end": 3733, + "start": 3700, + "end": 3701, "loc": { "start": { "line": 98, @@ -35550,8 +35112,8 @@ "postfix": false, "binop": null }, - "start": 3738, - "end": 3739, + "start": 3706, + "end": 3707, "loc": { "start": { "line": 99, @@ -35578,8 +35140,8 @@ "updateContext": null }, "value": "else", - "start": 3740, - "end": 3744, + "start": 3708, + "end": 3712, "loc": { "start": { "line": 99, @@ -35606,8 +35168,8 @@ "updateContext": null }, "value": "if", - "start": 3745, - "end": 3747, + "start": 3713, + "end": 3715, "loc": { "start": { "line": 99, @@ -35631,8 +35193,8 @@ "postfix": false, "binop": null }, - "start": 3748, - "end": 3749, + "start": 3716, + "end": 3717, "loc": { "start": { "line": 99, @@ -35657,8 +35219,8 @@ "binop": null }, "value": "comps", - "start": 3749, - "end": 3754, + "start": 3717, + "end": 3722, "loc": { "start": { "line": 99, @@ -35683,8 +35245,8 @@ "binop": null, "updateContext": null }, - "start": 3754, - "end": 3755, + "start": 3722, + "end": 3723, "loc": { "start": { "line": 99, @@ -35709,8 +35271,8 @@ "binop": null }, "value": "length", - "start": 3755, - "end": 3761, + "start": 3723, + "end": 3729, "loc": { "start": { "line": 99, @@ -35736,8 +35298,8 @@ "updateContext": null }, "value": ">=", - "start": 3762, - "end": 3764, + "start": 3730, + "end": 3732, "loc": { "start": { "line": 99, @@ -35763,8 +35325,8 @@ "updateContext": null }, "value": 3, - "start": 3765, - "end": 3766, + "start": 3733, + "end": 3734, "loc": { "start": { "line": 99, @@ -35788,8 +35350,8 @@ "postfix": false, "binop": null }, - "start": 3766, - "end": 3767, + "start": 3734, + "end": 3735, "loc": { "start": { "line": 99, @@ -35813,8 +35375,8 @@ "postfix": false, "binop": null }, - "start": 3768, - "end": 3769, + "start": 3736, + "end": 3737, "loc": { "start": { "line": 99, @@ -35841,8 +35403,8 @@ "updateContext": null }, "value": "let", - "start": 3776, - "end": 3779, + "start": 3744, + "end": 3747, "loc": { "start": { "line": 100, @@ -35867,8 +35429,8 @@ "binop": null }, "value": "catalogNumValues", - "start": 3780, - "end": 3796, + "start": 3748, + "end": 3764, "loc": { "start": { "line": 100, @@ -35894,8 +35456,8 @@ "updateContext": null }, "value": "=", - "start": 3797, - "end": 3798, + "start": 3765, + "end": 3766, "loc": { "start": { "line": 100, @@ -35920,8 +35482,8 @@ "binop": null, "updateContext": null }, - "start": 3799, - "end": 3800, + "start": 3767, + "end": 3768, "loc": { "start": { "line": 100, @@ -35946,8 +35508,8 @@ "binop": null, "updateContext": null }, - "start": 3800, - "end": 3801, + "start": 3768, + "end": 3769, "loc": { "start": { "line": 100, @@ -35972,8 +35534,8 @@ "binop": null, "updateContext": null }, - "start": 3801, - "end": 3802, + "start": 3769, + "end": 3770, "loc": { "start": { "line": 100, @@ -35988,8 +35550,8 @@ { "type": "CommentLine", "value": " Store all split catalog number values.", - "start": 3803, - "end": 3844, + "start": 3771, + "end": 3812, "loc": { "start": { "line": 100, @@ -36014,8 +35576,8 @@ "binop": null, "updateContext": null }, - "start": 3851, - "end": 3852, + "start": 3819, + "end": 3820, "loc": { "start": { "line": 101, @@ -36040,8 +35602,8 @@ "binop": null }, "value": "specimen", - "start": 3852, - "end": 3860, + "start": 3820, + "end": 3828, "loc": { "start": { "line": 101, @@ -36066,8 +35628,8 @@ "binop": null, "updateContext": null }, - "start": 3860, - "end": 3861, + "start": 3828, + "end": 3829, "loc": { "start": { "line": 101, @@ -36092,8 +35654,8 @@ "binop": null }, "value": "institutionCode", - "start": 3861, - "end": 3876, + "start": 3829, + "end": 3844, "loc": { "start": { "line": 101, @@ -36118,8 +35680,8 @@ "binop": null, "updateContext": null }, - "start": 3876, - "end": 3877, + "start": 3844, + "end": 3845, "loc": { "start": { "line": 101, @@ -36144,8 +35706,8 @@ "binop": null }, "value": "specimen", - "start": 3878, - "end": 3886, + "start": 3846, + "end": 3854, "loc": { "start": { "line": 101, @@ -36170,8 +35732,8 @@ "binop": null, "updateContext": null }, - "start": 3886, - "end": 3887, + "start": 3854, + "end": 3855, "loc": { "start": { "line": 101, @@ -36196,8 +35758,8 @@ "binop": null }, "value": "collectionCode", - "start": 3887, - "end": 3901, + "start": 3855, + "end": 3869, "loc": { "start": { "line": 101, @@ -36222,8 +35784,8 @@ "binop": null, "updateContext": null }, - "start": 3901, - "end": 3902, + "start": 3869, + "end": 3870, "loc": { "start": { "line": 101, @@ -36248,8 +35810,8 @@ "binop": null, "updateContext": null }, - "start": 3903, - "end": 3906, + "start": 3871, + "end": 3874, "loc": { "start": { "line": 101, @@ -36274,8 +35836,8 @@ "binop": null }, "value": "catalogNumValues", - "start": 3906, - "end": 3922, + "start": 3874, + "end": 3890, "loc": { "start": { "line": 101, @@ -36300,8 +35862,8 @@ "binop": null, "updateContext": null }, - "start": 3922, - "end": 3923, + "start": 3890, + "end": 3891, "loc": { "start": { "line": 101, @@ -36327,8 +35889,8 @@ "updateContext": null }, "value": "=", - "start": 3924, - "end": 3925, + "start": 3892, + "end": 3893, "loc": { "start": { "line": 101, @@ -36353,8 +35915,8 @@ "binop": null }, "value": "comps", - "start": 3926, - "end": 3931, + "start": 3894, + "end": 3899, "loc": { "start": { "line": 101, @@ -36379,8 +35941,8 @@ "binop": null, "updateContext": null }, - "start": 3931, - "end": 3932, + "start": 3899, + "end": 3900, "loc": { "start": { "line": 101, @@ -36405,8 +35967,8 @@ "binop": null }, "value": "specimen", - "start": 3939, - "end": 3947, + "start": 3907, + "end": 3915, "loc": { "start": { "line": 102, @@ -36431,8 +35993,8 @@ "binop": null, "updateContext": null }, - "start": 3947, - "end": 3948, + "start": 3915, + "end": 3916, "loc": { "start": { "line": 102, @@ -36457,8 +36019,8 @@ "binop": null }, "value": "catalogNumber", - "start": 3948, - "end": 3961, + "start": 3916, + "end": 3929, "loc": { "start": { "line": 102, @@ -36484,8 +36046,8 @@ "updateContext": null }, "value": "=", - "start": 3962, - "end": 3963, + "start": 3930, + "end": 3931, "loc": { "start": { "line": 102, @@ -36510,8 +36072,8 @@ "binop": null }, "value": "catalogNumValues", - "start": 3964, - "end": 3980, + "start": 3932, + "end": 3948, "loc": { "start": { "line": 102, @@ -36536,8 +36098,8 @@ "binop": null, "updateContext": null }, - "start": 3980, - "end": 3981, + "start": 3948, + "end": 3949, "loc": { "start": { "line": 102, @@ -36562,8 +36124,8 @@ "binop": null }, "value": "join", - "start": 3981, - "end": 3985, + "start": 3949, + "end": 3953, "loc": { "start": { "line": 102, @@ -36587,8 +36149,8 @@ "postfix": false, "binop": null }, - "start": 3985, - "end": 3986, + "start": 3953, + "end": 3954, "loc": { "start": { "line": 102, @@ -36614,8 +36176,8 @@ "updateContext": null }, "value": ":", - "start": 3986, - "end": 3989, + "start": 3954, + "end": 3957, "loc": { "start": { "line": 102, @@ -36639,8 +36201,8 @@ "postfix": false, "binop": null }, - "start": 3989, - "end": 3990, + "start": 3957, + "end": 3958, "loc": { "start": { "line": 102, @@ -36665,8 +36227,8 @@ "binop": null, "updateContext": null }, - "start": 3990, - "end": 3991, + "start": 3958, + "end": 3959, "loc": { "start": { "line": 102, @@ -36690,8 +36252,8 @@ "postfix": false, "binop": null }, - "start": 3996, - "end": 3997, + "start": 3964, + "end": 3965, "loc": { "start": { "line": 103, @@ -36716,8 +36278,8 @@ "binop": null }, "value": "PhyxCacheManager", - "start": 4003, - "end": 4019, + "start": 3971, + "end": 3987, "loc": { "start": { "line": 105, @@ -36742,8 +36304,8 @@ "binop": null, "updateContext": null }, - "start": 4019, - "end": 4020, + "start": 3987, + "end": 3988, "loc": { "start": { "line": 105, @@ -36768,8 +36330,8 @@ "binop": null }, "value": "put", - "start": 4020, - "end": 4023, + "start": 3988, + "end": 3991, "loc": { "start": { "line": 105, @@ -36793,8 +36355,8 @@ "postfix": false, "binop": null }, - "start": 4023, - "end": 4024, + "start": 3991, + "end": 3992, "loc": { "start": { "line": 105, @@ -36820,8 +36382,8 @@ "updateContext": null }, "value": "SpecimenWrapper.occurrenceIDCache", - "start": 4024, - "end": 4059, + "start": 3992, + "end": 4027, "loc": { "start": { "line": 105, @@ -36846,8 +36408,8 @@ "binop": null, "updateContext": null }, - "start": 4059, - "end": 4060, + "start": 4027, + "end": 4028, "loc": { "start": { "line": 105, @@ -36872,8 +36434,8 @@ "binop": null }, "value": "occurID", - "start": 4061, - "end": 4068, + "start": 4029, + "end": 4036, "loc": { "start": { "line": 105, @@ -36898,8 +36460,8 @@ "binop": null, "updateContext": null }, - "start": 4068, - "end": 4069, + "start": 4036, + "end": 4037, "loc": { "start": { "line": 105, @@ -36924,8 +36486,8 @@ "binop": null }, "value": "specimen", - "start": 4070, - "end": 4078, + "start": 4038, + "end": 4046, "loc": { "start": { "line": 105, @@ -36949,8 +36511,8 @@ "postfix": false, "binop": null }, - "start": 4078, - "end": 4079, + "start": 4046, + "end": 4047, "loc": { "start": { "line": 105, @@ -36975,8 +36537,8 @@ "binop": null, "updateContext": null }, - "start": 4079, - "end": 4080, + "start": 4047, + "end": 4048, "loc": { "start": { "line": 105, @@ -37003,8 +36565,8 @@ "updateContext": null }, "value": "return", - "start": 4085, - "end": 4091, + "start": 4053, + "end": 4059, "loc": { "start": { "line": 106, @@ -37029,8 +36591,8 @@ "binop": null }, "value": "specimen", - "start": 4092, - "end": 4100, + "start": 4060, + "end": 4068, "loc": { "start": { "line": 106, @@ -37055,8 +36617,8 @@ "binop": null, "updateContext": null }, - "start": 4100, - "end": 4101, + "start": 4068, + "end": 4069, "loc": { "start": { "line": 106, @@ -37080,8 +36642,8 @@ "postfix": false, "binop": null }, - "start": 4104, - "end": 4105, + "start": 4072, + "end": 4073, "loc": { "start": { "line": 107, @@ -37096,8 +36658,8 @@ { "type": "CommentBlock", "value": "*\n * Get the catalogNumber if present.\n ", - "start": 4109, - "end": 4157, + "start": 4077, + "end": 4125, "loc": { "start": { "line": 109, @@ -37122,8 +36684,8 @@ "binop": null }, "value": "get", - "start": 4160, - "end": 4163, + "start": 4128, + "end": 4131, "loc": { "start": { "line": 112, @@ -37148,8 +36710,8 @@ "binop": null }, "value": "catalogNumber", - "start": 4164, - "end": 4177, + "start": 4132, + "end": 4145, "loc": { "start": { "line": 112, @@ -37173,8 +36735,8 @@ "postfix": false, "binop": null }, - "start": 4177, - "end": 4178, + "start": 4145, + "end": 4146, "loc": { "start": { "line": 112, @@ -37198,8 +36760,8 @@ "postfix": false, "binop": null }, - "start": 4178, - "end": 4179, + "start": 4146, + "end": 4147, "loc": { "start": { "line": 112, @@ -37223,8 +36785,8 @@ "postfix": false, "binop": null }, - "start": 4180, - "end": 4181, + "start": 4148, + "end": 4149, "loc": { "start": { "line": 112, @@ -37239,8 +36801,8 @@ { "type": "CommentLine", "value": " Get the catalog number from the specimen object if present.", - "start": 4186, - "end": 4248, + "start": 4154, + "end": 4216, "loc": { "start": { "line": 113, @@ -37267,8 +36829,8 @@ "updateContext": null }, "value": "if", - "start": 4253, - "end": 4255, + "start": 4221, + "end": 4223, "loc": { "start": { "line": 114, @@ -37292,8 +36854,8 @@ "postfix": false, "binop": null }, - "start": 4256, - "end": 4257, + "start": 4224, + "end": 4225, "loc": { "start": { "line": 114, @@ -37318,8 +36880,8 @@ "binop": null }, "value": "has", - "start": 4257, - "end": 4260, + "start": 4225, + "end": 4228, "loc": { "start": { "line": 114, @@ -37343,8 +36905,8 @@ "postfix": false, "binop": null }, - "start": 4260, - "end": 4261, + "start": 4228, + "end": 4229, "loc": { "start": { "line": 114, @@ -37371,8 +36933,8 @@ "updateContext": null }, "value": "this", - "start": 4261, - "end": 4265, + "start": 4229, + "end": 4233, "loc": { "start": { "line": 114, @@ -37397,8 +36959,8 @@ "binop": null, "updateContext": null }, - "start": 4265, - "end": 4266, + "start": 4233, + "end": 4234, "loc": { "start": { "line": 114, @@ -37423,8 +36985,8 @@ "binop": null }, "value": "specimen", - "start": 4266, - "end": 4274, + "start": 4234, + "end": 4242, "loc": { "start": { "line": 114, @@ -37449,8 +37011,8 @@ "binop": null, "updateContext": null }, - "start": 4274, - "end": 4275, + "start": 4242, + "end": 4243, "loc": { "start": { "line": 114, @@ -37476,8 +37038,8 @@ "updateContext": null }, "value": "catalogNumber", - "start": 4276, - "end": 4291, + "start": 4244, + "end": 4259, "loc": { "start": { "line": 114, @@ -37501,8 +37063,8 @@ "postfix": false, "binop": null }, - "start": 4291, - "end": 4292, + "start": 4259, + "end": 4260, "loc": { "start": { "line": 114, @@ -37526,8 +37088,8 @@ "postfix": false, "binop": null }, - "start": 4292, - "end": 4293, + "start": 4260, + "end": 4261, "loc": { "start": { "line": 114, @@ -37554,8 +37116,8 @@ "updateContext": null }, "value": "return", - "start": 4294, - "end": 4300, + "start": 4262, + "end": 4268, "loc": { "start": { "line": 114, @@ -37582,8 +37144,8 @@ "updateContext": null }, "value": "this", - "start": 4301, - "end": 4305, + "start": 4269, + "end": 4273, "loc": { "start": { "line": 114, @@ -37608,8 +37170,8 @@ "binop": null, "updateContext": null }, - "start": 4305, - "end": 4306, + "start": 4273, + "end": 4274, "loc": { "start": { "line": 114, @@ -37634,8 +37196,8 @@ "binop": null }, "value": "specimen", - "start": 4306, - "end": 4314, + "start": 4274, + "end": 4282, "loc": { "start": { "line": 114, @@ -37660,8 +37222,8 @@ "binop": null, "updateContext": null }, - "start": 4314, - "end": 4315, + "start": 4282, + "end": 4283, "loc": { "start": { "line": 114, @@ -37686,8 +37248,8 @@ "binop": null }, "value": "catalogNumber", - "start": 4315, - "end": 4328, + "start": 4283, + "end": 4296, "loc": { "start": { "line": 114, @@ -37712,8 +37274,8 @@ "binop": null, "updateContext": null }, - "start": 4328, - "end": 4329, + "start": 4296, + "end": 4297, "loc": { "start": { "line": 114, @@ -37728,8 +37290,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract a", - "start": 4335, - "end": 4406, + "start": 4303, + "end": 4374, "loc": { "start": { "line": 116, @@ -37744,8 +37306,8 @@ { "type": "CommentLine", "value": " catalogNumber from there.", - "start": 4411, - "end": 4439, + "start": 4379, + "end": 4407, "loc": { "start": { "line": 117, @@ -37772,8 +37334,8 @@ "updateContext": null }, "value": "if", - "start": 4444, - "end": 4446, + "start": 4412, + "end": 4414, "loc": { "start": { "line": 118, @@ -37797,8 +37359,8 @@ "postfix": false, "binop": null }, - "start": 4447, - "end": 4448, + "start": 4415, + "end": 4416, "loc": { "start": { "line": 118, @@ -37823,8 +37385,8 @@ "binop": null }, "value": "has", - "start": 4448, - "end": 4451, + "start": 4416, + "end": 4419, "loc": { "start": { "line": 118, @@ -37848,8 +37410,8 @@ "postfix": false, "binop": null }, - "start": 4451, - "end": 4452, + "start": 4419, + "end": 4420, "loc": { "start": { "line": 118, @@ -37876,8 +37438,8 @@ "updateContext": null }, "value": "this", - "start": 4452, - "end": 4456, + "start": 4420, + "end": 4424, "loc": { "start": { "line": 118, @@ -37902,8 +37464,8 @@ "binop": null, "updateContext": null }, - "start": 4456, - "end": 4457, + "start": 4424, + "end": 4425, "loc": { "start": { "line": 118, @@ -37928,8 +37490,8 @@ "binop": null }, "value": "specimen", - "start": 4457, - "end": 4465, + "start": 4425, + "end": 4433, "loc": { "start": { "line": 118, @@ -37954,8 +37516,8 @@ "binop": null, "updateContext": null }, - "start": 4465, - "end": 4466, + "start": 4433, + "end": 4434, "loc": { "start": { "line": 118, @@ -37981,8 +37543,8 @@ "updateContext": null }, "value": "occurrenceID", - "start": 4467, - "end": 4481, + "start": 4435, + "end": 4449, "loc": { "start": { "line": 118, @@ -38006,8 +37568,8 @@ "postfix": false, "binop": null }, - "start": 4481, - "end": 4482, + "start": 4449, + "end": 4450, "loc": { "start": { "line": 118, @@ -38031,8 +37593,8 @@ "postfix": false, "binop": null }, - "start": 4482, - "end": 4483, + "start": 4450, + "end": 4451, "loc": { "start": { "line": 118, @@ -38056,8 +37618,8 @@ "postfix": false, "binop": null }, - "start": 4484, - "end": 4485, + "start": 4452, + "end": 4453, "loc": { "start": { "line": 118, @@ -38084,8 +37646,8 @@ "updateContext": null }, "value": "const", - "start": 4492, - "end": 4497, + "start": 4460, + "end": 4465, "loc": { "start": { "line": 119, @@ -38110,8 +37672,8 @@ "binop": null }, "value": "specimen", - "start": 4498, - "end": 4506, + "start": 4466, + "end": 4474, "loc": { "start": { "line": 119, @@ -38137,8 +37699,8 @@ "updateContext": null }, "value": "=", - "start": 4507, - "end": 4508, + "start": 4475, + "end": 4476, "loc": { "start": { "line": 119, @@ -38163,8 +37725,8 @@ "binop": null }, "value": "SpecimenWrapper", - "start": 4509, - "end": 4524, + "start": 4477, + "end": 4492, "loc": { "start": { "line": 119, @@ -38189,8 +37751,8 @@ "binop": null, "updateContext": null }, - "start": 4524, - "end": 4525, + "start": 4492, + "end": 4493, "loc": { "start": { "line": 119, @@ -38215,8 +37777,8 @@ "binop": null }, "value": "fromOccurrenceID", - "start": 4525, - "end": 4541, + "start": 4493, + "end": 4509, "loc": { "start": { "line": 119, @@ -38240,8 +37802,8 @@ "postfix": false, "binop": null }, - "start": 4541, - "end": 4542, + "start": 4509, + "end": 4510, "loc": { "start": { "line": 119, @@ -38268,8 +37830,8 @@ "updateContext": null }, "value": "this", - "start": 4542, - "end": 4546, + "start": 4510, + "end": 4514, "loc": { "start": { "line": 119, @@ -38294,8 +37856,8 @@ "binop": null, "updateContext": null }, - "start": 4546, - "end": 4547, + "start": 4514, + "end": 4515, "loc": { "start": { "line": 119, @@ -38320,8 +37882,8 @@ "binop": null }, "value": "specimen", - "start": 4547, - "end": 4555, + "start": 4515, + "end": 4523, "loc": { "start": { "line": 119, @@ -38346,8 +37908,8 @@ "binop": null, "updateContext": null }, - "start": 4555, - "end": 4556, + "start": 4523, + "end": 4524, "loc": { "start": { "line": 119, @@ -38372,8 +37934,8 @@ "binop": null }, "value": "occurrenceID", - "start": 4556, - "end": 4568, + "start": 4524, + "end": 4536, "loc": { "start": { "line": 119, @@ -38397,8 +37959,8 @@ "postfix": false, "binop": null }, - "start": 4568, - "end": 4569, + "start": 4536, + "end": 4537, "loc": { "start": { "line": 119, @@ -38423,8 +37985,8 @@ "binop": null, "updateContext": null }, - "start": 4569, - "end": 4570, + "start": 4537, + "end": 4538, "loc": { "start": { "line": 119, @@ -38451,8 +38013,8 @@ "updateContext": null }, "value": "if", - "start": 4577, - "end": 4579, + "start": 4545, + "end": 4547, "loc": { "start": { "line": 120, @@ -38476,8 +38038,8 @@ "postfix": false, "binop": null }, - "start": 4580, - "end": 4581, + "start": 4548, + "end": 4549, "loc": { "start": { "line": 120, @@ -38502,8 +38064,8 @@ "binop": null }, "value": "has", - "start": 4581, - "end": 4584, + "start": 4549, + "end": 4552, "loc": { "start": { "line": 120, @@ -38527,8 +38089,8 @@ "postfix": false, "binop": null }, - "start": 4584, - "end": 4585, + "start": 4552, + "end": 4553, "loc": { "start": { "line": 120, @@ -38553,8 +38115,8 @@ "binop": null }, "value": "specimen", - "start": 4585, - "end": 4593, + "start": 4553, + "end": 4561, "loc": { "start": { "line": 120, @@ -38579,8 +38141,8 @@ "binop": null, "updateContext": null }, - "start": 4593, - "end": 4594, + "start": 4561, + "end": 4562, "loc": { "start": { "line": 120, @@ -38606,8 +38168,8 @@ "updateContext": null }, "value": "catalogNumber", - "start": 4595, - "end": 4610, + "start": 4563, + "end": 4578, "loc": { "start": { "line": 120, @@ -38631,8 +38193,8 @@ "postfix": false, "binop": null }, - "start": 4610, - "end": 4611, + "start": 4578, + "end": 4579, "loc": { "start": { "line": 120, @@ -38656,8 +38218,8 @@ "postfix": false, "binop": null }, - "start": 4611, - "end": 4612, + "start": 4579, + "end": 4580, "loc": { "start": { "line": 120, @@ -38684,8 +38246,8 @@ "updateContext": null }, "value": "return", - "start": 4613, - "end": 4619, + "start": 4581, + "end": 4587, "loc": { "start": { "line": 120, @@ -38710,8 +38272,8 @@ "binop": null }, "value": "specimen", - "start": 4620, - "end": 4628, + "start": 4588, + "end": 4596, "loc": { "start": { "line": 120, @@ -38736,8 +38298,8 @@ "binop": null, "updateContext": null }, - "start": 4628, - "end": 4629, + "start": 4596, + "end": 4597, "loc": { "start": { "line": 120, @@ -38762,8 +38324,8 @@ "binop": null }, "value": "catalogNumber", - "start": 4629, - "end": 4642, + "start": 4597, + "end": 4610, "loc": { "start": { "line": 120, @@ -38788,8 +38350,8 @@ "binop": null, "updateContext": null }, - "start": 4642, - "end": 4643, + "start": 4610, + "end": 4611, "loc": { "start": { "line": 120, @@ -38813,8 +38375,8 @@ "postfix": false, "binop": null }, - "start": 4648, - "end": 4649, + "start": 4616, + "end": 4617, "loc": { "start": { "line": 121, @@ -38841,8 +38403,8 @@ "updateContext": null }, "value": "return", - "start": 4654, - "end": 4660, + "start": 4622, + "end": 4628, "loc": { "start": { "line": 122, @@ -38867,8 +38429,8 @@ "binop": null }, "value": "undefined", - "start": 4661, - "end": 4670, + "start": 4629, + "end": 4638, "loc": { "start": { "line": 122, @@ -38893,8 +38455,8 @@ "binop": null, "updateContext": null }, - "start": 4670, - "end": 4671, + "start": 4638, + "end": 4639, "loc": { "start": { "line": 122, @@ -38918,8 +38480,8 @@ "postfix": false, "binop": null }, - "start": 4674, - "end": 4675, + "start": 4642, + "end": 4643, "loc": { "start": { "line": 123, @@ -38934,8 +38496,8 @@ { "type": "CommentBlock", "value": "*\n * Get the institutionCode if present.\n ", - "start": 4679, - "end": 4729, + "start": 4647, + "end": 4697, "loc": { "start": { "line": 125, @@ -38960,8 +38522,8 @@ "binop": null }, "value": "get", - "start": 4732, - "end": 4735, + "start": 4700, + "end": 4703, "loc": { "start": { "line": 128, @@ -38986,8 +38548,8 @@ "binop": null }, "value": "institutionCode", - "start": 4736, - "end": 4751, + "start": 4704, + "end": 4719, "loc": { "start": { "line": 128, @@ -39011,8 +38573,8 @@ "postfix": false, "binop": null }, - "start": 4751, - "end": 4752, + "start": 4719, + "end": 4720, "loc": { "start": { "line": 128, @@ -39036,8 +38598,8 @@ "postfix": false, "binop": null }, - "start": 4752, - "end": 4753, + "start": 4720, + "end": 4721, "loc": { "start": { "line": 128, @@ -39061,8 +38623,8 @@ "postfix": false, "binop": null }, - "start": 4754, - "end": 4755, + "start": 4722, + "end": 4723, "loc": { "start": { "line": 128, @@ -39077,8 +38639,8 @@ { "type": "CommentLine", "value": " Get the institution code from the specimen object if present.", - "start": 4760, - "end": 4824, + "start": 4728, + "end": 4792, "loc": { "start": { "line": 129, @@ -39105,8 +38667,8 @@ "updateContext": null }, "value": "if", - "start": 4829, - "end": 4831, + "start": 4797, + "end": 4799, "loc": { "start": { "line": 130, @@ -39130,8 +38692,8 @@ "postfix": false, "binop": null }, - "start": 4832, - "end": 4833, + "start": 4800, + "end": 4801, "loc": { "start": { "line": 130, @@ -39156,8 +38718,8 @@ "binop": null }, "value": "has", - "start": 4833, - "end": 4836, + "start": 4801, + "end": 4804, "loc": { "start": { "line": 130, @@ -39181,8 +38743,8 @@ "postfix": false, "binop": null }, - "start": 4836, - "end": 4837, + "start": 4804, + "end": 4805, "loc": { "start": { "line": 130, @@ -39209,8 +38771,8 @@ "updateContext": null }, "value": "this", - "start": 4837, - "end": 4841, + "start": 4805, + "end": 4809, "loc": { "start": { "line": 130, @@ -39235,8 +38797,8 @@ "binop": null, "updateContext": null }, - "start": 4841, - "end": 4842, + "start": 4809, + "end": 4810, "loc": { "start": { "line": 130, @@ -39261,8 +38823,8 @@ "binop": null }, "value": "specimen", - "start": 4842, - "end": 4850, + "start": 4810, + "end": 4818, "loc": { "start": { "line": 130, @@ -39287,8 +38849,8 @@ "binop": null, "updateContext": null }, - "start": 4850, - "end": 4851, + "start": 4818, + "end": 4819, "loc": { "start": { "line": 130, @@ -39314,8 +38876,8 @@ "updateContext": null }, "value": "institutionCode", - "start": 4852, - "end": 4869, + "start": 4820, + "end": 4837, "loc": { "start": { "line": 130, @@ -39339,8 +38901,8 @@ "postfix": false, "binop": null }, - "start": 4869, - "end": 4870, + "start": 4837, + "end": 4838, "loc": { "start": { "line": 130, @@ -39364,8 +38926,8 @@ "postfix": false, "binop": null }, - "start": 4870, - "end": 4871, + "start": 4838, + "end": 4839, "loc": { "start": { "line": 130, @@ -39392,8 +38954,8 @@ "updateContext": null }, "value": "return", - "start": 4872, - "end": 4878, + "start": 4840, + "end": 4846, "loc": { "start": { "line": 130, @@ -39420,8 +38982,8 @@ "updateContext": null }, "value": "this", - "start": 4879, - "end": 4883, + "start": 4847, + "end": 4851, "loc": { "start": { "line": 130, @@ -39446,8 +39008,8 @@ "binop": null, "updateContext": null }, - "start": 4883, - "end": 4884, + "start": 4851, + "end": 4852, "loc": { "start": { "line": 130, @@ -39472,8 +39034,8 @@ "binop": null }, "value": "specimen", - "start": 4884, - "end": 4892, + "start": 4852, + "end": 4860, "loc": { "start": { "line": 130, @@ -39498,8 +39060,8 @@ "binop": null, "updateContext": null }, - "start": 4892, - "end": 4893, + "start": 4860, + "end": 4861, "loc": { "start": { "line": 130, @@ -39524,8 +39086,8 @@ "binop": null }, "value": "institutionCode", - "start": 4893, - "end": 4908, + "start": 4861, + "end": 4876, "loc": { "start": { "line": 130, @@ -39550,8 +39112,8 @@ "binop": null, "updateContext": null }, - "start": 4908, - "end": 4909, + "start": 4876, + "end": 4877, "loc": { "start": { "line": 130, @@ -39566,8 +39128,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 4915, - "end": 4987, + "start": 4883, + "end": 4955, "loc": { "start": { "line": 132, @@ -39582,8 +39144,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 4992, - "end": 5019, + "start": 4960, + "end": 4987, "loc": { "start": { "line": 133, @@ -39610,8 +39172,8 @@ "updateContext": null }, "value": "if", - "start": 5024, - "end": 5026, + "start": 4992, + "end": 4994, "loc": { "start": { "line": 134, @@ -39635,8 +39197,8 @@ "postfix": false, "binop": null }, - "start": 5027, - "end": 5028, + "start": 4995, + "end": 4996, "loc": { "start": { "line": 134, @@ -39661,8 +39223,8 @@ "binop": null }, "value": "has", - "start": 5028, - "end": 5031, + "start": 4996, + "end": 4999, "loc": { "start": { "line": 134, @@ -39686,8 +39248,8 @@ "postfix": false, "binop": null }, - "start": 5031, - "end": 5032, + "start": 4999, + "end": 5000, "loc": { "start": { "line": 134, @@ -39714,8 +39276,8 @@ "updateContext": null }, "value": "this", - "start": 5032, - "end": 5036, + "start": 5000, + "end": 5004, "loc": { "start": { "line": 134, @@ -39740,8 +39302,8 @@ "binop": null, "updateContext": null }, - "start": 5036, - "end": 5037, + "start": 5004, + "end": 5005, "loc": { "start": { "line": 134, @@ -39766,8 +39328,8 @@ "binop": null }, "value": "specimen", - "start": 5037, - "end": 5045, + "start": 5005, + "end": 5013, "loc": { "start": { "line": 134, @@ -39792,8 +39354,8 @@ "binop": null, "updateContext": null }, - "start": 5045, - "end": 5046, + "start": 5013, + "end": 5014, "loc": { "start": { "line": 134, @@ -39819,8 +39381,8 @@ "updateContext": null }, "value": "occurrenceID", - "start": 5047, - "end": 5061, + "start": 5015, + "end": 5029, "loc": { "start": { "line": 134, @@ -39844,8 +39406,8 @@ "postfix": false, "binop": null }, - "start": 5061, - "end": 5062, + "start": 5029, + "end": 5030, "loc": { "start": { "line": 134, @@ -39869,8 +39431,8 @@ "postfix": false, "binop": null }, - "start": 5062, - "end": 5063, + "start": 5030, + "end": 5031, "loc": { "start": { "line": 134, @@ -39894,8 +39456,8 @@ "postfix": false, "binop": null }, - "start": 5064, - "end": 5065, + "start": 5032, + "end": 5033, "loc": { "start": { "line": 134, @@ -39922,8 +39484,8 @@ "updateContext": null }, "value": "const", - "start": 5072, - "end": 5077, + "start": 5040, + "end": 5045, "loc": { "start": { "line": 135, @@ -39948,8 +39510,8 @@ "binop": null }, "value": "specimen", - "start": 5078, - "end": 5086, + "start": 5046, + "end": 5054, "loc": { "start": { "line": 135, @@ -39975,8 +39537,8 @@ "updateContext": null }, "value": "=", - "start": 5087, - "end": 5088, + "start": 5055, + "end": 5056, "loc": { "start": { "line": 135, @@ -40001,8 +39563,8 @@ "binop": null }, "value": "SpecimenWrapper", - "start": 5089, - "end": 5104, + "start": 5057, + "end": 5072, "loc": { "start": { "line": 135, @@ -40027,8 +39589,8 @@ "binop": null, "updateContext": null }, - "start": 5104, - "end": 5105, + "start": 5072, + "end": 5073, "loc": { "start": { "line": 135, @@ -40053,8 +39615,8 @@ "binop": null }, "value": "fromOccurrenceID", - "start": 5105, - "end": 5121, + "start": 5073, + "end": 5089, "loc": { "start": { "line": 135, @@ -40078,8 +39640,8 @@ "postfix": false, "binop": null }, - "start": 5121, - "end": 5122, + "start": 5089, + "end": 5090, "loc": { "start": { "line": 135, @@ -40106,8 +39668,8 @@ "updateContext": null }, "value": "this", - "start": 5122, - "end": 5126, + "start": 5090, + "end": 5094, "loc": { "start": { "line": 135, @@ -40132,8 +39694,8 @@ "binop": null, "updateContext": null }, - "start": 5126, - "end": 5127, + "start": 5094, + "end": 5095, "loc": { "start": { "line": 135, @@ -40158,8 +39720,8 @@ "binop": null }, "value": "specimen", - "start": 5127, - "end": 5135, + "start": 5095, + "end": 5103, "loc": { "start": { "line": 135, @@ -40184,8 +39746,8 @@ "binop": null, "updateContext": null }, - "start": 5135, - "end": 5136, + "start": 5103, + "end": 5104, "loc": { "start": { "line": 135, @@ -40210,8 +39772,8 @@ "binop": null }, "value": "occurrenceID", - "start": 5136, - "end": 5148, + "start": 5104, + "end": 5116, "loc": { "start": { "line": 135, @@ -40235,8 +39797,8 @@ "postfix": false, "binop": null }, - "start": 5148, - "end": 5149, + "start": 5116, + "end": 5117, "loc": { "start": { "line": 135, @@ -40261,8 +39823,8 @@ "binop": null, "updateContext": null }, - "start": 5149, - "end": 5150, + "start": 5117, + "end": 5118, "loc": { "start": { "line": 135, @@ -40289,8 +39851,8 @@ "updateContext": null }, "value": "if", - "start": 5157, - "end": 5159, + "start": 5125, + "end": 5127, "loc": { "start": { "line": 136, @@ -40314,8 +39876,8 @@ "postfix": false, "binop": null }, - "start": 5160, - "end": 5161, + "start": 5128, + "end": 5129, "loc": { "start": { "line": 136, @@ -40340,8 +39902,8 @@ "binop": null }, "value": "has", - "start": 5161, - "end": 5164, + "start": 5129, + "end": 5132, "loc": { "start": { "line": 136, @@ -40365,8 +39927,8 @@ "postfix": false, "binop": null }, - "start": 5164, - "end": 5165, + "start": 5132, + "end": 5133, "loc": { "start": { "line": 136, @@ -40391,8 +39953,8 @@ "binop": null }, "value": "specimen", - "start": 5165, - "end": 5173, + "start": 5133, + "end": 5141, "loc": { "start": { "line": 136, @@ -40417,8 +39979,8 @@ "binop": null, "updateContext": null }, - "start": 5173, - "end": 5174, + "start": 5141, + "end": 5142, "loc": { "start": { "line": 136, @@ -40444,8 +40006,8 @@ "updateContext": null }, "value": "institutionCode", - "start": 5175, - "end": 5192, + "start": 5143, + "end": 5160, "loc": { "start": { "line": 136, @@ -40469,8 +40031,8 @@ "postfix": false, "binop": null }, - "start": 5192, - "end": 5193, + "start": 5160, + "end": 5161, "loc": { "start": { "line": 136, @@ -40494,8 +40056,8 @@ "postfix": false, "binop": null }, - "start": 5193, - "end": 5194, + "start": 5161, + "end": 5162, "loc": { "start": { "line": 136, @@ -40522,8 +40084,8 @@ "updateContext": null }, "value": "return", - "start": 5195, - "end": 5201, + "start": 5163, + "end": 5169, "loc": { "start": { "line": 136, @@ -40548,8 +40110,8 @@ "binop": null }, "value": "specimen", - "start": 5202, - "end": 5210, + "start": 5170, + "end": 5178, "loc": { "start": { "line": 136, @@ -40574,8 +40136,8 @@ "binop": null, "updateContext": null }, - "start": 5210, - "end": 5211, + "start": 5178, + "end": 5179, "loc": { "start": { "line": 136, @@ -40600,8 +40162,8 @@ "binop": null }, "value": "institutionCode", - "start": 5211, - "end": 5226, + "start": 5179, + "end": 5194, "loc": { "start": { "line": 136, @@ -40626,8 +40188,8 @@ "binop": null, "updateContext": null }, - "start": 5226, - "end": 5227, + "start": 5194, + "end": 5195, "loc": { "start": { "line": 136, @@ -40651,8 +40213,8 @@ "postfix": false, "binop": null }, - "start": 5232, - "end": 5233, + "start": 5200, + "end": 5201, "loc": { "start": { "line": 137, @@ -40679,8 +40241,8 @@ "updateContext": null }, "value": "return", - "start": 5238, - "end": 5244, + "start": 5206, + "end": 5212, "loc": { "start": { "line": 138, @@ -40705,8 +40267,8 @@ "binop": null }, "value": "undefined", - "start": 5245, - "end": 5254, + "start": 5213, + "end": 5222, "loc": { "start": { "line": 138, @@ -40731,8 +40293,8 @@ "binop": null, "updateContext": null }, - "start": 5254, - "end": 5255, + "start": 5222, + "end": 5223, "loc": { "start": { "line": 138, @@ -40756,8 +40318,8 @@ "postfix": false, "binop": null }, - "start": 5258, - "end": 5259, + "start": 5226, + "end": 5227, "loc": { "start": { "line": 139, @@ -40772,8 +40334,8 @@ { "type": "CommentBlock", "value": "*\n * Get the collectionCode if present.\n ", - "start": 5263, - "end": 5312, + "start": 5231, + "end": 5280, "loc": { "start": { "line": 141, @@ -40798,8 +40360,8 @@ "binop": null }, "value": "get", - "start": 5315, - "end": 5318, + "start": 5283, + "end": 5286, "loc": { "start": { "line": 144, @@ -40824,8 +40386,8 @@ "binop": null }, "value": "collectionCode", - "start": 5319, - "end": 5333, + "start": 5287, + "end": 5301, "loc": { "start": { "line": 144, @@ -40849,8 +40411,8 @@ "postfix": false, "binop": null }, - "start": 5333, - "end": 5334, + "start": 5301, + "end": 5302, "loc": { "start": { "line": 144, @@ -40874,8 +40436,8 @@ "postfix": false, "binop": null }, - "start": 5334, - "end": 5335, + "start": 5302, + "end": 5303, "loc": { "start": { "line": 144, @@ -40899,8 +40461,8 @@ "postfix": false, "binop": null }, - "start": 5336, - "end": 5337, + "start": 5304, + "end": 5305, "loc": { "start": { "line": 144, @@ -40915,8 +40477,8 @@ { "type": "CommentLine", "value": " Get the collection code from the specimen object if present.", - "start": 5342, - "end": 5405, + "start": 5310, + "end": 5373, "loc": { "start": { "line": 145, @@ -40943,8 +40505,8 @@ "updateContext": null }, "value": "if", - "start": 5410, - "end": 5412, + "start": 5378, + "end": 5380, "loc": { "start": { "line": 146, @@ -40968,8 +40530,8 @@ "postfix": false, "binop": null }, - "start": 5413, - "end": 5414, + "start": 5381, + "end": 5382, "loc": { "start": { "line": 146, @@ -40994,8 +40556,8 @@ "binop": null }, "value": "has", - "start": 5414, - "end": 5417, + "start": 5382, + "end": 5385, "loc": { "start": { "line": 146, @@ -41019,8 +40581,8 @@ "postfix": false, "binop": null }, - "start": 5417, - "end": 5418, + "start": 5385, + "end": 5386, "loc": { "start": { "line": 146, @@ -41047,8 +40609,8 @@ "updateContext": null }, "value": "this", - "start": 5418, - "end": 5422, + "start": 5386, + "end": 5390, "loc": { "start": { "line": 146, @@ -41073,8 +40635,8 @@ "binop": null, "updateContext": null }, - "start": 5422, - "end": 5423, + "start": 5390, + "end": 5391, "loc": { "start": { "line": 146, @@ -41099,8 +40661,8 @@ "binop": null }, "value": "specimen", - "start": 5423, - "end": 5431, + "start": 5391, + "end": 5399, "loc": { "start": { "line": 146, @@ -41125,8 +40687,8 @@ "binop": null, "updateContext": null }, - "start": 5431, - "end": 5432, + "start": 5399, + "end": 5400, "loc": { "start": { "line": 146, @@ -41152,8 +40714,8 @@ "updateContext": null }, "value": "collectionCode", - "start": 5433, - "end": 5449, + "start": 5401, + "end": 5417, "loc": { "start": { "line": 146, @@ -41177,8 +40739,8 @@ "postfix": false, "binop": null }, - "start": 5449, - "end": 5450, + "start": 5417, + "end": 5418, "loc": { "start": { "line": 146, @@ -41202,8 +40764,8 @@ "postfix": false, "binop": null }, - "start": 5450, - "end": 5451, + "start": 5418, + "end": 5419, "loc": { "start": { "line": 146, @@ -41230,8 +40792,8 @@ "updateContext": null }, "value": "return", - "start": 5452, - "end": 5458, + "start": 5420, + "end": 5426, "loc": { "start": { "line": 146, @@ -41258,8 +40820,8 @@ "updateContext": null }, "value": "this", - "start": 5459, - "end": 5463, + "start": 5427, + "end": 5431, "loc": { "start": { "line": 146, @@ -41284,8 +40846,8 @@ "binop": null, "updateContext": null }, - "start": 5463, - "end": 5464, + "start": 5431, + "end": 5432, "loc": { "start": { "line": 146, @@ -41310,8 +40872,8 @@ "binop": null }, "value": "specimen", - "start": 5464, - "end": 5472, + "start": 5432, + "end": 5440, "loc": { "start": { "line": 146, @@ -41336,8 +40898,8 @@ "binop": null, "updateContext": null }, - "start": 5472, - "end": 5473, + "start": 5440, + "end": 5441, "loc": { "start": { "line": 146, @@ -41362,8 +40924,8 @@ "binop": null }, "value": "collectionCode", - "start": 5473, - "end": 5487, + "start": 5441, + "end": 5455, "loc": { "start": { "line": 146, @@ -41388,8 +40950,8 @@ "binop": null, "updateContext": null }, - "start": 5487, - "end": 5488, + "start": 5455, + "end": 5456, "loc": { "start": { "line": 146, @@ -41404,8 +40966,8 @@ { "type": "CommentLine", "value": " Otherwise, try to parse the occurrenceID and see if we can extract an", - "start": 5494, - "end": 5566, + "start": 5462, + "end": 5534, "loc": { "start": { "line": 148, @@ -41420,8 +40982,8 @@ { "type": "CommentLine", "value": " occurrenceID from there.", - "start": 5571, - "end": 5598, + "start": 5539, + "end": 5566, "loc": { "start": { "line": 149, @@ -41448,8 +41010,8 @@ "updateContext": null }, "value": "if", - "start": 5603, - "end": 5605, + "start": 5571, + "end": 5573, "loc": { "start": { "line": 150, @@ -41473,8 +41035,8 @@ "postfix": false, "binop": null }, - "start": 5606, - "end": 5607, + "start": 5574, + "end": 5575, "loc": { "start": { "line": 150, @@ -41499,8 +41061,8 @@ "binop": null }, "value": "has", - "start": 5607, - "end": 5610, + "start": 5575, + "end": 5578, "loc": { "start": { "line": 150, @@ -41524,8 +41086,8 @@ "postfix": false, "binop": null }, - "start": 5610, - "end": 5611, + "start": 5578, + "end": 5579, "loc": { "start": { "line": 150, @@ -41552,8 +41114,8 @@ "updateContext": null }, "value": "this", - "start": 5611, - "end": 5615, + "start": 5579, + "end": 5583, "loc": { "start": { "line": 150, @@ -41578,8 +41140,8 @@ "binop": null, "updateContext": null }, - "start": 5615, - "end": 5616, + "start": 5583, + "end": 5584, "loc": { "start": { "line": 150, @@ -41604,8 +41166,8 @@ "binop": null }, "value": "specimen", - "start": 5616, - "end": 5624, + "start": 5584, + "end": 5592, "loc": { "start": { "line": 150, @@ -41630,8 +41192,8 @@ "binop": null, "updateContext": null }, - "start": 5624, - "end": 5625, + "start": 5592, + "end": 5593, "loc": { "start": { "line": 150, @@ -41657,8 +41219,8 @@ "updateContext": null }, "value": "occurrenceID", - "start": 5626, - "end": 5640, + "start": 5594, + "end": 5608, "loc": { "start": { "line": 150, @@ -41682,8 +41244,8 @@ "postfix": false, "binop": null }, - "start": 5640, - "end": 5641, + "start": 5608, + "end": 5609, "loc": { "start": { "line": 150, @@ -41707,8 +41269,8 @@ "postfix": false, "binop": null }, - "start": 5641, - "end": 5642, + "start": 5609, + "end": 5610, "loc": { "start": { "line": 150, @@ -41732,8 +41294,8 @@ "postfix": false, "binop": null }, - "start": 5643, - "end": 5644, + "start": 5611, + "end": 5612, "loc": { "start": { "line": 150, @@ -41760,8 +41322,8 @@ "updateContext": null }, "value": "const", - "start": 5651, - "end": 5656, + "start": 5619, + "end": 5624, "loc": { "start": { "line": 151, @@ -41786,8 +41348,8 @@ "binop": null }, "value": "specimen", - "start": 5657, - "end": 5665, + "start": 5625, + "end": 5633, "loc": { "start": { "line": 151, @@ -41813,8 +41375,8 @@ "updateContext": null }, "value": "=", - "start": 5666, - "end": 5667, + "start": 5634, + "end": 5635, "loc": { "start": { "line": 151, @@ -41839,8 +41401,8 @@ "binop": null }, "value": "SpecimenWrapper", - "start": 5668, - "end": 5683, + "start": 5636, + "end": 5651, "loc": { "start": { "line": 151, @@ -41865,8 +41427,8 @@ "binop": null, "updateContext": null }, - "start": 5683, - "end": 5684, + "start": 5651, + "end": 5652, "loc": { "start": { "line": 151, @@ -41891,8 +41453,8 @@ "binop": null }, "value": "fromOccurrenceID", - "start": 5684, - "end": 5700, + "start": 5652, + "end": 5668, "loc": { "start": { "line": 151, @@ -41916,8 +41478,8 @@ "postfix": false, "binop": null }, - "start": 5700, - "end": 5701, + "start": 5668, + "end": 5669, "loc": { "start": { "line": 151, @@ -41944,8 +41506,8 @@ "updateContext": null }, "value": "this", - "start": 5701, - "end": 5705, + "start": 5669, + "end": 5673, "loc": { "start": { "line": 151, @@ -41970,8 +41532,8 @@ "binop": null, "updateContext": null }, - "start": 5705, - "end": 5706, + "start": 5673, + "end": 5674, "loc": { "start": { "line": 151, @@ -41996,8 +41558,8 @@ "binop": null }, "value": "specimen", - "start": 5706, - "end": 5714, + "start": 5674, + "end": 5682, "loc": { "start": { "line": 151, @@ -42022,8 +41584,8 @@ "binop": null, "updateContext": null }, - "start": 5714, - "end": 5715, + "start": 5682, + "end": 5683, "loc": { "start": { "line": 151, @@ -42048,8 +41610,8 @@ "binop": null }, "value": "occurrenceID", - "start": 5715, - "end": 5727, + "start": 5683, + "end": 5695, "loc": { "start": { "line": 151, @@ -42073,8 +41635,8 @@ "postfix": false, "binop": null }, - "start": 5727, - "end": 5728, + "start": 5695, + "end": 5696, "loc": { "start": { "line": 151, @@ -42099,8 +41661,8 @@ "binop": null, "updateContext": null }, - "start": 5728, - "end": 5729, + "start": 5696, + "end": 5697, "loc": { "start": { "line": 151, @@ -42127,8 +41689,8 @@ "updateContext": null }, "value": "if", - "start": 5736, - "end": 5738, + "start": 5704, + "end": 5706, "loc": { "start": { "line": 152, @@ -42152,8 +41714,8 @@ "postfix": false, "binop": null }, - "start": 5739, - "end": 5740, + "start": 5707, + "end": 5708, "loc": { "start": { "line": 152, @@ -42178,8 +41740,8 @@ "binop": null }, "value": "has", - "start": 5740, - "end": 5743, + "start": 5708, + "end": 5711, "loc": { "start": { "line": 152, @@ -42203,8 +41765,8 @@ "postfix": false, "binop": null }, - "start": 5743, - "end": 5744, + "start": 5711, + "end": 5712, "loc": { "start": { "line": 152, @@ -42229,8 +41791,8 @@ "binop": null }, "value": "specimen", - "start": 5744, - "end": 5752, + "start": 5712, + "end": 5720, "loc": { "start": { "line": 152, @@ -42255,8 +41817,8 @@ "binop": null, "updateContext": null }, - "start": 5752, - "end": 5753, + "start": 5720, + "end": 5721, "loc": { "start": { "line": 152, @@ -42282,8 +41844,8 @@ "updateContext": null }, "value": "collectionCode", - "start": 5754, - "end": 5770, + "start": 5722, + "end": 5738, "loc": { "start": { "line": 152, @@ -42307,8 +41869,8 @@ "postfix": false, "binop": null }, - "start": 5770, - "end": 5771, + "start": 5738, + "end": 5739, "loc": { "start": { "line": 152, @@ -42332,8 +41894,8 @@ "postfix": false, "binop": null }, - "start": 5771, - "end": 5772, + "start": 5739, + "end": 5740, "loc": { "start": { "line": 152, @@ -42360,8 +41922,8 @@ "updateContext": null }, "value": "return", - "start": 5773, - "end": 5779, + "start": 5741, + "end": 5747, "loc": { "start": { "line": 152, @@ -42386,8 +41948,8 @@ "binop": null }, "value": "specimen", - "start": 5780, - "end": 5788, + "start": 5748, + "end": 5756, "loc": { "start": { "line": 152, @@ -42412,8 +41974,8 @@ "binop": null, "updateContext": null }, - "start": 5788, - "end": 5789, + "start": 5756, + "end": 5757, "loc": { "start": { "line": 152, @@ -42438,8 +42000,8 @@ "binop": null }, "value": "collectionCode", - "start": 5789, - "end": 5803, + "start": 5757, + "end": 5771, "loc": { "start": { "line": 152, @@ -42464,8 +42026,8 @@ "binop": null, "updateContext": null }, - "start": 5803, - "end": 5804, + "start": 5771, + "end": 5772, "loc": { "start": { "line": 152, @@ -42489,8 +42051,8 @@ "postfix": false, "binop": null }, - "start": 5809, - "end": 5810, + "start": 5777, + "end": 5778, "loc": { "start": { "line": 153, @@ -42517,8 +42079,8 @@ "updateContext": null }, "value": "return", - "start": 5815, - "end": 5821, + "start": 5783, + "end": 5789, "loc": { "start": { "line": 154, @@ -42543,8 +42105,8 @@ "binop": null }, "value": "undefined", - "start": 5822, - "end": 5831, + "start": 5790, + "end": 5799, "loc": { "start": { "line": 154, @@ -42569,8 +42131,8 @@ "binop": null, "updateContext": null }, - "start": 5831, - "end": 5832, + "start": 5799, + "end": 5800, "loc": { "start": { "line": 154, @@ -42594,8 +42156,8 @@ "postfix": false, "binop": null }, - "start": 5835, - "end": 5836, + "start": 5803, + "end": 5804, "loc": { "start": { "line": 155, @@ -42610,8 +42172,8 @@ { "type": "CommentBlock", "value": "*\n * Return the occurrence ID of this specimen, if we have one. Otherwise, we\n * attempt to construct one in the form:\n * \"urn:catalog:\" + institutionCode (if present) + ':' +\n * collectionCode (if present) + ':' + catalogNumber (if present)\n ", - "start": 5840, - "end": 6099, + "start": 5808, + "end": 6067, "loc": { "start": { "line": 157, @@ -42636,8 +42198,8 @@ "binop": null }, "value": "get", - "start": 6102, - "end": 6105, + "start": 6070, + "end": 6073, "loc": { "start": { "line": 163, @@ -42662,8 +42224,8 @@ "binop": null }, "value": "occurrenceID", - "start": 6106, - "end": 6118, + "start": 6074, + "end": 6086, "loc": { "start": { "line": 163, @@ -42687,8 +42249,8 @@ "postfix": false, "binop": null }, - "start": 6118, - "end": 6119, + "start": 6086, + "end": 6087, "loc": { "start": { "line": 163, @@ -42712,8 +42274,8 @@ "postfix": false, "binop": null }, - "start": 6119, - "end": 6120, + "start": 6087, + "end": 6088, "loc": { "start": { "line": 163, @@ -42737,8 +42299,8 @@ "postfix": false, "binop": null }, - "start": 6121, - "end": 6122, + "start": 6089, + "end": 6090, "loc": { "start": { "line": 163, @@ -42753,8 +42315,8 @@ { "type": "CommentLine", "value": " Return the occurrenceID if it exists.", - "start": 6127, - "end": 6167, + "start": 6095, + "end": 6135, "loc": { "start": { "line": 164, @@ -42781,8 +42343,8 @@ "updateContext": null }, "value": "if", - "start": 6172, - "end": 6174, + "start": 6140, + "end": 6142, "loc": { "start": { "line": 165, @@ -42806,8 +42368,8 @@ "postfix": false, "binop": null }, - "start": 6175, - "end": 6176, + "start": 6143, + "end": 6144, "loc": { "start": { "line": 165, @@ -42832,8 +42394,8 @@ "binop": null }, "value": "has", - "start": 6176, - "end": 6179, + "start": 6144, + "end": 6147, "loc": { "start": { "line": 165, @@ -42857,8 +42419,8 @@ "postfix": false, "binop": null }, - "start": 6179, - "end": 6180, + "start": 6147, + "end": 6148, "loc": { "start": { "line": 165, @@ -42885,201 +42447,16 @@ "updateContext": null }, "value": "this", - "start": 6180, - "end": 6184, - "loc": { - "start": { - "line": 165, - "column": 12 - }, - "end": { - "line": 165, - "column": 16 - } - } - }, - { - "type": { - "label": ".", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 6184, - "end": 6185, - "loc": { - "start": { - "line": 165, - "column": 16 - }, - "end": { - "line": 165, - "column": 17 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "specimen", - "start": 6185, - "end": 6193, - "loc": { - "start": { - "line": 165, - "column": 17 - }, - "end": { - "line": 165, - "column": 25 - } - } - }, - { - "type": { - "label": ",", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 6193, - "end": 6194, - "loc": { - "start": { - "line": 165, - "column": 25 - }, - "end": { - "line": 165, - "column": 26 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "occurrenceID", - "start": 6195, - "end": 6209, - "loc": { - "start": { - "line": 165, - "column": 27 - }, - "end": { - "line": 165, - "column": 41 - } - } - }, - { - "type": { - "label": ")", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 6209, - "end": 6210, - "loc": { - "start": { - "line": 165, - "column": 41 - }, - "end": { - "line": 165, - "column": 42 - } - } - }, - { - "type": { - "label": "&&", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 2, - "updateContext": null - }, - "value": "&&", - "start": 6211, - "end": 6213, - "loc": { - "start": { - "line": 165, - "column": 43 - }, - "end": { - "line": 165, - "column": 45 - } - } - }, - { - "type": { - "label": "this", - "keyword": "this", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "this", - "start": 6214, - "end": 6218, + "start": 6148, + "end": 6152, "loc": { "start": { "line": 165, - "column": 46 + "column": 12 }, "end": { "line": 165, - "column": 50 + "column": 16 } } }, @@ -43096,16 +42473,16 @@ "binop": null, "updateContext": null }, - "start": 6218, - "end": 6219, + "start": 6152, + "end": 6153, "loc": { "start": { "line": 165, - "column": 50 + "column": 16 }, "end": { "line": 165, - "column": 51 + "column": 17 } } }, @@ -43122,23 +42499,23 @@ "binop": null }, "value": "specimen", - "start": 6219, - "end": 6227, + "start": 6153, + "end": 6161, "loc": { "start": { "line": 165, - "column": 51 + "column": 17 }, "end": { "line": 165, - "column": 59 + "column": 25 } } }, { "type": { - "label": ".", - "beforeExpr": false, + "label": ",", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, @@ -43148,22 +42525,22 @@ "binop": null, "updateContext": null }, - "start": 6227, - "end": 6228, + "start": 6161, + "end": 6162, "loc": { "start": { "line": 165, - "column": 59 + "column": 25 }, "end": { "line": 165, - "column": 60 + "column": 26 } } }, { "type": { - "label": "name", + "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -43171,96 +42548,20 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null - }, - "value": "occurrenceID", - "start": 6228, - "end": 6240, - "loc": { - "start": { - "line": 165, - "column": 60 - }, - "end": { - "line": 165, - "column": 72 - } - } - }, - { - "type": { - "label": ".", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, "binop": null, "updateContext": null }, - "start": 6240, - "end": 6241, - "loc": { - "start": { - "line": 165, - "column": 72 - }, - "end": { - "line": 165, - "column": 73 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "trim", - "start": 6241, - "end": 6245, - "loc": { - "start": { - "line": 165, - "column": 73 - }, - "end": { - "line": 165, - "column": 77 - } - } - }, - { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 6245, - "end": 6246, + "value": "occurrenceID", + "start": 6163, + "end": 6177, "loc": { "start": { "line": 165, - "column": 77 + "column": 27 }, "end": { "line": 165, - "column": 78 + "column": 41 } } }, @@ -43276,70 +42577,16 @@ "postfix": false, "binop": null }, - "start": 6246, - "end": 6247, - "loc": { - "start": { - "line": 165, - "column": 78 - }, - "end": { - "line": 165, - "column": 79 - } - } - }, - { - "type": { - "label": "==/!=", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 6, - "updateContext": null - }, - "value": "!==", - "start": 6248, - "end": 6251, + "start": 6177, + "end": 6178, "loc": { "start": { "line": 165, - "column": 80 - }, - "end": { - "line": 165, - "column": 83 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "", - "start": 6252, - "end": 6254, - "loc": { - "start": { - "line": 165, - "column": 84 + "column": 41 }, "end": { "line": 165, - "column": 86 + "column": 42 } } }, @@ -43355,16 +42602,16 @@ "postfix": false, "binop": null }, - "start": 6254, - "end": 6255, + "start": 6178, + "end": 6179, "loc": { "start": { "line": 165, - "column": 86 + "column": 42 }, "end": { "line": 165, - "column": 87 + "column": 43 } } }, @@ -43380,16 +42627,16 @@ "postfix": false, "binop": null }, - "start": 6256, - "end": 6257, + "start": 6180, + "end": 6181, "loc": { "start": { "line": 165, - "column": 88 + "column": 44 }, "end": { "line": 165, - "column": 89 + "column": 45 } } }, @@ -43408,8 +42655,8 @@ "updateContext": null }, "value": "return", - "start": 6264, - "end": 6270, + "start": 6188, + "end": 6194, "loc": { "start": { "line": 166, @@ -43436,8 +42683,8 @@ "updateContext": null }, "value": "this", - "start": 6271, - "end": 6275, + "start": 6195, + "end": 6199, "loc": { "start": { "line": 166, @@ -43462,8 +42709,8 @@ "binop": null, "updateContext": null }, - "start": 6275, - "end": 6276, + "start": 6199, + "end": 6200, "loc": { "start": { "line": 166, @@ -43488,8 +42735,8 @@ "binop": null }, "value": "specimen", - "start": 6276, - "end": 6284, + "start": 6200, + "end": 6208, "loc": { "start": { "line": 166, @@ -43514,8 +42761,8 @@ "binop": null, "updateContext": null }, - "start": 6284, - "end": 6285, + "start": 6208, + "end": 6209, "loc": { "start": { "line": 166, @@ -43540,8 +42787,8 @@ "binop": null }, "value": "occurrenceID", - "start": 6285, - "end": 6297, + "start": 6209, + "end": 6221, "loc": { "start": { "line": 166, @@ -43566,8 +42813,8 @@ "binop": null, "updateContext": null }, - "start": 6297, - "end": 6298, + "start": 6221, + "end": 6222, "loc": { "start": { "line": 166, @@ -43592,8 +42839,8 @@ "binop": null }, "value": "trim", - "start": 6298, - "end": 6302, + "start": 6222, + "end": 6226, "loc": { "start": { "line": 166, @@ -43617,8 +42864,8 @@ "postfix": false, "binop": null }, - "start": 6302, - "end": 6303, + "start": 6226, + "end": 6227, "loc": { "start": { "line": 166, @@ -43642,8 +42889,8 @@ "postfix": false, "binop": null }, - "start": 6303, - "end": 6304, + "start": 6227, + "end": 6228, "loc": { "start": { "line": 166, @@ -43668,8 +42915,8 @@ "binop": null, "updateContext": null }, - "start": 6304, - "end": 6305, + "start": 6228, + "end": 6229, "loc": { "start": { "line": 166, @@ -43693,8 +42940,8 @@ "postfix": false, "binop": null }, - "start": 6310, - "end": 6311, + "start": 6234, + "end": 6235, "loc": { "start": { "line": 167, @@ -43709,8 +42956,8 @@ { "type": "CommentLine", "value": " Otherwise, we could try to construct the occurrenceID from its components.", - "start": 6317, - "end": 6394, + "start": 6241, + "end": 6318, "loc": { "start": { "line": 169, @@ -43737,8 +42984,8 @@ "updateContext": null }, "value": "if", - "start": 6399, - "end": 6401, + "start": 6323, + "end": 6325, "loc": { "start": { "line": 170, @@ -43762,8 +43009,8 @@ "postfix": false, "binop": null }, - "start": 6402, - "end": 6403, + "start": 6326, + "end": 6327, "loc": { "start": { "line": 170, @@ -43788,8 +43035,8 @@ "binop": null }, "value": "has", - "start": 6403, - "end": 6406, + "start": 6327, + "end": 6330, "loc": { "start": { "line": 170, @@ -43813,8 +43060,8 @@ "postfix": false, "binop": null }, - "start": 6406, - "end": 6407, + "start": 6330, + "end": 6331, "loc": { "start": { "line": 170, @@ -43841,8 +43088,8 @@ "updateContext": null }, "value": "this", - "start": 6407, - "end": 6411, + "start": 6331, + "end": 6335, "loc": { "start": { "line": 170, @@ -43867,8 +43114,8 @@ "binop": null, "updateContext": null }, - "start": 6411, - "end": 6412, + "start": 6335, + "end": 6336, "loc": { "start": { "line": 170, @@ -43893,8 +43140,8 @@ "binop": null }, "value": "specimen", - "start": 6412, - "end": 6420, + "start": 6336, + "end": 6344, "loc": { "start": { "line": 170, @@ -43919,8 +43166,8 @@ "binop": null, "updateContext": null }, - "start": 6420, - "end": 6421, + "start": 6344, + "end": 6345, "loc": { "start": { "line": 170, @@ -43946,8 +43193,8 @@ "updateContext": null }, "value": "catalogNumber", - "start": 6422, - "end": 6437, + "start": 6346, + "end": 6361, "loc": { "start": { "line": 170, @@ -43971,8 +43218,8 @@ "postfix": false, "binop": null }, - "start": 6437, - "end": 6438, + "start": 6361, + "end": 6362, "loc": { "start": { "line": 170, @@ -43996,8 +43243,8 @@ "postfix": false, "binop": null }, - "start": 6438, - "end": 6439, + "start": 6362, + "end": 6363, "loc": { "start": { "line": 170, @@ -44021,8 +43268,8 @@ "postfix": false, "binop": null }, - "start": 6440, - "end": 6441, + "start": 6364, + "end": 6365, "loc": { "start": { "line": 170, @@ -44049,8 +43296,8 @@ "updateContext": null }, "value": "if", - "start": 6448, - "end": 6450, + "start": 6372, + "end": 6374, "loc": { "start": { "line": 171, @@ -44074,8 +43321,8 @@ "postfix": false, "binop": null }, - "start": 6451, - "end": 6452, + "start": 6375, + "end": 6376, "loc": { "start": { "line": 171, @@ -44100,8 +43347,8 @@ "binop": null }, "value": "has", - "start": 6452, - "end": 6455, + "start": 6376, + "end": 6379, "loc": { "start": { "line": 171, @@ -44125,8 +43372,8 @@ "postfix": false, "binop": null }, - "start": 6455, - "end": 6456, + "start": 6379, + "end": 6380, "loc": { "start": { "line": 171, @@ -44153,8 +43400,8 @@ "updateContext": null }, "value": "this", - "start": 6456, - "end": 6460, + "start": 6380, + "end": 6384, "loc": { "start": { "line": 171, @@ -44179,8 +43426,8 @@ "binop": null, "updateContext": null }, - "start": 6460, - "end": 6461, + "start": 6384, + "end": 6385, "loc": { "start": { "line": 171, @@ -44205,8 +43452,8 @@ "binop": null }, "value": "specimen", - "start": 6461, - "end": 6469, + "start": 6385, + "end": 6393, "loc": { "start": { "line": 171, @@ -44231,8 +43478,8 @@ "binop": null, "updateContext": null }, - "start": 6469, - "end": 6470, + "start": 6393, + "end": 6394, "loc": { "start": { "line": 171, @@ -44258,8 +43505,8 @@ "updateContext": null }, "value": "institutionCode", - "start": 6471, - "end": 6488, + "start": 6395, + "end": 6412, "loc": { "start": { "line": 171, @@ -44283,8 +43530,8 @@ "postfix": false, "binop": null }, - "start": 6488, - "end": 6489, + "start": 6412, + "end": 6413, "loc": { "start": { "line": 171, @@ -44308,8 +43555,8 @@ "postfix": false, "binop": null }, - "start": 6489, - "end": 6490, + "start": 6413, + "end": 6414, "loc": { "start": { "line": 171, @@ -44333,8 +43580,8 @@ "postfix": false, "binop": null }, - "start": 6491, - "end": 6492, + "start": 6415, + "end": 6416, "loc": { "start": { "line": 171, @@ -44361,8 +43608,8 @@ "updateContext": null }, "value": "if", - "start": 6501, - "end": 6503, + "start": 6425, + "end": 6427, "loc": { "start": { "line": 172, @@ -44386,8 +43633,8 @@ "postfix": false, "binop": null }, - "start": 6504, - "end": 6505, + "start": 6428, + "end": 6429, "loc": { "start": { "line": 172, @@ -44412,8 +43659,8 @@ "binop": null }, "value": "has", - "start": 6505, - "end": 6508, + "start": 6429, + "end": 6432, "loc": { "start": { "line": 172, @@ -44437,8 +43684,8 @@ "postfix": false, "binop": null }, - "start": 6508, - "end": 6509, + "start": 6432, + "end": 6433, "loc": { "start": { "line": 172, @@ -44465,8 +43712,8 @@ "updateContext": null }, "value": "this", - "start": 6509, - "end": 6513, + "start": 6433, + "end": 6437, "loc": { "start": { "line": 172, @@ -44491,8 +43738,8 @@ "binop": null, "updateContext": null }, - "start": 6513, - "end": 6514, + "start": 6437, + "end": 6438, "loc": { "start": { "line": 172, @@ -44517,8 +43764,8 @@ "binop": null }, "value": "specimen", - "start": 6514, - "end": 6522, + "start": 6438, + "end": 6446, "loc": { "start": { "line": 172, @@ -44543,8 +43790,8 @@ "binop": null, "updateContext": null }, - "start": 6522, - "end": 6523, + "start": 6446, + "end": 6447, "loc": { "start": { "line": 172, @@ -44570,8 +43817,8 @@ "updateContext": null }, "value": "collectionCode", - "start": 6524, - "end": 6540, + "start": 6448, + "end": 6464, "loc": { "start": { "line": 172, @@ -44595,8 +43842,8 @@ "postfix": false, "binop": null }, - "start": 6540, - "end": 6541, + "start": 6464, + "end": 6465, "loc": { "start": { "line": 172, @@ -44620,8 +43867,8 @@ "postfix": false, "binop": null }, - "start": 6541, - "end": 6542, + "start": 6465, + "end": 6466, "loc": { "start": { "line": 172, @@ -44645,8 +43892,8 @@ "postfix": false, "binop": null }, - "start": 6543, - "end": 6544, + "start": 6467, + "end": 6468, "loc": { "start": { "line": 172, @@ -44673,8 +43920,8 @@ "updateContext": null }, "value": "return", - "start": 6555, - "end": 6561, + "start": 6479, + "end": 6485, "loc": { "start": { "line": 173, @@ -44698,8 +43945,8 @@ "postfix": false, "binop": null }, - "start": 6562, - "end": 6563, + "start": 6486, + "end": 6487, "loc": { "start": { "line": 173, @@ -44725,8 +43972,8 @@ "updateContext": null }, "value": "urn:catalog:", - "start": 6563, - "end": 6575, + "start": 6487, + "end": 6499, "loc": { "start": { "line": 173, @@ -44750,8 +43997,8 @@ "postfix": false, "binop": null }, - "start": 6575, - "end": 6577, + "start": 6499, + "end": 6501, "loc": { "start": { "line": 173, @@ -44778,8 +44025,8 @@ "updateContext": null }, "value": "this", - "start": 6577, - "end": 6581, + "start": 6501, + "end": 6505, "loc": { "start": { "line": 173, @@ -44804,8 +44051,8 @@ "binop": null, "updateContext": null }, - "start": 6581, - "end": 6582, + "start": 6505, + "end": 6506, "loc": { "start": { "line": 173, @@ -44830,8 +44077,8 @@ "binop": null }, "value": "specimen", - "start": 6582, - "end": 6590, + "start": 6506, + "end": 6514, "loc": { "start": { "line": 173, @@ -44856,8 +44103,8 @@ "binop": null, "updateContext": null }, - "start": 6590, - "end": 6591, + "start": 6514, + "end": 6515, "loc": { "start": { "line": 173, @@ -44882,8 +44129,8 @@ "binop": null }, "value": "institutionCode", - "start": 6591, - "end": 6606, + "start": 6515, + "end": 6530, "loc": { "start": { "line": 173, @@ -44908,8 +44155,8 @@ "binop": null, "updateContext": null }, - "start": 6606, - "end": 6607, + "start": 6530, + "end": 6531, "loc": { "start": { "line": 173, @@ -44934,8 +44181,8 @@ "binop": null }, "value": "trim", - "start": 6607, - "end": 6611, + "start": 6531, + "end": 6535, "loc": { "start": { "line": 173, @@ -44959,8 +44206,8 @@ "postfix": false, "binop": null }, - "start": 6611, - "end": 6612, + "start": 6535, + "end": 6536, "loc": { "start": { "line": 173, @@ -44984,8 +44231,8 @@ "postfix": false, "binop": null }, - "start": 6612, - "end": 6613, + "start": 6536, + "end": 6537, "loc": { "start": { "line": 173, @@ -45009,8 +44256,8 @@ "postfix": false, "binop": null }, - "start": 6613, - "end": 6614, + "start": 6537, + "end": 6538, "loc": { "start": { "line": 173, @@ -45036,8 +44283,8 @@ "updateContext": null }, "value": ":", - "start": 6614, - "end": 6615, + "start": 6538, + "end": 6539, "loc": { "start": { "line": 173, @@ -45061,8 +44308,8 @@ "postfix": false, "binop": null }, - "start": 6615, - "end": 6617, + "start": 6539, + "end": 6541, "loc": { "start": { "line": 173, @@ -45089,8 +44336,8 @@ "updateContext": null }, "value": "this", - "start": 6617, - "end": 6621, + "start": 6541, + "end": 6545, "loc": { "start": { "line": 173, @@ -45115,8 +44362,8 @@ "binop": null, "updateContext": null }, - "start": 6621, - "end": 6622, + "start": 6545, + "end": 6546, "loc": { "start": { "line": 173, @@ -45141,8 +44388,8 @@ "binop": null }, "value": "specimen", - "start": 6622, - "end": 6630, + "start": 6546, + "end": 6554, "loc": { "start": { "line": 173, @@ -45167,8 +44414,8 @@ "binop": null, "updateContext": null }, - "start": 6630, - "end": 6631, + "start": 6554, + "end": 6555, "loc": { "start": { "line": 173, @@ -45193,8 +44440,8 @@ "binop": null }, "value": "collectionCode", - "start": 6631, - "end": 6645, + "start": 6555, + "end": 6569, "loc": { "start": { "line": 173, @@ -45219,8 +44466,8 @@ "binop": null, "updateContext": null }, - "start": 6645, - "end": 6646, + "start": 6569, + "end": 6570, "loc": { "start": { "line": 173, @@ -45245,8 +44492,8 @@ "binop": null }, "value": "trim", - "start": 6646, - "end": 6650, + "start": 6570, + "end": 6574, "loc": { "start": { "line": 173, @@ -45270,8 +44517,8 @@ "postfix": false, "binop": null }, - "start": 6650, - "end": 6651, + "start": 6574, + "end": 6575, "loc": { "start": { "line": 173, @@ -45295,8 +44542,8 @@ "postfix": false, "binop": null }, - "start": 6651, - "end": 6652, + "start": 6575, + "end": 6576, "loc": { "start": { "line": 173, @@ -45320,8 +44567,8 @@ "postfix": false, "binop": null }, - "start": 6652, - "end": 6653, + "start": 6576, + "end": 6577, "loc": { "start": { "line": 173, @@ -45347,8 +44594,8 @@ "updateContext": null }, "value": ":", - "start": 6653, - "end": 6654, + "start": 6577, + "end": 6578, "loc": { "start": { "line": 173, @@ -45372,8 +44619,8 @@ "postfix": false, "binop": null }, - "start": 6654, - "end": 6656, + "start": 6578, + "end": 6580, "loc": { "start": { "line": 173, @@ -45400,8 +44647,8 @@ "updateContext": null }, "value": "this", - "start": 6656, - "end": 6660, + "start": 6580, + "end": 6584, "loc": { "start": { "line": 173, @@ -45426,8 +44673,8 @@ "binop": null, "updateContext": null }, - "start": 6660, - "end": 6661, + "start": 6584, + "end": 6585, "loc": { "start": { "line": 173, @@ -45452,8 +44699,8 @@ "binop": null }, "value": "specimen", - "start": 6661, - "end": 6669, + "start": 6585, + "end": 6593, "loc": { "start": { "line": 173, @@ -45478,8 +44725,8 @@ "binop": null, "updateContext": null }, - "start": 6669, - "end": 6670, + "start": 6593, + "end": 6594, "loc": { "start": { "line": 173, @@ -45504,8 +44751,8 @@ "binop": null }, "value": "catalogNumber", - "start": 6670, - "end": 6683, + "start": 6594, + "end": 6607, "loc": { "start": { "line": 173, @@ -45530,8 +44777,8 @@ "binop": null, "updateContext": null }, - "start": 6683, - "end": 6684, + "start": 6607, + "end": 6608, "loc": { "start": { "line": 173, @@ -45556,8 +44803,8 @@ "binop": null }, "value": "trim", - "start": 6684, - "end": 6688, + "start": 6608, + "end": 6612, "loc": { "start": { "line": 173, @@ -45581,8 +44828,8 @@ "postfix": false, "binop": null }, - "start": 6688, - "end": 6689, + "start": 6612, + "end": 6613, "loc": { "start": { "line": 173, @@ -45606,8 +44853,8 @@ "postfix": false, "binop": null }, - "start": 6689, - "end": 6690, + "start": 6613, + "end": 6614, "loc": { "start": { "line": 173, @@ -45631,8 +44878,8 @@ "postfix": false, "binop": null }, - "start": 6690, - "end": 6691, + "start": 6614, + "end": 6615, "loc": { "start": { "line": 173, @@ -45658,8 +44905,8 @@ "updateContext": null }, "value": "", - "start": 6691, - "end": 6691, + "start": 6615, + "end": 6615, "loc": { "start": { "line": 173, @@ -45683,8 +44930,8 @@ "postfix": false, "binop": null }, - "start": 6691, - "end": 6692, + "start": 6615, + "end": 6616, "loc": { "start": { "line": 173, @@ -45709,8 +44956,8 @@ "binop": null, "updateContext": null }, - "start": 6692, - "end": 6693, + "start": 6616, + "end": 6617, "loc": { "start": { "line": 173, @@ -45734,8 +44981,8 @@ "postfix": false, "binop": null }, - "start": 6702, - "end": 6703, + "start": 6626, + "end": 6627, "loc": { "start": { "line": 174, @@ -45762,8 +45009,8 @@ "updateContext": null }, "value": "return", - "start": 6712, - "end": 6718, + "start": 6636, + "end": 6642, "loc": { "start": { "line": 175, @@ -45787,8 +45034,8 @@ "postfix": false, "binop": null }, - "start": 6719, - "end": 6720, + "start": 6643, + "end": 6644, "loc": { "start": { "line": 175, @@ -45814,8 +45061,8 @@ "updateContext": null }, "value": "urn:catalog:", - "start": 6720, - "end": 6732, + "start": 6644, + "end": 6656, "loc": { "start": { "line": 175, @@ -45839,8 +45086,8 @@ "postfix": false, "binop": null }, - "start": 6732, - "end": 6734, + "start": 6656, + "end": 6658, "loc": { "start": { "line": 175, @@ -45867,8 +45114,8 @@ "updateContext": null }, "value": "this", - "start": 6734, - "end": 6738, + "start": 6658, + "end": 6662, "loc": { "start": { "line": 175, @@ -45893,8 +45140,8 @@ "binop": null, "updateContext": null }, - "start": 6738, - "end": 6739, + "start": 6662, + "end": 6663, "loc": { "start": { "line": 175, @@ -45919,8 +45166,8 @@ "binop": null }, "value": "specimen", - "start": 6739, - "end": 6747, + "start": 6663, + "end": 6671, "loc": { "start": { "line": 175, @@ -45945,8 +45192,8 @@ "binop": null, "updateContext": null }, - "start": 6747, - "end": 6748, + "start": 6671, + "end": 6672, "loc": { "start": { "line": 175, @@ -45971,8 +45218,8 @@ "binop": null }, "value": "institutionCode", - "start": 6748, - "end": 6763, + "start": 6672, + "end": 6687, "loc": { "start": { "line": 175, @@ -45997,8 +45244,8 @@ "binop": null, "updateContext": null }, - "start": 6763, - "end": 6764, + "start": 6687, + "end": 6688, "loc": { "start": { "line": 175, @@ -46023,8 +45270,8 @@ "binop": null }, "value": "trim", - "start": 6764, - "end": 6768, + "start": 6688, + "end": 6692, "loc": { "start": { "line": 175, @@ -46048,8 +45295,8 @@ "postfix": false, "binop": null }, - "start": 6768, - "end": 6769, + "start": 6692, + "end": 6693, "loc": { "start": { "line": 175, @@ -46073,8 +45320,8 @@ "postfix": false, "binop": null }, - "start": 6769, - "end": 6770, + "start": 6693, + "end": 6694, "loc": { "start": { "line": 175, @@ -46098,8 +45345,8 @@ "postfix": false, "binop": null }, - "start": 6770, - "end": 6771, + "start": 6694, + "end": 6695, "loc": { "start": { "line": 175, @@ -46125,8 +45372,8 @@ "updateContext": null }, "value": "::", - "start": 6771, - "end": 6773, + "start": 6695, + "end": 6697, "loc": { "start": { "line": 175, @@ -46150,8 +45397,8 @@ "postfix": false, "binop": null }, - "start": 6773, - "end": 6775, + "start": 6697, + "end": 6699, "loc": { "start": { "line": 175, @@ -46178,8 +45425,8 @@ "updateContext": null }, "value": "this", - "start": 6775, - "end": 6779, + "start": 6699, + "end": 6703, "loc": { "start": { "line": 175, @@ -46204,8 +45451,8 @@ "binop": null, "updateContext": null }, - "start": 6779, - "end": 6780, + "start": 6703, + "end": 6704, "loc": { "start": { "line": 175, @@ -46230,8 +45477,8 @@ "binop": null }, "value": "specimen", - "start": 6780, - "end": 6788, + "start": 6704, + "end": 6712, "loc": { "start": { "line": 175, @@ -46256,8 +45503,8 @@ "binop": null, "updateContext": null }, - "start": 6788, - "end": 6789, + "start": 6712, + "end": 6713, "loc": { "start": { "line": 175, @@ -46282,8 +45529,8 @@ "binop": null }, "value": "catalogNumber", - "start": 6789, - "end": 6802, + "start": 6713, + "end": 6726, "loc": { "start": { "line": 175, @@ -46308,8 +45555,8 @@ "binop": null, "updateContext": null }, - "start": 6802, - "end": 6803, + "start": 6726, + "end": 6727, "loc": { "start": { "line": 175, @@ -46334,8 +45581,8 @@ "binop": null }, "value": "trim", - "start": 6803, - "end": 6807, + "start": 6727, + "end": 6731, "loc": { "start": { "line": 175, @@ -46359,8 +45606,8 @@ "postfix": false, "binop": null }, - "start": 6807, - "end": 6808, + "start": 6731, + "end": 6732, "loc": { "start": { "line": 175, @@ -46384,8 +45631,8 @@ "postfix": false, "binop": null }, - "start": 6808, - "end": 6809, + "start": 6732, + "end": 6733, "loc": { "start": { "line": 175, @@ -46409,8 +45656,8 @@ "postfix": false, "binop": null }, - "start": 6809, - "end": 6810, + "start": 6733, + "end": 6734, "loc": { "start": { "line": 175, @@ -46436,8 +45683,8 @@ "updateContext": null }, "value": "", - "start": 6810, - "end": 6810, + "start": 6734, + "end": 6734, "loc": { "start": { "line": 175, @@ -46461,8 +45708,8 @@ "postfix": false, "binop": null }, - "start": 6810, - "end": 6811, + "start": 6734, + "end": 6735, "loc": { "start": { "line": 175, @@ -46487,8 +45734,8 @@ "binop": null, "updateContext": null }, - "start": 6811, - "end": 6812, + "start": 6735, + "end": 6736, "loc": { "start": { "line": 175, @@ -46512,8 +45759,8 @@ "postfix": false, "binop": null }, - "start": 6819, - "end": 6820, + "start": 6743, + "end": 6744, "loc": { "start": { "line": 176, @@ -46540,8 +45787,8 @@ "updateContext": null }, "value": "if", - "start": 6827, - "end": 6829, + "start": 6751, + "end": 6753, "loc": { "start": { "line": 177, @@ -46565,8 +45812,8 @@ "postfix": false, "binop": null }, - "start": 6830, - "end": 6831, + "start": 6754, + "end": 6755, "loc": { "start": { "line": 177, @@ -46591,8 +45838,8 @@ "binop": null }, "value": "has", - "start": 6831, - "end": 6834, + "start": 6755, + "end": 6758, "loc": { "start": { "line": 177, @@ -46616,8 +45863,8 @@ "postfix": false, "binop": null }, - "start": 6834, - "end": 6835, + "start": 6758, + "end": 6759, "loc": { "start": { "line": 177, @@ -46644,8 +45891,8 @@ "updateContext": null }, "value": "this", - "start": 6835, - "end": 6839, + "start": 6759, + "end": 6763, "loc": { "start": { "line": 177, @@ -46670,8 +45917,8 @@ "binop": null, "updateContext": null }, - "start": 6839, - "end": 6840, + "start": 6763, + "end": 6764, "loc": { "start": { "line": 177, @@ -46696,8 +45943,8 @@ "binop": null }, "value": "specimen", - "start": 6840, - "end": 6848, + "start": 6764, + "end": 6772, "loc": { "start": { "line": 177, @@ -46722,8 +45969,8 @@ "binop": null, "updateContext": null }, - "start": 6848, - "end": 6849, + "start": 6772, + "end": 6773, "loc": { "start": { "line": 177, @@ -46749,8 +45996,8 @@ "updateContext": null }, "value": "collectionCode", - "start": 6850, - "end": 6866, + "start": 6774, + "end": 6790, "loc": { "start": { "line": 177, @@ -46774,8 +46021,8 @@ "postfix": false, "binop": null }, - "start": 6866, - "end": 6867, + "start": 6790, + "end": 6791, "loc": { "start": { "line": 177, @@ -46799,8 +46046,8 @@ "postfix": false, "binop": null }, - "start": 6867, - "end": 6868, + "start": 6791, + "end": 6792, "loc": { "start": { "line": 177, @@ -46824,8 +46071,8 @@ "postfix": false, "binop": null }, - "start": 6869, - "end": 6870, + "start": 6793, + "end": 6794, "loc": { "start": { "line": 177, @@ -46852,8 +46099,8 @@ "updateContext": null }, "value": "return", - "start": 6879, - "end": 6885, + "start": 6803, + "end": 6809, "loc": { "start": { "line": 178, @@ -46877,8 +46124,8 @@ "postfix": false, "binop": null }, - "start": 6886, - "end": 6887, + "start": 6810, + "end": 6811, "loc": { "start": { "line": 178, @@ -46904,8 +46151,8 @@ "updateContext": null }, "value": "urn:catalog::", - "start": 6887, - "end": 6900, + "start": 6811, + "end": 6824, "loc": { "start": { "line": 178, @@ -46929,8 +46176,8 @@ "postfix": false, "binop": null }, - "start": 6900, - "end": 6902, + "start": 6824, + "end": 6826, "loc": { "start": { "line": 178, @@ -46957,8 +46204,8 @@ "updateContext": null }, "value": "this", - "start": 6902, - "end": 6906, + "start": 6826, + "end": 6830, "loc": { "start": { "line": 178, @@ -46983,8 +46230,8 @@ "binop": null, "updateContext": null }, - "start": 6906, - "end": 6907, + "start": 6830, + "end": 6831, "loc": { "start": { "line": 178, @@ -47009,8 +46256,8 @@ "binop": null }, "value": "specimen", - "start": 6907, - "end": 6915, + "start": 6831, + "end": 6839, "loc": { "start": { "line": 178, @@ -47035,8 +46282,8 @@ "binop": null, "updateContext": null }, - "start": 6915, - "end": 6916, + "start": 6839, + "end": 6840, "loc": { "start": { "line": 178, @@ -47061,8 +46308,8 @@ "binop": null }, "value": "collectionCode", - "start": 6916, - "end": 6930, + "start": 6840, + "end": 6854, "loc": { "start": { "line": 178, @@ -47087,8 +46334,8 @@ "binop": null, "updateContext": null }, - "start": 6930, - "end": 6931, + "start": 6854, + "end": 6855, "loc": { "start": { "line": 178, @@ -47113,8 +46360,8 @@ "binop": null }, "value": "trim", - "start": 6931, - "end": 6935, + "start": 6855, + "end": 6859, "loc": { "start": { "line": 178, @@ -47138,8 +46385,8 @@ "postfix": false, "binop": null }, - "start": 6935, - "end": 6936, + "start": 6859, + "end": 6860, "loc": { "start": { "line": 178, @@ -47163,8 +46410,8 @@ "postfix": false, "binop": null }, - "start": 6936, - "end": 6937, + "start": 6860, + "end": 6861, "loc": { "start": { "line": 178, @@ -47188,8 +46435,8 @@ "postfix": false, "binop": null }, - "start": 6937, - "end": 6938, + "start": 6861, + "end": 6862, "loc": { "start": { "line": 178, @@ -47215,8 +46462,8 @@ "updateContext": null }, "value": ":", - "start": 6938, - "end": 6939, + "start": 6862, + "end": 6863, "loc": { "start": { "line": 178, @@ -47240,8 +46487,8 @@ "postfix": false, "binop": null }, - "start": 6939, - "end": 6941, + "start": 6863, + "end": 6865, "loc": { "start": { "line": 178, @@ -47268,8 +46515,8 @@ "updateContext": null }, "value": "this", - "start": 6941, - "end": 6945, + "start": 6865, + "end": 6869, "loc": { "start": { "line": 178, @@ -47294,8 +46541,8 @@ "binop": null, "updateContext": null }, - "start": 6945, - "end": 6946, + "start": 6869, + "end": 6870, "loc": { "start": { "line": 178, @@ -47320,8 +46567,8 @@ "binop": null }, "value": "specimen", - "start": 6946, - "end": 6954, + "start": 6870, + "end": 6878, "loc": { "start": { "line": 178, @@ -47346,8 +46593,8 @@ "binop": null, "updateContext": null }, - "start": 6954, - "end": 6955, + "start": 6878, + "end": 6879, "loc": { "start": { "line": 178, @@ -47372,8 +46619,8 @@ "binop": null }, "value": "catalogNumber", - "start": 6955, - "end": 6968, + "start": 6879, + "end": 6892, "loc": { "start": { "line": 178, @@ -47398,8 +46645,8 @@ "binop": null, "updateContext": null }, - "start": 6968, - "end": 6969, + "start": 6892, + "end": 6893, "loc": { "start": { "line": 178, @@ -47424,8 +46671,8 @@ "binop": null }, "value": "trim", - "start": 6969, - "end": 6973, + "start": 6893, + "end": 6897, "loc": { "start": { "line": 178, @@ -47449,8 +46696,8 @@ "postfix": false, "binop": null }, - "start": 6973, - "end": 6974, + "start": 6897, + "end": 6898, "loc": { "start": { "line": 178, @@ -47474,8 +46721,8 @@ "postfix": false, "binop": null }, - "start": 6974, - "end": 6975, + "start": 6898, + "end": 6899, "loc": { "start": { "line": 178, @@ -47499,8 +46746,8 @@ "postfix": false, "binop": null }, - "start": 6975, - "end": 6976, + "start": 6899, + "end": 6900, "loc": { "start": { "line": 178, @@ -47526,8 +46773,8 @@ "updateContext": null }, "value": "", - "start": 6976, - "end": 6976, + "start": 6900, + "end": 6900, "loc": { "start": { "line": 178, @@ -47551,8 +46798,8 @@ "postfix": false, "binop": null }, - "start": 6976, - "end": 6977, + "start": 6900, + "end": 6901, "loc": { "start": { "line": 178, @@ -47577,8 +46824,8 @@ "binop": null, "updateContext": null }, - "start": 6977, - "end": 6978, + "start": 6901, + "end": 6902, "loc": { "start": { "line": 178, @@ -47602,8 +46849,8 @@ "postfix": false, "binop": null }, - "start": 6985, - "end": 6986, + "start": 6909, + "end": 6910, "loc": { "start": { "line": 179, @@ -47630,8 +46877,8 @@ "updateContext": null }, "value": "return", - "start": 6993, - "end": 6999, + "start": 6917, + "end": 6923, "loc": { "start": { "line": 180, @@ -47655,8 +46902,8 @@ "postfix": false, "binop": null }, - "start": 7000, - "end": 7001, + "start": 6924, + "end": 6925, "loc": { "start": { "line": 180, @@ -47682,8 +46929,8 @@ "updateContext": null }, "value": "urn:catalog:::", - "start": 7001, - "end": 7015, + "start": 6925, + "end": 6939, "loc": { "start": { "line": 180, @@ -47707,8 +46954,8 @@ "postfix": false, "binop": null }, - "start": 7015, - "end": 7017, + "start": 6939, + "end": 6941, "loc": { "start": { "line": 180, @@ -47735,8 +46982,8 @@ "updateContext": null }, "value": "this", - "start": 7017, - "end": 7021, + "start": 6941, + "end": 6945, "loc": { "start": { "line": 180, @@ -47761,8 +47008,8 @@ "binop": null, "updateContext": null }, - "start": 7021, - "end": 7022, + "start": 6945, + "end": 6946, "loc": { "start": { "line": 180, @@ -47787,8 +47034,8 @@ "binop": null }, "value": "specimen", - "start": 7022, - "end": 7030, + "start": 6946, + "end": 6954, "loc": { "start": { "line": 180, @@ -47813,8 +47060,8 @@ "binop": null, "updateContext": null }, - "start": 7030, - "end": 7031, + "start": 6954, + "end": 6955, "loc": { "start": { "line": 180, @@ -47839,8 +47086,8 @@ "binop": null }, "value": "catalogNumber", - "start": 7031, - "end": 7044, + "start": 6955, + "end": 6968, "loc": { "start": { "line": 180, @@ -47865,8 +47112,8 @@ "binop": null, "updateContext": null }, - "start": 7044, - "end": 7045, + "start": 6968, + "end": 6969, "loc": { "start": { "line": 180, @@ -47891,8 +47138,8 @@ "binop": null }, "value": "trim", - "start": 7045, - "end": 7049, + "start": 6969, + "end": 6973, "loc": { "start": { "line": 180, @@ -47916,8 +47163,8 @@ "postfix": false, "binop": null }, - "start": 7049, - "end": 7050, + "start": 6973, + "end": 6974, "loc": { "start": { "line": 180, @@ -47941,8 +47188,8 @@ "postfix": false, "binop": null }, - "start": 7050, - "end": 7051, + "start": 6974, + "end": 6975, "loc": { "start": { "line": 180, @@ -47966,8 +47213,8 @@ "postfix": false, "binop": null }, - "start": 7051, - "end": 7052, + "start": 6975, + "end": 6976, "loc": { "start": { "line": 180, @@ -47993,8 +47240,8 @@ "updateContext": null }, "value": "", - "start": 7052, - "end": 7052, + "start": 6976, + "end": 6976, "loc": { "start": { "line": 180, @@ -48018,8 +47265,8 @@ "postfix": false, "binop": null }, - "start": 7052, - "end": 7053, + "start": 6976, + "end": 6977, "loc": { "start": { "line": 180, @@ -48044,8 +47291,8 @@ "binop": null, "updateContext": null }, - "start": 7053, - "end": 7054, + "start": 6977, + "end": 6978, "loc": { "start": { "line": 180, @@ -48069,8 +47316,8 @@ "postfix": false, "binop": null }, - "start": 7059, - "end": 7060, + "start": 6983, + "end": 6984, "loc": { "start": { "line": 181, @@ -48085,8 +47332,8 @@ { "type": "CommentLine", "value": " None of our specimen identifier schemes worked.", - "start": 7066, - "end": 7116, + "start": 6990, + "end": 7040, "loc": { "start": { "line": 183, @@ -48113,8 +47360,8 @@ "updateContext": null }, "value": "return", - "start": 7121, - "end": 7127, + "start": 7045, + "end": 7051, "loc": { "start": { "line": 184, @@ -48139,8 +47386,8 @@ "binop": null }, "value": "undefined", - "start": 7128, - "end": 7137, + "start": 7052, + "end": 7061, "loc": { "start": { "line": 184, @@ -48165,8 +47412,8 @@ "binop": null, "updateContext": null }, - "start": 7137, - "end": 7138, + "start": 7061, + "end": 7062, "loc": { "start": { "line": 184, @@ -48190,8 +47437,8 @@ "postfix": false, "binop": null }, - "start": 7141, - "end": 7142, + "start": 7065, + "end": 7066, "loc": { "start": { "line": 185, @@ -48206,8 +47453,8 @@ { "type": "CommentBlock", "value": "*\n * Return the basis of record, if one is present.\n ", - "start": 7146, - "end": 7207, + "start": 7070, + "end": 7131, "loc": { "start": { "line": 187, @@ -48232,8 +47479,8 @@ "binop": null }, "value": "get", - "start": 7210, - "end": 7213, + "start": 7134, + "end": 7137, "loc": { "start": { "line": 190, @@ -48258,8 +47505,8 @@ "binop": null }, "value": "basisOfRecord", - "start": 7214, - "end": 7227, + "start": 7138, + "end": 7151, "loc": { "start": { "line": 190, @@ -48283,8 +47530,8 @@ "postfix": false, "binop": null }, - "start": 7227, - "end": 7228, + "start": 7151, + "end": 7152, "loc": { "start": { "line": 190, @@ -48308,8 +47555,8 @@ "postfix": false, "binop": null }, - "start": 7228, - "end": 7229, + "start": 7152, + "end": 7153, "loc": { "start": { "line": 190, @@ -48333,8 +47580,8 @@ "postfix": false, "binop": null }, - "start": 7230, - "end": 7231, + "start": 7154, + "end": 7155, "loc": { "start": { "line": 190, @@ -48361,8 +47608,8 @@ "updateContext": null }, "value": "if", - "start": 7236, - "end": 7238, + "start": 7160, + "end": 7162, "loc": { "start": { "line": 191, @@ -48386,8 +47633,8 @@ "postfix": false, "binop": null }, - "start": 7239, - "end": 7240, + "start": 7163, + "end": 7164, "loc": { "start": { "line": 191, @@ -48412,8 +47659,8 @@ "binop": null }, "value": "has", - "start": 7240, - "end": 7243, + "start": 7164, + "end": 7167, "loc": { "start": { "line": 191, @@ -48437,8 +47684,8 @@ "postfix": false, "binop": null }, - "start": 7243, - "end": 7244, + "start": 7167, + "end": 7168, "loc": { "start": { "line": 191, @@ -48465,8 +47712,8 @@ "updateContext": null }, "value": "this", - "start": 7244, - "end": 7248, + "start": 7168, + "end": 7172, "loc": { "start": { "line": 191, @@ -48491,8 +47738,8 @@ "binop": null, "updateContext": null }, - "start": 7248, - "end": 7249, + "start": 7172, + "end": 7173, "loc": { "start": { "line": 191, @@ -48517,8 +47764,8 @@ "binop": null }, "value": "specimen", - "start": 7249, - "end": 7257, + "start": 7173, + "end": 7181, "loc": { "start": { "line": 191, @@ -48543,8 +47790,8 @@ "binop": null, "updateContext": null }, - "start": 7257, - "end": 7258, + "start": 7181, + "end": 7182, "loc": { "start": { "line": 191, @@ -48569,9 +47816,9 @@ "binop": null, "updateContext": null }, - "value": "dwc:basisOfRecord", - "start": 7259, - "end": 7278, + "value": "basisOfRecord", + "start": 7183, + "end": 7198, "loc": { "start": { "line": 191, @@ -48579,7 +47826,7 @@ }, "end": { "line": 191, - "column": 46 + "column": 42 } } }, @@ -48595,16 +47842,16 @@ "postfix": false, "binop": null }, - "start": 7278, - "end": 7279, + "start": 7198, + "end": 7199, "loc": { "start": { "line": 191, - "column": 46 + "column": 42 }, "end": { "line": 191, - "column": 47 + "column": 43 } } }, @@ -48620,16 +47867,16 @@ "postfix": false, "binop": null }, - "start": 7279, - "end": 7280, + "start": 7199, + "end": 7200, "loc": { "start": { "line": 191, - "column": 47 + "column": 43 }, "end": { "line": 191, - "column": 48 + "column": 44 } } }, @@ -48648,16 +47895,16 @@ "updateContext": null }, "value": "return", - "start": 7281, - "end": 7287, + "start": 7201, + "end": 7207, "loc": { "start": { "line": 191, - "column": 49 + "column": 45 }, "end": { "line": 191, - "column": 55 + "column": 51 } } }, @@ -48676,16 +47923,16 @@ "updateContext": null }, "value": "this", - "start": 7288, - "end": 7292, + "start": 7208, + "end": 7212, "loc": { "start": { "line": 191, - "column": 56 + "column": 52 }, "end": { "line": 191, - "column": 60 + "column": 56 } } }, @@ -48702,16 +47949,16 @@ "binop": null, "updateContext": null }, - "start": 7292, - "end": 7293, + "start": 7212, + "end": 7213, "loc": { "start": { "line": 191, - "column": 60 + "column": 56 }, "end": { "line": 191, - "column": 61 + "column": 57 } } }, @@ -48728,50 +47975,24 @@ "binop": null }, "value": "specimen", - "start": 7293, - "end": 7301, - "loc": { - "start": { - "line": 191, - "column": 61 - }, - "end": { - "line": 191, - "column": 69 - } - } - }, - { - "type": { - "label": "[", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 7301, - "end": 7302, + "start": 7213, + "end": 7221, "loc": { "start": { "line": 191, - "column": 69 + "column": 57 }, "end": { "line": 191, - "column": 70 + "column": 65 } } }, { "type": { - "label": "string", + "label": ".", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -48780,43 +48001,42 @@ "binop": null, "updateContext": null }, - "value": "dwc:basisOfRecord", - "start": 7302, - "end": 7321, + "start": 7221, + "end": 7222, "loc": { "start": { "line": 191, - "column": 70 + "column": 65 }, "end": { "line": 191, - "column": 89 + "column": 66 } } }, { "type": { - "label": "]", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 7321, - "end": 7322, + "value": "basisOfRecord", + "start": 7222, + "end": 7235, "loc": { "start": { "line": 191, - "column": 89 + "column": 66 }, "end": { "line": 191, - "column": 90 + "column": 79 } } }, @@ -48833,16 +48053,16 @@ "binop": null, "updateContext": null }, - "start": 7322, - "end": 7323, + "start": 7235, + "end": 7236, "loc": { "start": { "line": 191, - "column": 90 + "column": 79 }, "end": { "line": 191, - "column": 91 + "column": 80 } } }, @@ -48861,8 +48081,8 @@ "updateContext": null }, "value": "return", - "start": 7328, - "end": 7334, + "start": 7241, + "end": 7247, "loc": { "start": { "line": 192, @@ -48887,8 +48107,8 @@ "binop": null }, "value": "undefined", - "start": 7335, - "end": 7344, + "start": 7248, + "end": 7257, "loc": { "start": { "line": 192, @@ -48913,8 +48133,8 @@ "binop": null, "updateContext": null }, - "start": 7344, - "end": 7345, + "start": 7257, + "end": 7258, "loc": { "start": { "line": 192, @@ -48938,8 +48158,8 @@ "postfix": false, "binop": null }, - "start": 7348, - "end": 7349, + "start": 7261, + "end": 7262, "loc": { "start": { "line": 193, @@ -48954,8 +48174,8 @@ { "type": "CommentBlock", "value": "*\n * Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for\n * recommended values.\n ", - "start": 7353, - "end": 7468, + "start": 7266, + "end": 7381, "loc": { "start": { "line": 195, @@ -48980,8 +48200,8 @@ "binop": null }, "value": "set", - "start": 7471, - "end": 7474, + "start": 7384, + "end": 7387, "loc": { "start": { "line": 199, @@ -49006,8 +48226,8 @@ "binop": null }, "value": "basisOfRecord", - "start": 7475, - "end": 7488, + "start": 7388, + "end": 7401, "loc": { "start": { "line": 199, @@ -49031,8 +48251,8 @@ "postfix": false, "binop": null }, - "start": 7488, - "end": 7489, + "start": 7401, + "end": 7402, "loc": { "start": { "line": 199, @@ -49057,8 +48277,8 @@ "binop": null }, "value": "bor", - "start": 7489, - "end": 7492, + "start": 7402, + "end": 7405, "loc": { "start": { "line": 199, @@ -49082,8 +48302,8 @@ "postfix": false, "binop": null }, - "start": 7492, - "end": 7493, + "start": 7405, + "end": 7406, "loc": { "start": { "line": 199, @@ -49107,8 +48327,8 @@ "postfix": false, "binop": null }, - "start": 7494, - "end": 7495, + "start": 7407, + "end": 7408, "loc": { "start": { "line": 199, @@ -49135,8 +48355,8 @@ "updateContext": null }, "value": "this", - "start": 7500, - "end": 7504, + "start": 7413, + "end": 7417, "loc": { "start": { "line": 200, @@ -49161,8 +48381,8 @@ "binop": null, "updateContext": null }, - "start": 7504, - "end": 7505, + "start": 7417, + "end": 7418, "loc": { "start": { "line": 200, @@ -49187,8 +48407,8 @@ "binop": null }, "value": "specimen", - "start": 7505, - "end": 7513, + "start": 7418, + "end": 7426, "loc": { "start": { "line": 200, @@ -49202,9 +48422,9 @@ }, { "type": { - "label": "[", - "beforeExpr": true, - "startsExpr": true, + "label": ".", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -49213,8 +48433,8 @@ "binop": null, "updateContext": null }, - "start": 7513, - "end": 7514, + "start": 7426, + "end": 7427, "loc": { "start": { "line": 200, @@ -49228,7 +48448,7 @@ }, { "type": { - "label": "string", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -49236,12 +48456,11 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "dwc:basisOfRecord", - "start": 7514, - "end": 7533, + "value": "basisOfRecord", + "start": 7427, + "end": 7440, "loc": { "start": { "line": 200, @@ -49249,33 +48468,7 @@ }, "end": { "line": 200, - "column": 37 - } - } - }, - { - "type": { - "label": "]", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 7533, - "end": 7534, - "loc": { - "start": { - "line": 200, - "column": 37 - }, - "end": { - "line": 200, - "column": 38 + "column": 31 } } }, @@ -49293,16 +48486,16 @@ "updateContext": null }, "value": "=", - "start": 7535, - "end": 7536, + "start": 7441, + "end": 7442, "loc": { "start": { "line": 200, - "column": 39 + "column": 32 }, "end": { "line": 200, - "column": 40 + "column": 33 } } }, @@ -49319,16 +48512,16 @@ "binop": null }, "value": "bor", - "start": 7537, - "end": 7540, + "start": 7443, + "end": 7446, "loc": { "start": { "line": 200, - "column": 41 + "column": 34 }, "end": { "line": 200, - "column": 44 + "column": 37 } } }, @@ -49345,16 +48538,16 @@ "binop": null, "updateContext": null }, - "start": 7540, - "end": 7541, + "start": 7446, + "end": 7447, "loc": { "start": { "line": 200, - "column": 44 + "column": 37 }, "end": { "line": 200, - "column": 45 + "column": 38 } } }, @@ -49370,8 +48563,8 @@ "postfix": false, "binop": null }, - "start": 7544, - "end": 7545, + "start": 7450, + "end": 7451, "loc": { "start": { "line": 201, @@ -49386,8 +48579,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as a taxon concept if it contains taxon name information. ", - "start": 7549, - "end": 7634, + "start": 7455, + "end": 7540, "loc": { "start": { "line": 203, @@ -49412,8 +48605,8 @@ "binop": null }, "value": "get", - "start": 7637, - "end": 7640, + "start": 7543, + "end": 7546, "loc": { "start": { "line": 204, @@ -49438,8 +48631,8 @@ "binop": null }, "value": "taxonConcept", - "start": 7641, - "end": 7653, + "start": 7547, + "end": 7559, "loc": { "start": { "line": 204, @@ -49463,8 +48656,8 @@ "postfix": false, "binop": null }, - "start": 7653, - "end": 7654, + "start": 7559, + "end": 7560, "loc": { "start": { "line": 204, @@ -49488,8 +48681,8 @@ "postfix": false, "binop": null }, - "start": 7654, - "end": 7655, + "start": 7560, + "end": 7561, "loc": { "start": { "line": 204, @@ -49513,8 +48706,8 @@ "postfix": false, "binop": null }, - "start": 7656, - "end": 7657, + "start": 7562, + "end": 7563, "loc": { "start": { "line": 204, @@ -49541,8 +48734,8 @@ "updateContext": null }, "value": "if", - "start": 7662, - "end": 7664, + "start": 7568, + "end": 7570, "loc": { "start": { "line": 205, @@ -49566,8 +48759,8 @@ "postfix": false, "binop": null }, - "start": 7665, - "end": 7666, + "start": 7571, + "end": 7572, "loc": { "start": { "line": 205, @@ -49592,8 +48785,8 @@ "binop": null }, "value": "has", - "start": 7666, - "end": 7669, + "start": 7572, + "end": 7575, "loc": { "start": { "line": 205, @@ -49617,8 +48810,8 @@ "postfix": false, "binop": null }, - "start": 7669, - "end": 7670, + "start": 7575, + "end": 7576, "loc": { "start": { "line": 205, @@ -49645,8 +48838,8 @@ "updateContext": null }, "value": "this", - "start": 7670, - "end": 7674, + "start": 7576, + "end": 7580, "loc": { "start": { "line": 205, @@ -49671,8 +48864,8 @@ "binop": null, "updateContext": null }, - "start": 7674, - "end": 7675, + "start": 7580, + "end": 7581, "loc": { "start": { "line": 205, @@ -49697,8 +48890,8 @@ "binop": null }, "value": "specimen", - "start": 7675, - "end": 7683, + "start": 7581, + "end": 7589, "loc": { "start": { "line": 205, @@ -49723,8 +48916,8 @@ "binop": null, "updateContext": null }, - "start": 7683, - "end": 7684, + "start": 7589, + "end": 7590, "loc": { "start": { "line": 205, @@ -49750,8 +48943,8 @@ "updateContext": null }, "value": "hasName", - "start": 7685, - "end": 7694, + "start": 7591, + "end": 7600, "loc": { "start": { "line": 205, @@ -49775,8 +48968,8 @@ "postfix": false, "binop": null }, - "start": 7694, - "end": 7695, + "start": 7600, + "end": 7601, "loc": { "start": { "line": 205, @@ -49800,8 +48993,8 @@ "postfix": false, "binop": null }, - "start": 7695, - "end": 7696, + "start": 7601, + "end": 7602, "loc": { "start": { "line": 205, @@ -49828,8 +49021,8 @@ "updateContext": null }, "value": "return", - "start": 7697, - "end": 7703, + "start": 7603, + "end": 7609, "loc": { "start": { "line": 205, @@ -49856,8 +49049,8 @@ "updateContext": null }, "value": "this", - "start": 7704, - "end": 7708, + "start": 7610, + "end": 7614, "loc": { "start": { "line": 205, @@ -49882,8 +49075,8 @@ "binop": null, "updateContext": null }, - "start": 7708, - "end": 7709, + "start": 7614, + "end": 7615, "loc": { "start": { "line": 205, @@ -49908,8 +49101,8 @@ "binop": null }, "value": "specimen", - "start": 7709, - "end": 7717, + "start": 7615, + "end": 7623, "loc": { "start": { "line": 205, @@ -49934,8 +49127,8 @@ "binop": null, "updateContext": null }, - "start": 7717, - "end": 7718, + "start": 7623, + "end": 7624, "loc": { "start": { "line": 205, @@ -49962,8 +49155,8 @@ "updateContext": null }, "value": "if", - "start": 7723, - "end": 7725, + "start": 7629, + "end": 7631, "loc": { "start": { "line": 206, @@ -49987,8 +49180,8 @@ "postfix": false, "binop": null }, - "start": 7726, - "end": 7727, + "start": 7632, + "end": 7633, "loc": { "start": { "line": 206, @@ -50013,8 +49206,8 @@ "binop": null }, "value": "has", - "start": 7727, - "end": 7730, + "start": 7633, + "end": 7636, "loc": { "start": { "line": 206, @@ -50038,8 +49231,8 @@ "postfix": false, "binop": null }, - "start": 7730, - "end": 7731, + "start": 7636, + "end": 7637, "loc": { "start": { "line": 206, @@ -50066,8 +49259,8 @@ "updateContext": null }, "value": "this", - "start": 7731, - "end": 7735, + "start": 7637, + "end": 7641, "loc": { "start": { "line": 206, @@ -50092,8 +49285,8 @@ "binop": null, "updateContext": null }, - "start": 7735, - "end": 7736, + "start": 7641, + "end": 7642, "loc": { "start": { "line": 206, @@ -50118,8 +49311,8 @@ "binop": null }, "value": "specimen", - "start": 7736, - "end": 7744, + "start": 7642, + "end": 7650, "loc": { "start": { "line": 206, @@ -50144,8 +49337,8 @@ "binop": null, "updateContext": null }, - "start": 7744, - "end": 7745, + "start": 7650, + "end": 7651, "loc": { "start": { "line": 206, @@ -50171,8 +49364,8 @@ "updateContext": null }, "value": "nameString", - "start": 7746, - "end": 7758, + "start": 7652, + "end": 7664, "loc": { "start": { "line": 206, @@ -50196,8 +49389,8 @@ "postfix": false, "binop": null }, - "start": 7758, - "end": 7759, + "start": 7664, + "end": 7665, "loc": { "start": { "line": 206, @@ -50221,8 +49414,8 @@ "postfix": false, "binop": null }, - "start": 7759, - "end": 7760, + "start": 7665, + "end": 7666, "loc": { "start": { "line": 206, @@ -50249,8 +49442,8 @@ "updateContext": null }, "value": "return", - "start": 7761, - "end": 7767, + "start": 7667, + "end": 7673, "loc": { "start": { "line": 206, @@ -50277,8 +49470,8 @@ "updateContext": null }, "value": "this", - "start": 7768, - "end": 7772, + "start": 7674, + "end": 7678, "loc": { "start": { "line": 206, @@ -50303,8 +49496,8 @@ "binop": null, "updateContext": null }, - "start": 7772, - "end": 7773, + "start": 7678, + "end": 7679, "loc": { "start": { "line": 206, @@ -50329,8 +49522,8 @@ "binop": null }, "value": "specimen", - "start": 7773, - "end": 7781, + "start": 7679, + "end": 7687, "loc": { "start": { "line": 206, @@ -50355,8 +49548,8 @@ "binop": null, "updateContext": null }, - "start": 7781, - "end": 7782, + "start": 7687, + "end": 7688, "loc": { "start": { "line": 206, @@ -50383,8 +49576,8 @@ "updateContext": null }, "value": "return", - "start": 7787, - "end": 7793, + "start": 7693, + "end": 7699, "loc": { "start": { "line": 207, @@ -50409,8 +49602,8 @@ "binop": null }, "value": "undefined", - "start": 7794, - "end": 7803, + "start": 7700, + "end": 7709, "loc": { "start": { "line": 207, @@ -50435,8 +49628,8 @@ "binop": null, "updateContext": null }, - "start": 7803, - "end": 7804, + "start": 7709, + "end": 7710, "loc": { "start": { "line": 207, @@ -50460,8 +49653,8 @@ "postfix": false, "binop": null }, - "start": 7807, - "end": 7808, + "start": 7713, + "end": 7714, "loc": { "start": { "line": 208, @@ -50476,8 +49669,8 @@ { "type": "CommentBlock", "value": "* Return a label for this specimen. ", - "start": 7812, - "end": 7852, + "start": 7718, + "end": 7758, "loc": { "start": { "line": 210, @@ -50502,8 +49695,8 @@ "binop": null }, "value": "get", - "start": 7855, - "end": 7858, + "start": 7761, + "end": 7764, "loc": { "start": { "line": 211, @@ -50528,8 +49721,8 @@ "binop": null }, "value": "label", - "start": 7859, - "end": 7864, + "start": 7765, + "end": 7770, "loc": { "start": { "line": 211, @@ -50553,8 +49746,8 @@ "postfix": false, "binop": null }, - "start": 7864, - "end": 7865, + "start": 7770, + "end": 7771, "loc": { "start": { "line": 211, @@ -50578,8 +49771,8 @@ "postfix": false, "binop": null }, - "start": 7865, - "end": 7866, + "start": 7771, + "end": 7772, "loc": { "start": { "line": 211, @@ -50603,8 +49796,8 @@ "postfix": false, "binop": null }, - "start": 7867, - "end": 7868, + "start": 7773, + "end": 7774, "loc": { "start": { "line": 211, @@ -50619,8 +49812,8 @@ { "type": "CommentLine", "value": " We can't return anything without an occurrenceID.", - "start": 7873, - "end": 7925, + "start": 7779, + "end": 7831, "loc": { "start": { "line": 212, @@ -50647,8 +49840,8 @@ "updateContext": null }, "value": "if", - "start": 7930, - "end": 7932, + "start": 7836, + "end": 7838, "loc": { "start": { "line": 213, @@ -50672,8 +49865,8 @@ "postfix": false, "binop": null }, - "start": 7933, - "end": 7934, + "start": 7839, + "end": 7840, "loc": { "start": { "line": 213, @@ -50699,8 +49892,8 @@ "updateContext": null }, "value": "!", - "start": 7934, - "end": 7935, + "start": 7840, + "end": 7841, "loc": { "start": { "line": 213, @@ -50727,8 +49920,8 @@ "updateContext": null }, "value": "this", - "start": 7935, - "end": 7939, + "start": 7841, + "end": 7845, "loc": { "start": { "line": 213, @@ -50753,8 +49946,8 @@ "binop": null, "updateContext": null }, - "start": 7939, - "end": 7940, + "start": 7845, + "end": 7846, "loc": { "start": { "line": 213, @@ -50779,8 +49972,8 @@ "binop": null }, "value": "occurrenceID", - "start": 7940, - "end": 7952, + "start": 7846, + "end": 7858, "loc": { "start": { "line": 213, @@ -50804,8 +49997,8 @@ "postfix": false, "binop": null }, - "start": 7952, - "end": 7953, + "start": 7858, + "end": 7859, "loc": { "start": { "line": 213, @@ -50832,8 +50025,8 @@ "updateContext": null }, "value": "return", - "start": 7954, - "end": 7960, + "start": 7860, + "end": 7866, "loc": { "start": { "line": 213, @@ -50858,8 +50051,8 @@ "binop": null }, "value": "undefined", - "start": 7961, - "end": 7970, + "start": 7867, + "end": 7876, "loc": { "start": { "line": 213, @@ -50884,8 +50077,8 @@ "binop": null, "updateContext": null }, - "start": 7970, - "end": 7971, + "start": 7876, + "end": 7877, "loc": { "start": { "line": 213, @@ -50900,8 +50093,8 @@ { "type": "CommentLine", "value": " Note that specimens may be identified to a taxon concept. If so, we should", - "start": 7977, - "end": 8054, + "start": 7883, + "end": 7960, "loc": { "start": { "line": 215, @@ -50916,8 +50109,8 @@ { "type": "CommentLine", "value": " include that information in the label.", - "start": 8059, - "end": 8100, + "start": 7965, + "end": 8006, "loc": { "start": { "line": 216, @@ -50944,8 +50137,8 @@ "updateContext": null }, "value": "if", - "start": 8105, - "end": 8107, + "start": 8011, + "end": 8013, "loc": { "start": { "line": 217, @@ -50969,8 +50162,8 @@ "postfix": false, "binop": null }, - "start": 8108, - "end": 8109, + "start": 8014, + "end": 8015, "loc": { "start": { "line": 217, @@ -50997,8 +50190,8 @@ "updateContext": null }, "value": "this", - "start": 8109, - "end": 8113, + "start": 8015, + "end": 8019, "loc": { "start": { "line": 217, @@ -51023,8 +50216,8 @@ "binop": null, "updateContext": null }, - "start": 8113, - "end": 8114, + "start": 8019, + "end": 8020, "loc": { "start": { "line": 217, @@ -51049,8 +50242,8 @@ "binop": null }, "value": "taxonConcept", - "start": 8114, - "end": 8126, + "start": 8020, + "end": 8032, "loc": { "start": { "line": 217, @@ -51074,8 +50267,8 @@ "postfix": false, "binop": null }, - "start": 8126, - "end": 8127, + "start": 8032, + "end": 8033, "loc": { "start": { "line": 217, @@ -51099,8 +50292,8 @@ "postfix": false, "binop": null }, - "start": 8128, - "end": 8129, + "start": 8034, + "end": 8035, "loc": { "start": { "line": 217, @@ -51127,8 +50320,8 @@ "updateContext": null }, "value": "return", - "start": 8136, - "end": 8142, + "start": 8042, + "end": 8048, "loc": { "start": { "line": 218, @@ -51152,8 +50345,8 @@ "postfix": false, "binop": null }, - "start": 8143, - "end": 8144, + "start": 8049, + "end": 8050, "loc": { "start": { "line": 218, @@ -51179,8 +50372,8 @@ "updateContext": null }, "value": "Specimen ", - "start": 8144, - "end": 8153, + "start": 8050, + "end": 8059, "loc": { "start": { "line": 218, @@ -51204,8 +50397,8 @@ "postfix": false, "binop": null }, - "start": 8153, - "end": 8155, + "start": 8059, + "end": 8061, "loc": { "start": { "line": 218, @@ -51232,8 +50425,8 @@ "updateContext": null }, "value": "this", - "start": 8155, - "end": 8159, + "start": 8061, + "end": 8065, "loc": { "start": { "line": 218, @@ -51258,8 +50451,8 @@ "binop": null, "updateContext": null }, - "start": 8159, - "end": 8160, + "start": 8065, + "end": 8066, "loc": { "start": { "line": 218, @@ -51284,8 +50477,8 @@ "binop": null }, "value": "occurrenceID", - "start": 8160, - "end": 8172, + "start": 8066, + "end": 8078, "loc": { "start": { "line": 218, @@ -51309,8 +50502,8 @@ "postfix": false, "binop": null }, - "start": 8172, - "end": 8173, + "start": 8078, + "end": 8079, "loc": { "start": { "line": 218, @@ -51336,8 +50529,8 @@ "updateContext": null }, "value": " identified as ", - "start": 8173, - "end": 8188, + "start": 8079, + "end": 8094, "loc": { "start": { "line": 218, @@ -51361,8 +50554,8 @@ "postfix": false, "binop": null }, - "start": 8188, - "end": 8190, + "start": 8094, + "end": 8096, "loc": { "start": { "line": 218, @@ -51389,8 +50582,8 @@ "updateContext": null }, "value": "new", - "start": 8190, - "end": 8193, + "start": 8096, + "end": 8099, "loc": { "start": { "line": 218, @@ -51415,8 +50608,8 @@ "binop": null }, "value": "TaxonConceptWrapper", - "start": 8194, - "end": 8213, + "start": 8100, + "end": 8119, "loc": { "start": { "line": 218, @@ -51440,8 +50633,8 @@ "postfix": false, "binop": null }, - "start": 8213, - "end": 8214, + "start": 8119, + "end": 8120, "loc": { "start": { "line": 218, @@ -51468,8 +50661,8 @@ "updateContext": null }, "value": "this", - "start": 8214, - "end": 8218, + "start": 8120, + "end": 8124, "loc": { "start": { "line": 218, @@ -51494,8 +50687,8 @@ "binop": null, "updateContext": null }, - "start": 8218, - "end": 8219, + "start": 8124, + "end": 8125, "loc": { "start": { "line": 218, @@ -51520,8 +50713,8 @@ "binop": null }, "value": "taxonConcept", - "start": 8219, - "end": 8231, + "start": 8125, + "end": 8137, "loc": { "start": { "line": 218, @@ -51545,8 +50738,8 @@ "postfix": false, "binop": null }, - "start": 8231, - "end": 8232, + "start": 8137, + "end": 8138, "loc": { "start": { "line": 218, @@ -51571,8 +50764,8 @@ "binop": null, "updateContext": null }, - "start": 8232, - "end": 8233, + "start": 8138, + "end": 8139, "loc": { "start": { "line": 218, @@ -51597,8 +50790,8 @@ "binop": null }, "value": "label", - "start": 8233, - "end": 8238, + "start": 8139, + "end": 8144, "loc": { "start": { "line": 218, @@ -51622,8 +50815,8 @@ "postfix": false, "binop": null }, - "start": 8238, - "end": 8239, + "start": 8144, + "end": 8145, "loc": { "start": { "line": 218, @@ -51649,8 +50842,8 @@ "updateContext": null }, "value": "", - "start": 8239, - "end": 8239, + "start": 8145, + "end": 8145, "loc": { "start": { "line": 218, @@ -51674,8 +50867,8 @@ "postfix": false, "binop": null }, - "start": 8239, - "end": 8240, + "start": 8145, + "end": 8146, "loc": { "start": { "line": 218, @@ -51700,8 +50893,8 @@ "binop": null, "updateContext": null }, - "start": 8240, - "end": 8241, + "start": 8146, + "end": 8147, "loc": { "start": { "line": 218, @@ -51725,8 +50918,8 @@ "postfix": false, "binop": null }, - "start": 8246, - "end": 8247, + "start": 8152, + "end": 8153, "loc": { "start": { "line": 219, @@ -51741,8 +50934,8 @@ { "type": "CommentLine", "value": " Return a label for this specimen.", - "start": 8253, - "end": 8289, + "start": 8159, + "end": 8195, "loc": { "start": { "line": 221, @@ -51769,8 +50962,8 @@ "updateContext": null }, "value": "return", - "start": 8294, - "end": 8300, + "start": 8200, + "end": 8206, "loc": { "start": { "line": 222, @@ -51794,8 +50987,8 @@ "postfix": false, "binop": null }, - "start": 8301, - "end": 8302, + "start": 8207, + "end": 8208, "loc": { "start": { "line": 222, @@ -51821,8 +51014,8 @@ "updateContext": null }, "value": "Specimen ", - "start": 8302, - "end": 8311, + "start": 8208, + "end": 8217, "loc": { "start": { "line": 222, @@ -51846,8 +51039,8 @@ "postfix": false, "binop": null }, - "start": 8311, - "end": 8313, + "start": 8217, + "end": 8219, "loc": { "start": { "line": 222, @@ -51874,8 +51067,8 @@ "updateContext": null }, "value": "this", - "start": 8313, - "end": 8317, + "start": 8219, + "end": 8223, "loc": { "start": { "line": 222, @@ -51900,8 +51093,8 @@ "binop": null, "updateContext": null }, - "start": 8317, - "end": 8318, + "start": 8223, + "end": 8224, "loc": { "start": { "line": 222, @@ -51926,8 +51119,8 @@ "binop": null }, "value": "occurrenceID", - "start": 8318, - "end": 8330, + "start": 8224, + "end": 8236, "loc": { "start": { "line": 222, @@ -51951,8 +51144,8 @@ "postfix": false, "binop": null }, - "start": 8330, - "end": 8331, + "start": 8236, + "end": 8237, "loc": { "start": { "line": 222, @@ -51978,8 +51171,8 @@ "updateContext": null }, "value": "", - "start": 8331, - "end": 8331, + "start": 8237, + "end": 8237, "loc": { "start": { "line": 222, @@ -52003,8 +51196,8 @@ "postfix": false, "binop": null }, - "start": 8331, - "end": 8332, + "start": 8237, + "end": 8238, "loc": { "start": { "line": 222, @@ -52029,8 +51222,8 @@ "binop": null, "updateContext": null }, - "start": 8332, - "end": 8333, + "start": 8238, + "end": 8239, "loc": { "start": { "line": 222, @@ -52054,8 +51247,8 @@ "postfix": false, "binop": null }, - "start": 8336, - "end": 8337, + "start": 8242, + "end": 8243, "loc": { "start": { "line": 223, @@ -52070,8 +51263,8 @@ { "type": "CommentBlock", "value": "* Return this specimen as an equivalentClass expression. ", - "start": 8341, - "end": 8402, + "start": 8247, + "end": 8308, "loc": { "start": { "line": 225, @@ -52096,8 +51289,8 @@ "binop": null }, "value": "get", - "start": 8405, - "end": 8408, + "start": 8311, + "end": 8314, "loc": { "start": { "line": 226, @@ -52122,8 +51315,8 @@ "binop": null }, "value": "asOWLEquivClass", - "start": 8409, - "end": 8424, + "start": 8315, + "end": 8330, "loc": { "start": { "line": 226, @@ -52147,8 +51340,8 @@ "postfix": false, "binop": null }, - "start": 8424, - "end": 8425, + "start": 8330, + "end": 8331, "loc": { "start": { "line": 226, @@ -52172,8 +51365,8 @@ "postfix": false, "binop": null }, - "start": 8425, - "end": 8426, + "start": 8331, + "end": 8332, "loc": { "start": { "line": 226, @@ -52197,8 +51390,8 @@ "postfix": false, "binop": null }, - "start": 8427, - "end": 8428, + "start": 8333, + "end": 8334, "loc": { "start": { "line": 226, @@ -52213,8 +51406,8 @@ { "type": "CommentLine", "value": " We can't do anything without an occurrence ID!", - "start": 8433, - "end": 8482, + "start": 8339, + "end": 8388, "loc": { "start": { "line": 227, @@ -52241,8 +51434,8 @@ "updateContext": null }, "value": "if", - "start": 8487, - "end": 8489, + "start": 8393, + "end": 8395, "loc": { "start": { "line": 228, @@ -52266,8 +51459,8 @@ "postfix": false, "binop": null }, - "start": 8490, - "end": 8491, + "start": 8396, + "end": 8397, "loc": { "start": { "line": 228, @@ -52293,8 +51486,8 @@ "updateContext": null }, "value": "!", - "start": 8491, - "end": 8492, + "start": 8397, + "end": 8398, "loc": { "start": { "line": 228, @@ -52321,8 +51514,8 @@ "updateContext": null }, "value": "this", - "start": 8492, - "end": 8496, + "start": 8398, + "end": 8402, "loc": { "start": { "line": 228, @@ -52347,8 +51540,8 @@ "binop": null, "updateContext": null }, - "start": 8496, - "end": 8497, + "start": 8402, + "end": 8403, "loc": { "start": { "line": 228, @@ -52373,8 +51566,8 @@ "binop": null }, "value": "occurrenceID", - "start": 8497, - "end": 8509, + "start": 8403, + "end": 8415, "loc": { "start": { "line": 228, @@ -52398,8 +51591,8 @@ "postfix": false, "binop": null }, - "start": 8509, - "end": 8510, + "start": 8415, + "end": 8416, "loc": { "start": { "line": 228, @@ -52426,8 +51619,8 @@ "updateContext": null }, "value": "return", - "start": 8511, - "end": 8517, + "start": 8417, + "end": 8423, "loc": { "start": { "line": 228, @@ -52452,8 +51645,8 @@ "binop": null }, "value": "undefined", - "start": 8518, - "end": 8527, + "start": 8424, + "end": 8433, "loc": { "start": { "line": 228, @@ -52478,8 +51671,8 @@ "binop": null, "updateContext": null }, - "start": 8527, - "end": 8528, + "start": 8433, + "end": 8434, "loc": { "start": { "line": 228, @@ -52494,8 +51687,8 @@ { "type": "CommentLine", "value": " TODO: Should we also match by this.taxonConcept is one is available?", - "start": 8534, - "end": 8605, + "start": 8440, + "end": 8511, "loc": { "start": { "line": 230, @@ -52510,8 +51703,8 @@ { "type": "CommentLine", "value": " Technically no, but it might be useful. Hmm.", - "start": 8610, - "end": 8657, + "start": 8516, + "end": 8563, "loc": { "start": { "line": 231, @@ -52526,8 +51719,8 @@ { "type": "CommentLine", "value": " Return as an OWL restriction.", - "start": 8663, - "end": 8695, + "start": 8569, + "end": 8601, "loc": { "start": { "line": 233, @@ -52554,8 +51747,8 @@ "updateContext": null }, "value": "return", - "start": 8700, - "end": 8706, + "start": 8606, + "end": 8612, "loc": { "start": { "line": 234, @@ -52579,8 +51772,8 @@ "postfix": false, "binop": null }, - "start": 8707, - "end": 8708, + "start": 8613, + "end": 8614, "loc": { "start": { "line": 234, @@ -52606,8 +51799,8 @@ "updateContext": null }, "value": "@type", - "start": 8715, - "end": 8722, + "start": 8621, + "end": 8628, "loc": { "start": { "line": 235, @@ -52632,8 +51825,8 @@ "binop": null, "updateContext": null }, - "start": 8722, - "end": 8723, + "start": 8628, + "end": 8629, "loc": { "start": { "line": 235, @@ -52659,8 +51852,8 @@ "updateContext": null }, "value": "owl:Restriction", - "start": 8724, - "end": 8741, + "start": 8630, + "end": 8647, "loc": { "start": { "line": 235, @@ -52685,8 +51878,8 @@ "binop": null, "updateContext": null }, - "start": 8741, - "end": 8742, + "start": 8647, + "end": 8648, "loc": { "start": { "line": 235, @@ -52711,8 +51904,8 @@ "binop": null }, "value": "onProperty", - "start": 8749, - "end": 8759, + "start": 8655, + "end": 8665, "loc": { "start": { "line": 236, @@ -52737,8 +51930,8 @@ "binop": null, "updateContext": null }, - "start": 8759, - "end": 8760, + "start": 8665, + "end": 8666, "loc": { "start": { "line": 236, @@ -52763,8 +51956,8 @@ "binop": null }, "value": "owlterms", - "start": 8761, - "end": 8769, + "start": 8667, + "end": 8675, "loc": { "start": { "line": 236, @@ -52789,8 +51982,8 @@ "binop": null, "updateContext": null }, - "start": 8769, - "end": 8770, + "start": 8675, + "end": 8676, "loc": { "start": { "line": 236, @@ -52815,8 +52008,8 @@ "binop": null }, "value": "DWC_OCCURRENCE_ID", - "start": 8770, - "end": 8787, + "start": 8676, + "end": 8693, "loc": { "start": { "line": 236, @@ -52841,8 +52034,8 @@ "binop": null, "updateContext": null }, - "start": 8787, - "end": 8788, + "start": 8693, + "end": 8694, "loc": { "start": { "line": 236, @@ -52867,8 +52060,8 @@ "binop": null }, "value": "hasValue", - "start": 8795, - "end": 8803, + "start": 8701, + "end": 8709, "loc": { "start": { "line": 237, @@ -52893,8 +52086,8 @@ "binop": null, "updateContext": null }, - "start": 8803, - "end": 8804, + "start": 8709, + "end": 8710, "loc": { "start": { "line": 237, @@ -52921,8 +52114,8 @@ "updateContext": null }, "value": "this", - "start": 8805, - "end": 8809, + "start": 8711, + "end": 8715, "loc": { "start": { "line": 237, @@ -52947,8 +52140,8 @@ "binop": null, "updateContext": null }, - "start": 8809, - "end": 8810, + "start": 8715, + "end": 8716, "loc": { "start": { "line": 237, @@ -52973,8 +52166,8 @@ "binop": null }, "value": "occurrenceID", - "start": 8810, - "end": 8822, + "start": 8716, + "end": 8728, "loc": { "start": { "line": 237, @@ -52999,8 +52192,8 @@ "binop": null, "updateContext": null }, - "start": 8822, - "end": 8823, + "start": 8728, + "end": 8729, "loc": { "start": { "line": 237, @@ -53024,8 +52217,8 @@ "postfix": false, "binop": null }, - "start": 8828, - "end": 8829, + "start": 8734, + "end": 8735, "loc": { "start": { "line": 238, @@ -53050,8 +52243,8 @@ "binop": null, "updateContext": null }, - "start": 8829, - "end": 8830, + "start": 8735, + "end": 8736, "loc": { "start": { "line": 238, @@ -53075,8 +52268,8 @@ "postfix": false, "binop": null }, - "start": 8833, - "end": 8834, + "start": 8739, + "end": 8740, "loc": { "start": { "line": 239, @@ -53100,8 +52293,8 @@ "postfix": false, "binop": null }, - "start": 8835, - "end": 8836, + "start": 8741, + "end": 8742, "loc": { "start": { "line": 240, @@ -53128,8 +52321,8 @@ "updateContext": null }, "value": "export", - "start": 8838, - "end": 8844, + "start": 8744, + "end": 8750, "loc": { "start": { "line": 242, @@ -53153,8 +52346,8 @@ "postfix": false, "binop": null }, - "start": 8845, - "end": 8846, + "start": 8751, + "end": 8752, "loc": { "start": { "line": 242, @@ -53179,8 +52372,8 @@ "binop": null }, "value": "SpecimenWrapper", - "start": 8847, - "end": 8862, + "start": 8753, + "end": 8768, "loc": { "start": { "line": 242, @@ -53205,8 +52398,8 @@ "binop": null, "updateContext": null }, - "start": 8862, - "end": 8863, + "start": 8768, + "end": 8769, "loc": { "start": { "line": 242, @@ -53230,8 +52423,8 @@ "postfix": false, "binop": null }, - "start": 8864, - "end": 8865, + "start": 8770, + "end": 8771, "loc": { "start": { "line": 242, @@ -53256,8 +52449,8 @@ "binop": null, "updateContext": null }, - "start": 8865, - "end": 8866, + "start": 8771, + "end": 8772, "loc": { "start": { "line": 242, @@ -53282,8 +52475,8 @@ "binop": null, "updateContext": null }, - "start": 8867, - "end": 8867, + "start": 8773, + "end": 8773, "loc": { "start": { "line": 243, diff --git a/docs/ast/source/wrappers/TaxonConceptWrapper.js.json b/docs/ast/source/wrappers/TaxonConceptWrapper.js.json index 10a9b9c5..3833c768 100644 --- a/docs/ast/source/wrappers/TaxonConceptWrapper.js.json +++ b/docs/ast/source/wrappers/TaxonConceptWrapper.js.json @@ -70,9 +70,9 @@ "line": 2, "column": 25 }, - "identifierName": "LXL9JK8W7XYSP" + "identifierName": "M50HFXW0VO944" }, - "name": "LXL9JK8W7XYSP", + "name": "M50HFXW0VO944", "leadingComments": null }, "leadingComments": null @@ -231,9 +231,9 @@ "line": 3, "column": 29 }, - "identifierName": "LXL9JK8W7XYSP" + "identifierName": "M50HFXW0VO944" }, - "name": "LXL9JK8W7XYSP" + "name": "M50HFXW0VO944" } } ], @@ -406,9 +406,9 @@ "line": 9, "column": 25 }, - "identifierName": "LXL9JK8W1GXXG" + "identifierName": "M50HFXW0K82UI" }, - "name": "LXL9JK8W1GXXG", + "name": "M50HFXW0K82UI", "leadingComments": null }, "leadingComments": null @@ -567,9 +567,9 @@ "line": 10, "column": 42 }, - "identifierName": "LXL9JK8W1GXXG" + "identifierName": "M50HFXW0K82UI" }, - "name": "LXL9JK8W1GXXG" + "name": "M50HFXW0K82UI" } } ], @@ -19227,7 +19227,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8W7XYSP", + "value": "M50HFXW0VO944", "start": 38, "end": 51, "loc": { @@ -19463,7 +19463,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8W7XYSP", + "value": "M50HFXW0VO944", "start": 84, "end": 97, "loc": { @@ -19761,7 +19761,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8W1GXXG", + "value": "M50HFXW0K82UI", "start": 229, "end": 242, "loc": { @@ -19997,7 +19997,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK8W1GXXG", + "value": "M50HFXW0K82UI", "start": 300, "end": 313, "loc": { diff --git a/docs/ast/source/wrappers/TaxonNameWrapper.js.json b/docs/ast/source/wrappers/TaxonNameWrapper.js.json index ac091e95..31f767f7 100644 --- a/docs/ast/source/wrappers/TaxonNameWrapper.js.json +++ b/docs/ast/source/wrappers/TaxonNameWrapper.js.json @@ -70,9 +70,9 @@ "line": 2, "column": 25 }, - "identifierName": "LXL9JK9A559BE" + "identifierName": "M50HFXW61ZY4F" }, - "name": "LXL9JK9A559BE", + "name": "M50HFXW61ZY4F", "leadingComments": null }, "leadingComments": null @@ -341,9 +341,9 @@ "line": 3, "column": 49 }, - "identifierName": "LXL9JK9A559BE" + "identifierName": "M50HFXW61ZY4F" }, - "name": "LXL9JK9A559BE" + "name": "M50HFXW61ZY4F" } } ], @@ -516,9 +516,9 @@ "line": 9, "column": 25 }, - "identifierName": "LXL9JK9AF9PKK" + "identifierName": "M50HFXW6GFFF3" }, - "name": "LXL9JK9AF9PKK", + "name": "M50HFXW6GFFF3", "leadingComments": null }, "leadingComments": null @@ -677,9 +677,9 @@ "line": 10, "column": 42 }, - "identifierName": "LXL9JK9AF9PKK" + "identifierName": "M50HFXW6GFFF3" }, - "name": "LXL9JK9AF9PKK" + "name": "M50HFXW6GFFF3" } } ], @@ -48879,7 +48879,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9A559BE", + "value": "M50HFXW61ZY4F", "start": 38, "end": 51, "loc": { @@ -49219,7 +49219,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9A559BE", + "value": "M50HFXW61ZY4F", "start": 104, "end": 117, "loc": { @@ -49517,7 +49517,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9AF9PKK", + "value": "M50HFXW6GFFF3", "start": 267, "end": 280, "loc": { @@ -49753,7 +49753,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9AF9PKK", + "value": "M50HFXW6GFFF3", "start": 345, "end": 358, "loc": { diff --git a/docs/ast/source/wrappers/TaxonomicUnitWrapper.js.json b/docs/ast/source/wrappers/TaxonomicUnitWrapper.js.json index dbe66c65..58c55e56 100644 --- a/docs/ast/source/wrappers/TaxonomicUnitWrapper.js.json +++ b/docs/ast/source/wrappers/TaxonomicUnitWrapper.js.json @@ -70,9 +70,9 @@ "line": 2, "column": 25 }, - "identifierName": "LXL9JK9ZA8O5P" + "identifierName": "M50HFXWHOXJ4P" }, - "name": "LXL9JK9ZA8O5P", + "name": "M50HFXWHOXJ4P", "leadingComments": null }, "leadingComments": null @@ -396,9 +396,9 @@ "line": 8, "column": 17 }, - "identifierName": "LXL9JK9ZA8O5P" + "identifierName": "M50HFXWHOXJ4P" }, - "name": "LXL9JK9ZA8O5P" + "name": "M50HFXWHOXJ4P" } } ], @@ -571,9 +571,9 @@ "line": 14, "column": 25 }, - "identifierName": "LXL9JK9ZRPNL2" + "identifierName": "M50HFXWH1YK6A" }, - "name": "LXL9JK9ZRPNL2", + "name": "M50HFXWH1YK6A", "leadingComments": null }, "leadingComments": null @@ -732,9 +732,9 @@ "line": 15, "column": 42 }, - "identifierName": "LXL9JK9ZRPNL2" + "identifierName": "M50HFXWH1YK6A" }, - "name": "LXL9JK9ZRPNL2" + "name": "M50HFXWH1YK6A" } } ], @@ -800,9 +800,9 @@ "line": 18, "column": 25 }, - "identifierName": "LXL9JK9ZO9F5X" + "identifierName": "M50HFXWHPZ8F9" }, - "name": "LXL9JK9ZO9F5X", + "name": "M50HFXWHPZ8F9", "leadingComments": null }, "leadingComments": null @@ -961,9 +961,9 @@ "line": 19, "column": 41 }, - "identifierName": "LXL9JK9ZO9F5X" + "identifierName": "M50HFXWHPZ8F9" }, - "name": "LXL9JK9ZO9F5X" + "name": "M50HFXWHPZ8F9" } } ], @@ -1029,9 +1029,9 @@ "line": 22, "column": 25 }, - "identifierName": "LXL9JK9ZJD9PZ" + "identifierName": "M50HFXWHN2L13" }, - "name": "LXL9JK9ZJD9PZ", + "name": "M50HFXWHN2L13", "leadingComments": null }, "leadingComments": null @@ -1190,9 +1190,9 @@ "line": 23, "column": 45 }, - "identifierName": "LXL9JK9ZJD9PZ" + "identifierName": "M50HFXWHN2L13" }, - "name": "LXL9JK9ZJD9PZ" + "name": "M50HFXWHN2L13" } } ], @@ -23530,7 +23530,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9ZA8O5P", + "value": "M50HFXWHOXJ4P", "start": 38, "end": 51, "loc": { @@ -23948,7 +23948,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9ZA8O5P", + "value": "M50HFXWHOXJ4P", "start": 121, "end": 134, "loc": { @@ -24246,7 +24246,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9ZRPNL2", + "value": "M50HFXWH1YK6A", "start": 325, "end": 338, "loc": { @@ -24482,7 +24482,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9ZRPNL2", + "value": "M50HFXWH1YK6A", "start": 403, "end": 416, "loc": { @@ -24631,7 +24631,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9ZO9F5X", + "value": "M50HFXWHPZ8F9", "start": 472, "end": 485, "loc": { @@ -24867,7 +24867,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9ZO9F5X", + "value": "M50HFXWHPZ8F9", "start": 541, "end": 554, "loc": { @@ -25016,7 +25016,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9ZJD9PZ", + "value": "M50HFXWHN2L13", "start": 606, "end": 619, "loc": { @@ -25252,7 +25252,7 @@ "postfix": false, "binop": null }, - "value": "LXL9JK9ZJD9PZ", + "value": "M50HFXWHN2L13", "start": 683, "end": 696, "loc": { diff --git a/docs/class/src/wrappers/SpecimenWrapper.js~SpecimenWrapper.html b/docs/class/src/wrappers/SpecimenWrapper.js~SpecimenWrapper.html index c18fddf1..bb5730fe 100644 --- a/docs/class/src/wrappers/SpecimenWrapper.js~SpecimenWrapper.html +++ b/docs/class/src/wrappers/SpecimenWrapper.js~SpecimenWrapper.html @@ -75,8 +75,8 @@

SpecimenWrapper

diff --git a/docs/file/src/wrappers/SpecimenWrapper.js.html b/docs/file/src/wrappers/SpecimenWrapper.js.html index d0c956f6..ac477418 100644 --- a/docs/file/src/wrappers/SpecimenWrapper.js.html +++ b/docs/file/src/wrappers/SpecimenWrapper.js.html @@ -55,8 +55,8 @@ * * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen. * - Based on http://rs.tdwg.org/dwc/terms/Occurrence - * - Should have a dwc:occurrenceID with the occurrence identifier. - * - Should have a dwc:basisOfRecord to indicate what sort of occurrence this is. + * - Should have a occurrenceID with the occurrence identifier. + * - Should have a basisOfRecord to indicate what sort of occurrence this is. * * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated @@ -83,7 +83,7 @@ const normalizedSpecimen = { '@type': SpecimenWrapper.TYPE_SPECIMEN, label: wrapped.label, - 'dwc:basisOfRecord': wrapped.basisOfRecord, + basisOfRecord: wrapped.basisOfRecord, occurrenceID: wrapped.occurrenceID, catalogNumber: wrapped.catalogNumber, institutionCode: wrapped.institutionCode, @@ -102,12 +102,12 @@ static fromOccurrenceID(occurrenceID, basisOfRecord = 'PreservedSpecimen') { // Copy the occurrence ID so we can truncate it if necessary. let occurID = occurrenceID; - if (occurID.startsWith('urn:catalog:')) occurID = occurID.substr(12); + if (occurID.startsWith('urn:catalog:')) occurID = occurID.substring(12); // Prepare the specimen. const specimen = { '@type': SpecimenWrapper.TYPE_SPECIMEN, - 'dwc:basisOfRecord': basisOfRecord, + basisOfRecord, occurrenceID: occurID, }; @@ -204,7 +204,7 @@ */ get occurrenceID() { // Return the occurrenceID if it exists. - if (has(this.specimen, 'occurrenceID') && this.specimen.occurrenceID.trim() !== '') { + if (has(this.specimen, 'occurrenceID')) { return this.specimen.occurrenceID.trim(); } @@ -230,7 +230,7 @@ * Return the basis of record, if one is present. */ get basisOfRecord() { - if (has(this.specimen, 'dwc:basisOfRecord')) return this.specimen['dwc:basisOfRecord']; + if (has(this.specimen, 'basisOfRecord')) return this.specimen.basisOfRecord; return undefined; } @@ -239,7 +239,7 @@ * recommended values. */ set basisOfRecord(bor) { - this.specimen['dwc:basisOfRecord'] = bor; + this.specimen.basisOfRecord = bor; } /** Return this specimen as a taxon concept if it contains taxon name information. */ diff --git a/docs/index.html b/docs/index.html index b5fa5447..42896916 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,13 +43,17 @@

phyx.js

Build Status -DOI

+DOI +NPM Version

The Phyloreference Exchange (PHYX) format is a JSON representation that can be used to store and transfer definitions of phyloreferences. This library provides classes to help interpret some parts of these files, and for transforming an entire Phyx file into a JSON-LD representation that can be reasoned over with an OWL 2 DL reasoner. See the Phyloreference Curation Tool or the Clade Ontology for examples of its usage.

+

Usage

You can install phyx.js using npm:

+
$ npm install @phyloref/phyx
+

Tutorials demonstrating the use of phyx.js are available.

Citation

phyx.js should be cited by citing our publication documenting the Phyx format and phyx.js.

diff --git a/docs/index.json b/docs/index.json index 4b90575b..e6c2d1fc 100644 --- a/docs/index.json +++ b/docs/index.json @@ -569,7 +569,7 @@ "name": "src/matchers/TaxonomicUnitMatcher.js", "content": "const { TaxonomicUnitWrapper } = require('../wrappers/TaxonomicUnitWrapper');\nconst { TaxonConceptWrapper } = require('../wrappers/TaxonConceptWrapper');\nconst { SpecimenWrapper } = require('../wrappers/SpecimenWrapper');\n\n/**\n * The TaxonomicUnitMatcher matches pairs of taxonomic units and provides\n * a consistent report on:\n * - Which taxonomic units have matched, and\n * - Why the match occurred.\n *\n * In Model 2.0, we start by using direct matching in OWL, so this should no longer\n * be needed. However, I'll leave this around to provide matching in the\n * Curation Tool UI and in case it's needed again later.\n */\nclass TaxonomicUnitMatcher {\n /**\n * Create a Taxonomic Unit Matcher to match two taxonomic units. Matching\n * will occur immediately, so when this method returns, you can check\n * tuMatch.matched and tuMatch.matchReason to determine if the two TUs matched\n * and why.\n */\n constructor(tunit1, tunit2) {\n this.tunit1 = tunit1;\n this.tunit2 = tunit2;\n\n // Set up places to store the match results.\n this.matched = undefined; // Boolean variable for storing whether these TUnits matched.\n this.matchReason = undefined; // The reason provided for this match.\n\n // Execute the match.\n this.match();\n }\n\n /** Return this TUMatch as a JSON object for insertion into the PHYX file. */\n asJSONLD(idIRI) {\n if (!this.matched) return undefined;\n\n return {\n '@id': idIRI,\n reason: this.matchReason,\n matchesTaxonomicUnits: [\n { '@id': this.tunit1['@id'] },\n { '@id': this.tunit2['@id'] },\n ],\n };\n }\n\n /** Try to match the two taxonomic units using a number of matching methods. */\n match() {\n if (\n this.matchByNameComplete()\n || this.matchByExternalReferences()\n || this.matchByOccurrenceID()\n ) {\n this.matched = true;\n } else {\n this.matched = false;\n this.matchReason = undefined;\n }\n }\n\n /** Try to match by nameComplete, and return true if it could be matched. */\n matchByNameComplete() {\n // Note that this doesn't apply just to taxon concepts -- we try to match\n // any taxonomic units that have nameComplete, which might be taxon concepts\n // OR specimens with taxonomic units.\n const wrappedTName1 = new TaxonConceptWrapper(this.tunit1);\n const wrappedTName2 = new TaxonConceptWrapper(this.tunit2);\n\n if (\n wrappedTName1.nameComplete && wrappedTName2.nameComplete\n && wrappedTName1.nameComplete === wrappedTName2.nameComplete\n ) {\n this.matchReason = `Taxon name '${wrappedTName1.label}' and taxon name '${wrappedTName2.label}' share the same complete name`;\n return true;\n }\n\n return false;\n }\n\n /** Match by external references. */\n matchByExternalReferences() {\n const wrappedTUnit1 = new TaxonomicUnitWrapper(this.tunit1);\n const wrappedTUnit2 = new TaxonomicUnitWrapper(this.tunit2);\n\n const externalRefs1 = wrappedTUnit1.externalReferences;\n const externalRefs2 = wrappedTUnit2.externalReferences;\n\n return externalRefs1.some(\n extref1 => externalRefs2.some(\n (extref2) => {\n if (\n extref1\n && extref2\n && (extref1.toLowerCase() === extref2.toLowerCase())\n ) {\n this.matchReason = `External reference '${extref1}' is shared by taxonomic unit ${this.tunit1} and ${this.tunit2}`;\n return true;\n }\n\n return false;\n }\n )\n );\n }\n\n /** Match by occurrence ID */\n matchByOccurrenceID() {\n // Are both TUs specimens?\n const wrappedTUnit1 = new TaxonomicUnitWrapper(this.tunit1);\n const wrappedTUnit2 = new TaxonomicUnitWrapper(this.tunit2);\n\n if (!wrappedTUnit1.types.includes(TaxonomicUnitWrapper.TYPE_SPECIMEN)) return false;\n if (!wrappedTUnit2.types.includes(TaxonomicUnitWrapper.TYPE_SPECIMEN)) return false;\n\n // Occurrence IDs from both taxonomic units.\n const wrappedSpecimen1 = new SpecimenWrapper(this.tunit1);\n const wrappedSpecimen2 = new SpecimenWrapper(this.tunit2);\n\n if (\n wrappedSpecimen1.occurrenceID && wrappedSpecimen2.occurrenceID\n && wrappedSpecimen1.occurrenceID === wrappedSpecimen2.occurrenceID\n ) {\n this.matchReason = `Specimen identifier '${wrappedSpecimen1.occurrenceID}' is shared by taxonomic units`;\n\n return true;\n }\n\n return false;\n }\n}\n\nmodule.exports = {\n TaxonomicUnitMatcher,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/matchers/TaxonomicUnitMatcher.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/matchers/TaxonomicUnitMatcher.js", "access": "public", "description": null, "lineNumber": 1 @@ -837,7 +837,7 @@ "name": "src/wrappers/CitationWrapper.js", "content": "/**\n * The CitationWrapper wraps a single citation in the Phyx document.\n * Based on BibJSON (http://okfnlabs.org/bibjson/).\n */\n\nconst { has, isEmpty } = require('lodash');\n\nclass CitationWrapper {\n /**\n * Construct a CitationWrapper.\n */\n constructor(citation) {\n this.citation = citation;\n }\n\n /**\n * Return a normalized form of a citation.\n *\n * I'm not really sure how to normalize a citation, but the main thing we can do is delete any key\n * that is equivalent to ''. We could interconvert between `name` and\n * `firstname/lastname/middlename`, but that's not really equivalent, is it?\n */\n static normalize(citation) {\n const normalizedCitation = {};\n Object.keys(citation).forEach((key) => {\n // As long as citation[key] has a reasonable value, we copy it into the normalized citation.\n if (citation[key]) {\n normalizedCitation[key] = citation[key];\n }\n });\n return normalizedCitation;\n }\n\n /**\n * Helper method to return a single name for a given agent entry.\n * The algorithm we use is:\n * - `name`, if one is present.\n * - Some combination of `lastname`, `firstname` and `middlename`, if present.\n */\n static getAgentName(agent) {\n if (has(agent, 'name')) return agent.name;\n if (has(agent, 'lastname')) {\n if (has(agent, 'firstname')) {\n if (has(agent, 'middlename')) {\n return `${agent.firstname} ${agent.middlename} ${agent.lastname}`;\n }\n\n return `${agent.firstname} ${agent.lastname}`;\n }\n return `${agent.lastname}`;\n }\n return '(Unable to read name)';\n }\n\n /** Returns a single string with the entire bibliographic citation. */\n toString() {\n if (!this.citation || isEmpty(this.citation)) return undefined;\n\n // If we already have a bibliographic citation, we can just return that.\n if (has(this.citation, 'bibliographicCitation')) return this.citation.bibliographicCitation;\n\n let authors = (this.citation.authors || []).map(CitationWrapper.getAgentName);\n if (authors.length === 0) authors = ['Anonymous'];\n if (authors.length > 2) authors = [`${authors[0]} et al`];\n\n // The title is based on citation.title, but may include citation.section as well.\n let title = this.citation.title || 'Untitled';\n if (has(this.citation, 'booktitle')) title = `${title} in ${this.citation.booktitle || 'Untitled book'}`;\n let authorsAndTitle = `${authors.join(' and ')} (${this.citation.year || 'n.d.'}) ${title}`;\n\n const editorLists = [];\n const editors = (this.citation.editors || []).map(CitationWrapper.getAgentName);\n if (editors.length > 0) editorLists.push(`eds: ${editors.join(' and ')}`);\n\n const seriesEditors = (this.citation.series_editors || []).map(CitationWrapper.getAgentName);\n if (seriesEditors.length > 0) editorLists.push(`series eds: ${seriesEditors.join(' and ')}`);\n\n if (editorLists.length > 0) authorsAndTitle += ` [${editorLists.join(', ')}]`;\n\n if (has(this.citation, 'section_title')) {\n authorsAndTitle += ` (section: ${this.citation.section_title})`;\n }\n\n // Additional info stores details that should be at the end of the figure number,\n // DOIs, URLs, ISBNs and so on.\n let additionalInfo = ' ';\n if (has(this.citation, 'figure')) additionalInfo += ` fig ${this.citation.figure}`;\n\n // Add DOIs and URLs.\n additionalInfo += (this.citation.identifier || [])\n .filter(id => id.type === 'doi')\n .map(doi => ` doi: ${doi.id}`)\n .join('');\n additionalInfo += (this.citation.link || []).map(link => ` URL: ${link.url}`).join('');\n\n additionalInfo += (this.citation.identifier || [])\n .filter(id => id.type === 'isbn')\n .map(isbn => ` ISBN: ${isbn.id}`)\n .join('');\n\n // A citation for a journal article should be different from others.\n if (has(this.citation, 'journal') && this.citation.type === 'article') {\n const journal = this.citation.journal;\n const journalIssue = (has(journal, 'number')) ? `(${journal.number})` : '';\n const pages = (has(journal, 'pages')) ? `:${journal.pages}` : '';\n additionalInfo += (journal.identifier || [])\n .filter(id => id.type === 'issn')\n .map(issn => `ISSN: ${issn.id} `)\n .join('');\n return `${authorsAndTitle} ${journal.name || 'Unknown journal'} ${journal.volume || 'Unknown volume'}${journalIssue}${pages}${additionalInfo}`;\n }\n\n // If we are here, this must be a book or a book_section.\n if (has(this.citation, 'pages')) additionalInfo += ` pages: ${this.citation.pages}`;\n\n if (has(this.citation, 'publisher') && has(this.citation, 'city')) {\n return `${authorsAndTitle} ${this.citation.publisher}, ${this.citation.city}${additionalInfo}`;\n }\n\n if (has(this.citation, 'publisher')) {\n return `${authorsAndTitle} ${this.citation.publisher}${additionalInfo}`;\n }\n\n return `${authorsAndTitle}${additionalInfo}`.trim();\n }\n}\n\nmodule.exports = {\n CitationWrapper,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/wrappers/CitationWrapper.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/wrappers/CitationWrapper.js", "access": "public", "description": null, "lineNumber": 1 @@ -986,7 +986,7 @@ "name": "src/wrappers/PhylogenyWrapper.js", "content": "/**\n * PhylogenyWrapper\n */\n\nconst {\n has,\n cloneDeep,\n} = require('lodash');\n\n/** Used to parse Newick strings. */\nconst newickJs = require('newick-js');\n\n/** OWL terms to be used here. */\nconst owlterms = require('../utils/owlterms');\n\nconst { TaxonomicUnitWrapper } = require('./TaxonomicUnitWrapper');\nconst { TaxonomicUnitMatcher } = require('../matchers/TaxonomicUnitMatcher');\nconst { CitationWrapper } = require('./CitationWrapper');\n\nclass PhylogenyWrapper {\n // Wraps a Phylogeny in a PHYX file and provides access to node, node labels\n // and other information. Remember that a Phylogeny also has the\n // additionalNodeProperties object which provides additional properties for\n // nodes.\n\n constructor(phylogeny, defaultNomenCode = owlterms.UNKNOWN_CODE) {\n // Construct a phylogeny based on a Phylogeny object in a PHYX phylogeny.\n // Note that this version ONLY uses the `newick` property to determine the\n // phylogeny: if other representations are included (such as a node-based\n // format, as used in JSON-LD), they will be ignored and possibly overwritten\n // during export. So, to update the phylogeny, please only update the newick\n // string!\n //\n // This ensures that we don't need to reconcile between different\n // possible representations of a phylogeny.\n this.phylogeny = phylogeny;\n this.defaultNomenCode = defaultNomenCode;\n }\n\n /**\n * Return a normalized form of the phylogeny.\n */\n static normalize(phylogeny) {\n const normalizedPhylogeny = cloneDeep(phylogeny);\n\n // We could normalize the Newick string, but that doesn't seem very nice.\n\n // Normalize the source if there is one.\n if ('source' in phylogeny) {\n normalizedPhylogeny.source = CitationWrapper.normalize(phylogeny.source || {});\n }\n\n return normalizedPhylogeny;\n }\n\n static getErrorsInNewickString(newick) {\n // Given a Newick string, return a list of errors found in parsing this\n // string. The errors are returned as a list of objects, each of which\n // has two properties:\n // - title: A short title of the error, distinct for each type of error.\n // - message: A longer description of the error, which might include\n // information specific to a particular error.\n //\n // We try to order errors from most helpful ('Unbalanced parentheses in\n // Newick string') to least helpful ('Error parsing phylogeny').\n const newickTrimmed = newick.trim();\n const errors = [];\n\n // Look for an empty Newick string.\n if (newickTrimmed === '' || newickTrimmed === '()' || newickTrimmed === '();') {\n // None of the later errors are relevant here, so bail out now.\n return [{\n title: 'No phylogeny entered',\n message: 'Click on \"Edit as Newick\" to enter a phylogeny below.',\n }];\n }\n\n // Look for an unbalanced Newick string.\n let parenLevels = 0;\n for (let x = 0; x < newickTrimmed.length; x += 1) {\n if (newickTrimmed[x] === '(') parenLevels += 1;\n if (newickTrimmed[x] === ')') parenLevels -= 1;\n }\n\n if (parenLevels !== 0) {\n errors.push({\n title: 'Unbalanced parentheses in Newick string',\n message: (parenLevels > 0\n ? `You have ${parenLevels} too many open parentheses`\n : `You have ${-parenLevels} too few open parentheses`\n ),\n });\n }\n\n // Finally, try parsing it with newickJs.parse() and see if we get an error.\n try {\n newickJs.parse(newickTrimmed);\n } catch (ex) {\n errors.push({\n title: 'Error parsing phylogeny',\n message: `An error occured while parsing this phylogeny: ${ex.message}`,\n });\n }\n\n return errors;\n }\n\n static recurseNodes(node, func, nodeCount = 0, parentCount = undefined) {\n // Recurse through PhyloTree nodes, executing function on each node.\n // - node: The node to recurse from. The function will be called on node\n // *before* being called on its children.\n // - func: The function to call on `node` and all of its children.\n // - nodeCount: `node` will be called with this nodeCount. All of its\n // children will be called with consecutively increasing nodeCounts.\n // - parentCount: The nodeCount associated with the parent of this node\n // within this run of recurseNodes. For instance, immediate children\n // of `node` will have a parentCount of 0. By default, `node` itself\n // will have a parentCount of `undefined`.\n // When the function `func` is called, it is given three arguments:\n // - The current node object (initially: `node`)\n // - The count of the current node object (initially: `nodeCount`)\n // - The parent count of the current node object (initially: `parentCount`)\n func(node, nodeCount, parentCount);\n\n let nextID = nodeCount + 1;\n\n // Recurse through all children of this node.\n if (has(node, 'children')) {\n node.children.forEach((child) => {\n nextID = PhylogenyWrapper.recurseNodes(\n child,\n func,\n nextID,\n nodeCount\n );\n });\n }\n\n return nextID;\n }\n\n getTaxonomicUnits(nodeType = 'both') {\n // Return a list of all taxonomic units in this phylogeny.\n // Node labels will be extracted from:\n // - internal nodes only (if nodeType == 'internal')\n // - terminal nodes only (if nodeType == 'terminal')\n // - both internal and terminal nodes (if nodeType == 'both')\n //\n // See `getTaxonomicUnitsForNodeLabel` to see how node labels are converted\n // into node labels, but in brief:\n // 1. We look for taxonomic units in the additionalNodeProperties.\n // 2. If none are found, we attempt to parse the node label as a scientific name.\n //\n const nodeLabels = this.getNodeLabels(nodeType);\n const tunits = new Set();\n\n nodeLabels.forEach(\n nodeLabel => this.getTaxonomicUnitsForNodeLabel(nodeLabel)\n .forEach(tunit => tunits.add(tunit))\n );\n\n return tunits;\n }\n\n getNodeLabels(nodeType = 'both') {\n // Return a list of all the node labels in this phylogeny.\n //\n // nodeType can be one of:\n // - 'internal': Return node labels on internal nodes.\n // - 'terminal': Return node labels on terminal nodes.\n // - 'both': Return node labels on both internal and terminal nodes.\n\n // Parse the phylogeny (will throw an exception if parsing failed).\n const { graph } = newickJs.parse(this.phylogeny.newick || '()');\n const [vertices, arcs] = graph;\n\n if (nodeType === 'both') {\n // Return all node labels.\n return Array.from(\n new Set(\n Array.from(vertices)\n .map(vertex => vertex.label)\n .filter(label => label !== undefined)\n )\n );\n }\n\n if (nodeType === 'internal') {\n // Return the internal nodes (those with atleast one child).\n return Array.from(new Set(\n Array.from(arcs)\n .map(arc => arc[0].label) // Retrieve the label of the parent vertex in this arc.\n .filter(label => label !== undefined)\n ));\n }\n\n if (nodeType === 'terminal') {\n // Return the terminal nodes. This would require calculating the children\n // of every vertex in the graph and then identifying vertices without any\n // children.\n //\n // A quicker and dirtier way to do this is by removing internal labels\n // from the list of all node labels. This will report an incorrect result\n // if an internal node has the same label as a terminal node, but at that\n // point a lot of other assumptions are going to fail, too, so this is\n // probably good enough for now.\n const allLabels = this.getNodeLabels('both');\n const internalLabels = new Set(this.getNodeLabels('internal'));\n\n return allLabels.filter(label => !internalLabels.has(label));\n }\n\n throw new Error(`Unknown nodeType: '${nodeType}'`);\n }\n\n /**\n * Return a list of taxonomic units for a node label.\n *\n * If the additionalNodeProperties for this node label includes taxonomic units\n * (using `representsTaxonomicUnits` = obo:CDAO_0000187), then those taxonomic\n * units are used. Otherwise, one will be constructed using the default\n * nomenclatural code set up when this PhylogenyWrapper was set up.\n */\n getTaxonomicUnitsForNodeLabel(nodeLabel) {\n // Look up additional node properties.\n let additionalNodeProperties = {};\n if (\n has(this.phylogeny, 'additionalNodeProperties')\n && has(this.phylogeny.additionalNodeProperties, nodeLabel)\n ) {\n additionalNodeProperties = this.phylogeny.additionalNodeProperties[nodeLabel];\n }\n\n // If there are explicit taxonomic units in the\n // representsTaxonomicUnits property, we need to use those.\n if (has(additionalNodeProperties, 'representsTaxonomicUnits')) {\n return additionalNodeProperties.representsTaxonomicUnits;\n }\n\n // If that doesn't work, we can try to extract scientific names from\n // the node label. Note that taxonomic units will NOT be extracted from\n // the label if there is a taxonomic unit present!\n //\n // Note that old-style taxonomic units were lists while new-style taxonomic\n // units are single objects. So we turn it into a single entry list here.\n const tunit = TaxonomicUnitWrapper.fromLabel(nodeLabel.trim(), this.defaultNomenCode);\n if (tunit) return [tunit];\n return []; // No TUnit? Return the empty list.\n }\n\n getNodeLabelsMatchedBySpecifier(specifier) {\n // Return a list of node labels matched by a given specifier on\n // a given phylogeny.\n\n return this.getNodeLabels().filter((nodeLabel) => {\n // Find all the taxonomic units associated with the specifier and\n // with the node.\n const nodeTUnits = this.getTaxonomicUnitsForNodeLabel(nodeLabel);\n\n // Attempt pairwise matches between taxonomic units in the specifier\n // and associated with the node.\n return nodeTUnits.some(\n tunit => new TaxonomicUnitMatcher(specifier, tunit).matched\n );\n });\n }\n\n static getParsedNewick(newick) {\n // We previously used phylotree.js's Newick parser to parse Newick into a\n // tree-like structure. However, this is difficult to integrate using NPM.\n // This method provides a similar facility using the newick-js library.\n //\n // Throws an exception if the Newick could not be parsed.\n const { graph, root, rootWeight } = newickJs.parse(newick);\n const [, arcs] = graph;\n\n // Go through the arcs, assigning 'children' to the appropriate parent node.\n arcs.forEach((arc) => {\n const [parent, child, weight] = arc;\n\n // Add child to parent.children.\n if (!has(parent, 'children')) parent.children = [];\n parent.children.push(child);\n\n // Phylotree.js uses 'name' instead of 'label'.\n if (has(parent, 'label')) { parent.name = parent.label; }\n if (has(child, 'label')) { child.name = child.label; }\n\n // Phylotree.js uses 'attribute' to store weights, so we'll store it there as well.\n if (!has(child, 'attribute') && !Number.isNaN(weight)) child.attribute = weight;\n });\n\n // Set root 'attribute' to root weight.\n if (!has(root, 'attribute') && !Number.isNaN(rootWeight)) root.attribute = rootWeight;\n\n return { json: root };\n }\n\n getParsedNewickWithIRIs(baseIRI, newickParser = PhylogenyWrapper.getParsedNewick) {\n // Return the parsed Newick string, but with EVERY node given an IRI.\n // - baseIRI: The base IRI to use for node elements (e.g. ':phylogeny1').\n // Node IDs are generated by concatenating `_node${number}` to the end of\n // the baseIRI.\n // - newickParser: A method for converting a Newick string to a object-based\n // representation. The static method PhylogenyWrapper.getParsedNewick() is\n // used if none is provided.\n\n const parsed = newickParser(this.phylogeny.newick || '()');\n if (has(parsed, 'json')) {\n PhylogenyWrapper.recurseNodes(parsed.json, (node, nodeCount) => {\n // Start with the additional node properties.\n const nodeAsJSONLD = node;\n\n // Set @id and @type.\n const nodeIRI = `${baseIRI}_node${nodeCount}`;\n nodeAsJSONLD['@id'] = nodeIRI;\n });\n }\n\n return parsed;\n }\n\n getNodesAsJSONLD(baseIRI, newickParser) {\n // Returns a list of all nodes in this phylogeny as a series of nodes.\n // - baseIRI: The base IRI to use for node elements (e.g. ':phylogeny1').\n // Node IDs are generated by concatenating `_node${number}` to the end of\n // the baseIRI.\n // - newickParser: A method for converting a Newick string to a object-based\n // representation. See PhylogenyWrapper.getParsedNewick() for an example\n // implementation.\n\n // List of nodes we have identified.\n const nodes = [];\n\n // We need to track the identifiers we give each node as we go.\n const nodesById = {};\n const nodeIdsByParentId = {};\n\n // Extract the newick string.\n const { additionalNodeProperties } = this.phylogeny;\n\n // Parse the Newick string; if parseable, recurse through the nodes,\n // added them to the list of JSON-LD nodes as we go.\n\n const parsed = this.getParsedNewickWithIRIs(baseIRI, newickParser);\n if (has(parsed, 'json')) {\n PhylogenyWrapper.recurseNodes(parsed.json, (node, nodeCount, parentCount) => {\n // Start with the additional node properties.\n const nodeAsJSONLD = {};\n\n // Set @id and @type. '@id' should already be set by getParsedNewickWithIRIs()!\n const nodeIRI = node['@id'];\n nodeAsJSONLD['@id'] = nodeIRI;\n\n // Since we may need to add multiple classes into the rdf:type, we need\n // to make @type an array. However, the JSON-LD library we use in JPhyloRef\n // can't support @type being an array (despite that being in the standard,\n // see https://w3c.github.io/json-ld-syntax/#example-14-specifying-multiple-types-for-a-node),\n // so we fall back to using rdf:type instead.\n nodeAsJSONLD[owlterms.RDF_TYPE] = [{ '@id': owlterms.CDAO_NODE }];\n\n // Add labels, additional node properties and taxonomic units.\n if (has(node, 'name') && node.name !== '') {\n // Add node label.\n nodeAsJSONLD.labels = [node.name];\n\n // Add additional node properties, if any.\n if (additionalNodeProperties && has(additionalNodeProperties, node.name)) {\n Object.keys(additionalNodeProperties[node.name]).forEach((key) => {\n nodeAsJSONLD[key] = additionalNodeProperties[node.name][key];\n });\n }\n\n // Add taxonomic units into the metadata.\n nodeAsJSONLD.representsTaxonomicUnits = this.getTaxonomicUnitsForNodeLabel(node.name);\n\n // Add it into the @type so we can reason over it.\n nodeAsJSONLD.representsTaxonomicUnits.forEach((tu) => {\n const wrappedTUnit = new TaxonomicUnitWrapper(tu);\n\n if (wrappedTUnit) {\n const equivClass = wrappedTUnit.asOWLEquivClass;\n if (equivClass) {\n nodeAsJSONLD[owlterms.RDF_TYPE].push(\n {\n '@type': 'owl:Restriction',\n onProperty: owlterms.CDAO_REPRESENTS_TU,\n someValuesFrom: equivClass,\n }\n );\n }\n }\n });\n }\n\n // Add references to parents and siblings.\n if (parentCount !== undefined) {\n const parentIRI = `${baseIRI}_node${parentCount}`;\n nodeAsJSONLD.parent = parentIRI;\n\n // Update list of nodes by parent IDs.\n if (!has(nodeIdsByParentId, parentIRI)) {\n nodeIdsByParentId[parentIRI] = new Set();\n }\n nodeIdsByParentId[parentIRI].add(nodeIRI);\n }\n\n // Add nodeAsJSONLD to list\n if (has(nodesById, nodeIRI)) {\n throw new Error(`Error in programming: duplicate node IRI generated (${nodeIRI})`);\n }\n nodesById[nodeIRI] = nodeAsJSONLD;\n nodes.push(nodeAsJSONLD);\n });\n }\n\n // Go through nodes again and set children and sibling relationships.\n Object.keys(nodeIdsByParentId).forEach((parentId) => {\n // What are the children of this parentId?\n const childrenIDs = Array.from(nodeIdsByParentId[parentId]);\n const children = childrenIDs.map(childId => nodesById[childId]);\n\n // Is this the root node?\n if (has(nodesById, parentId)) {\n const parent = nodesById[parentId];\n parent.children = childrenIDs;\n }\n\n children.forEach((child) => {\n const childToModify = child;\n // Add all other sibling to node.siblings, but don't add this node itself!\n childToModify.siblings = childrenIDs.filter(childId => childId !== child['@id']);\n });\n });\n\n return nodes;\n }\n\n asJSONLD(fallbackIRI, newickParser) {\n // Export this phylogeny as JSON-LD.\n // - fallbackIRI: The fallback IRI to use for this phylogeny if it does not\n // already have an '@id' set.\n // - newickParser: A function that parses a Newick string and returns a\n // an object based representation of this phylogeny. If not set, the\n // static method PhylogenyWrapper.getParsedNewick will be used instead.\n\n // Create a copy to export.\n const phylogenyAsJSONLD = JSON.parse(JSON.stringify(this.phylogeny));\n\n // Set name and class for phylogeny. If no '@id' is set, use the provided\n // fallbackIRI.\n if (!has(phylogenyAsJSONLD, '@id')) phylogenyAsJSONLD['@id'] = fallbackIRI;\n phylogenyAsJSONLD['@type'] = 'phyloref:ReferencePhylogenyEvidence';\n\n // Translate nodes into JSON-LD objects.\n phylogenyAsJSONLD.nodes = this.getNodesAsJSONLD(phylogenyAsJSONLD['@id'], newickParser);\n if (phylogenyAsJSONLD.nodes.length > 0) {\n // We don't have a better way to identify the root node, so we just\n // default to the first one.\n phylogenyAsJSONLD.hasRootNode = {\n '@id': phylogenyAsJSONLD.nodes[0]['@id'],\n };\n }\n\n // Add a bibliographicCitation to the source if it is a Citation.\n if (has(phylogenyAsJSONLD, 'source')) {\n const source = phylogenyAsJSONLD.source;\n\n if (!has(source, 'bibliographicCitation')) {\n source.bibliographicCitation = new CitationWrapper(source).toString();\n }\n }\n\n return phylogenyAsJSONLD;\n }\n}\n\nmodule.exports = {\n PhylogenyWrapper,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/wrappers/PhylogenyWrapper.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/wrappers/PhylogenyWrapper.js", "access": "public", "description": null, "lineNumber": 1 @@ -1489,7 +1489,7 @@ "name": "src/wrappers/PhylorefWrapper.js", "content": "/** Used to parse timestamps for phyloref statuses. */\nconst moment = require('moment');\nconst { has, cloneDeep, uniq } = require('lodash');\n\nconst owlterms = require('../utils/owlterms');\nconst { TaxonomicUnitWrapper } = require('./TaxonomicUnitWrapper');\nconst { TaxonConceptWrapper } = require('./TaxonConceptWrapper');\nconst { PhylogenyWrapper } = require('./PhylogenyWrapper');\nconst { CitationWrapper } = require('./CitationWrapper');\n\n/**\n * PhylorefWrapper\n *\n */\n\nclass PhylorefWrapper {\n // Wraps a phyloreference in a PHYX model.\n\n constructor(phyloref, phyxDefaultNomenCode = owlterms.UNKNOWN_CODE) {\n // Wraps the provided phyloreference\n this.phyloref = phyloref;\n this.phyxDefaultNomenCode = phyxDefaultNomenCode;\n }\n\n /** Return the internal specifiers of this phyloref (if any). */\n get internalSpecifiers() {\n if (!has(this.phyloref, 'internalSpecifiers')) {\n // If there isn't one, create an empty list so that the caller can do\n // `wrappedPhyloref.internalSpecifiers.push({...})`.\n this.phyloref.internalSpecifiers = [];\n }\n\n return this.phyloref.internalSpecifiers;\n }\n\n /**\n * Normalize a phyloreference.\n *\n * @param phyloref\n */\n static normalize(phyloref) {\n const normalizedPhyloref = cloneDeep(phyloref);\n\n normalizedPhyloref.internalSpecifiers = (phyloref.internalSpecifiers || [])\n .map(TaxonomicUnitWrapper.normalize);\n normalizedPhyloref.externalSpecifiers = (phyloref.externalSpecifiers || [])\n .map(TaxonomicUnitWrapper.normalize);\n\n return normalizedPhyloref;\n }\n\n /** Return the external specifiers of this phyloref (if any). */\n get externalSpecifiers() {\n if (!has(this.phyloref, 'externalSpecifiers')) {\n // If there isn't one, create an empty list so that the caller can do\n // `wrappedPhyloref.externalSpecifiers.push({...})`.\n this.phyloref.externalSpecifiers = [];\n }\n\n return this.phyloref.externalSpecifiers;\n }\n\n get label() {\n // Return a label for this phyloreference.\n if (has(this.phyloref, 'label')) return this.phyloref.label;\n if (has(this.phyloref, 'labels') && this.phyloref.labels.length > 0) return this.phyloref.labels[0];\n if (has(this.phyloref, 'title')) return this.phyloref.title;\n\n return undefined;\n }\n\n set label(newLabel) {\n // Set a label for this phyloreference.\n if (has(this.phyloref, 'label')) {\n this.phyloref.label = newLabel;\n } else {\n // Vue.set(this.phyloref, 'label', newLabel);\n this.phyloref.label = newLabel;\n }\n }\n\n /** Return all the specifiers of this phyloref (if any). */\n get specifiers() {\n // Returns a list of all specifiers by combining the internal and external\n // specifiers into a single list, with internal specifiers before\n // external specifiers.\n let specifiers = this.internalSpecifiers;\n specifiers = specifiers.concat(this.externalSpecifiers);\n return specifiers;\n }\n\n getSpecifierType(specifier) {\n // For a given specifier, return a string indicating whether it is\n // an 'Internal' or 'External' specifier.\n\n if (this.internalSpecifiers.includes(specifier)) return 'Internal';\n if (this.externalSpecifiers.includes(specifier)) return 'External';\n return 'Specifier';\n }\n\n setSpecifierType(specifier, specifierType) {\n // Change the type of a given specifier. To do this, we first need\n // to determine if it was originally an internal or external\n // specifier, then move it into the other list.\n\n let index;\n if (specifierType === 'Internal') {\n // To set a specifier to 'Internal', we might need to delete it from the\n // list of external specifiers first.\n index = this.externalSpecifiers.indexOf(specifier);\n if (index !== -1) this.externalSpecifiers.splice(index, 1);\n\n // Don't add it to the list of internal specifiers if it's already there.\n if (!this.internalSpecifiers.includes(specifier)) {\n this.phyloref.internalSpecifiers.unshift(specifier);\n }\n } else if (specifierType === 'External') {\n // To set a specifier to 'External', we might need to delete it from the\n // list of internal specifiers first.\n index = this.phyloref.internalSpecifiers.indexOf(specifier);\n if (index !== -1) this.phyloref.internalSpecifiers.splice(index, 1);\n\n // Don't add it to the list of internal specifiers if it's already there.\n if (!this.phyloref.externalSpecifiers.includes(specifier)) {\n this.phyloref.externalSpecifiers.unshift(specifier);\n }\n } else {\n // Neither internal nor external? Ignore.\n }\n }\n\n deleteSpecifier(specifier) {\n // Since the user interface combines specifiers into a single list,\n // it doesn't remember if the specifier to be deleted is internal\n // or external. We delete the intended specifier from both arrays.\n\n if (has(this.phyloref, 'internalSpecifiers') && this.phyloref.internalSpecifiers.length > 0) {\n const index = this.phyloref.internalSpecifiers.indexOf(specifier);\n if (index !== -1) this.phyloref.internalSpecifiers.splice(index, 1);\n }\n\n if (has(this.phyloref, 'externalSpecifiers') && this.phyloref.externalSpecifiers.length > 0) {\n const index = this.phyloref.externalSpecifiers.indexOf(specifier);\n if (index !== -1) this.phyloref.externalSpecifiers.splice(index, 1);\n }\n }\n\n getExpectedNodeLabels(phylogeny) {\n // Given a phylogeny, determine which node labels we expect this phyloref to\n // resolve to. To do this, we:\n // 1. Find all node labels that are case-sensitively identical\n // to the phyloreference.\n // 2. Find all node labels that have additionalNodeProperties with\n // expectedPhyloreferenceNamed case-sensitively identical to\n // the phyloreference.\n const phylorefLabel = this.label;\n const nodeLabels = new Set();\n\n new PhylogenyWrapper(\n phylogeny,\n this.defaultNomenCode\n ).getNodeLabels().forEach((nodeLabel) => {\n // Is this node label identical to the phyloreference name?\n if (nodeLabel === phylorefLabel) {\n nodeLabels.add(nodeLabel);\n } else if (\n has(phylogeny, 'additionalNodeProperties')\n && has(phylogeny.additionalNodeProperties, nodeLabel)\n && has(phylogeny.additionalNodeProperties[nodeLabel], 'expectedPhyloreferenceNamed')\n ) {\n // Does this node label have an expectedPhyloreferenceNamed that\n // includes this phyloreference name?\n\n const expectedPhylorefs = phylogeny\n .additionalNodeProperties[nodeLabel]\n .expectedPhyloreferenceNamed;\n\n if (expectedPhylorefs.includes(phylorefLabel)) {\n nodeLabels.add(nodeLabel);\n }\n }\n });\n\n // Return node labels sorted alphabetically.\n return Array.from(nodeLabels).sort();\n }\n\n static getStatusCURIEsInEnglish() {\n // Return dictionary of all phyloref statuses in English\n return {\n 'pso:draft': 'Draft',\n 'pso:final-draft': 'Final draft',\n 'pso:under-review': 'Under review',\n 'pso:submitted': 'Tested',\n 'pso:published': 'Published',\n 'pso:retracted-from-publication': 'Retracted',\n };\n }\n\n getCurrentStatus() {\n // Return a result object that contains:\n // - status: phyloreference status as a short URI (CURIE)\n // - statusInEnglish: an English representation of the phyloref status\n // - intervalStart: the start of the interval\n // - intervalEnd: the end of the interval\n\n if (\n has(this.phyloref, 'pso:holdsStatusInTime')\n && Array.isArray(this.phyloref['pso:holdsStatusInTime'])\n && this.phyloref['pso:holdsStatusInTime'].length > 0\n ) {\n // If we have any pso:holdsStatusInTime entries, pick the first one and\n // extract the CURIE and time interval information from it.\n const lastStatusInTime = this.phyloref['pso:holdsStatusInTime'][this.phyloref['pso:holdsStatusInTime'].length - 1];\n const statusCURIE = lastStatusInTime['pso:withStatus']['@id'];\n\n // Look for time interval information\n let intervalStart;\n let intervalEnd;\n\n if (has(lastStatusInTime, 'tvc:atTime')) {\n const atTime = lastStatusInTime['tvc:atTime'];\n if (has(atTime, 'timeinterval:hasIntervalStartDate')) intervalStart = atTime['timeinterval:hasIntervalStartDate'];\n if (has(atTime, 'timeinterval:hasIntervalEndDate')) intervalEnd = atTime['timeinterval:hasIntervalEndDate'];\n }\n\n // Return result object\n return {\n statusCURIE,\n statusInEnglish: PhylorefWrapper.getStatusCURIEsInEnglish()[statusCURIE],\n intervalStart,\n intervalEnd,\n };\n }\n\n // If we couldn't figure out a status for this phyloref, assume it's a draft.\n return {\n statusCURIE: 'pso:draft',\n statusInEnglish: PhylorefWrapper.getStatusCURIEsInEnglish()['pso:draft'],\n };\n }\n\n getStatusChanges() {\n // Return a list of status changes for a particular phyloreference\n if (has(this.phyloref, 'pso:holdsStatusInTime')) {\n return this.phyloref['pso:holdsStatusInTime'].map((entry) => {\n const result = {};\n\n // Create a statusCURIE convenience field.\n if (has(entry, 'pso:withStatus')) {\n result.statusCURIE = entry['pso:withStatus']['@id'];\n result.statusInEnglish = PhylorefWrapper.getStatusCURIEsInEnglish()[result.statusCURIE];\n }\n\n // Create intervalStart/intervalEnd convenient fields\n if (has(entry, 'tvc:atTime')) {\n const atTime = entry['tvc:atTime'];\n if (has(atTime, 'timeinterval:hasIntervalStartDate')) {\n result.intervalStart = atTime['timeinterval:hasIntervalStartDate'];\n result.intervalStartAsCalendar = moment(result.intervalStart).calendar();\n }\n\n if (has(atTime, 'timeinterval:hasIntervalEndDate')) {\n result.intervalEnd = atTime['timeinterval:hasIntervalEndDate'];\n result.intervalEndAsCalendar = moment(result.intervalEnd).calendar();\n }\n }\n\n return result;\n });\n }\n\n // No changes? Return an empty list.\n return [];\n }\n\n setStatus(status) {\n // Set the status of a phyloreference\n //\n // Check whether we have a valid status CURIE.\n if (!has(PhylorefWrapper.getStatusCURIEsInEnglish(), status)) {\n throw new TypeError(`setStatus() called with invalid status CURIE '${status}'`);\n }\n\n // See if we can end the previous interval.\n const currentTime = new Date(Date.now()).toISOString();\n\n if (!has(this.phyloref, 'pso:holdsStatusInTime')) {\n // Vue.set(this.phyloref, 'pso:holdsStatusInTime', []);\n this.phyloref['pso:holdsStatusInTime'] = [];\n }\n\n // Check to see if there's a previous time interval we should end.\n if (\n Array.isArray(this.phyloref['pso:holdsStatusInTime'])\n && this.phyloref['pso:holdsStatusInTime'].length > 0\n ) {\n const lastStatusInTime = this.phyloref['pso:holdsStatusInTime'][this.phyloref['pso:holdsStatusInTime'].length - 1];\n\n // if (!has(lastStatusInTime, 'tvc:atTime'))\n // Vue.set(lastStatusInTime, 'tvc:atTime', {});\n if (!has(lastStatusInTime, 'tvc:atTime')) {\n lastStatusInTime['tvc:atTime'] = {};\n }\n if (!has(lastStatusInTime['tvc:atTime'], 'timeinterval:hasIntervalEndDate')) {\n // If the last time entry doesn't already have an interval end date, set it to now.\n lastStatusInTime['tvc:atTime']['timeinterval:hasIntervalEndDate'] = currentTime;\n }\n }\n\n // Create new entry.\n this.phyloref['pso:holdsStatusInTime'].push({\n '@type': 'http://purl.org/spar/pso/StatusInTime',\n 'pso:withStatus': { '@id': status },\n 'tvc:atTime': {\n 'timeinterval:hasIntervalStartDate': currentTime,\n },\n });\n }\n\n /**\n * Return a list of all the unique nomenclatural codes used by this phyloreference.\n * The default nomenclatural code used in creating the PhylorefWrapper will be used\n * for any taxonomic units that don't have any nomenclatural code set. If any\n * specifiers are not taxon concepts, they will be represented in the returned\n * list as owlterms.UNKNOWN_CODE.\n */\n get uniqNomenCodes() {\n return uniq(this.specifiers.map((specifier) => {\n const taxonConcept = new TaxonomicUnitWrapper(\n specifier,\n this.phyxDefaultNomenCode\n ).taxonConcept;\n if (!taxonConcept) return owlterms.UNKNOWN_CODE;\n\n const nomenCode = new TaxonConceptWrapper(\n taxonConcept,\n this.phyxDefaultNomenCode\n ).nomenCode;\n if (!nomenCode) return owlterms.UNKNOWN_CODE;\n\n return nomenCode;\n }));\n }\n\n /**\n * Returns a summarized nomenclatural code for this phyloref. If all of the\n * specifiers have either the same nomenclatural code or `undefined`,\n * this getter will return that nomenclatural code. Otherwise, this method\n * will return owlterms.UNKNOWN_CODE.\n */\n get defaultNomenCode() {\n // Check to see if we have a single nomenclatural code to use.\n if (this.uniqNomenCodes.length === 1) return this.uniqNomenCodes[0];\n\n // If one or more of our specifiers have no nomenclatural code (e.g. if\n // they are specimens), they will show up as owlterms.UNKNOWN_CODE.\n // If we have a single nomenclatural code *apart* from all the\n // owlterms.UNKNOWN_CODEs, then that is still usable as a default\n // nomenclatural code for this phyloreference.\n const uniqNomenCodesNoUnknowns = this.uniqNomenCodes\n .filter(code => code !== owlterms.UNKNOWN_CODE);\n if (uniqNomenCodesNoUnknowns.length === 1) return uniqNomenCodesNoUnknowns[0];\n\n return owlterms.UNKNOWN_CODE;\n }\n\n /**\n * Create a component class for the set of internal and external specifiers provided.\n * We turn this into a label (in the form `A & B ~ C V D`), which we use to ensure that\n * we don't create more than one class for a particular set of internal and external\n * specifiers.\n * - jsonld: The JSON-LD representation of the Phyloreference this is an component class\n * for. We mainly use this to retrieve its '@id'.\n * - internalSpecifiers: The set of internal specifiers for this component class.\n * - externalSpecifiers: The set of external specifiers for this component class.\n * - equivClass: The equivalent class expression for this component class as a function\n * that returns the expression as a string.\n * - reusePrevious (default: true): If true, we reuse previous expressions with the\n * same set of included and excluded specifiers. If false, we always generate a new\n * component class for this expression.\n * - parentClass: If not undefined, provides a JSON-LD definition of the class to set as the\n * parent class of this component class. We only use the ['@id'].\n */\n createComponentClass(\n jsonld,\n internalSpecifiers,\n externalSpecifiers,\n equivClass,\n reusePrevious = true,\n parentClass = undefined\n ) {\n if (internalSpecifiers.length === 0) throw new Error('Cannot create component class without any internal specifiers');\n if (internalSpecifiers.length === 1 && externalSpecifiers.length === 0) throw new Error('Cannot create component class with a single internal specifiers and no external specifiers');\n\n /* Generate a label that represents this component class. */\n\n // By default, taxonomic unit labels don't include the nomenclatural code.\n // However, we should include that here in order to distinguish between\n // taxonomic names in different taxonomic codes. This method generates that\n // name for a specifier.\n const outerThis = this;\n function generateSpecifierName(specifier) {\n const wrapped = new TaxonomicUnitWrapper(specifier, outerThis.defaultNomenCode);\n if (!wrapped) return '(error)';\n if (wrapped.taxonConcept) {\n const nomenCodeDetails = new TaxonConceptWrapper(wrapped.taxonConcept).nomenCodeDetails;\n if (nomenCodeDetails) return `${wrapped.label} (${nomenCodeDetails.shortName})`;\n }\n return wrapped.label;\n }\n\n // Start with the internal specifiers, concatenated with '&'.\n const internalSpecifierLabel = internalSpecifiers\n .map(generateSpecifierName)\n .sort()\n .join(' & ');\n let componentClassLabel = `(${internalSpecifierLabel}`;\n\n if (externalSpecifiers.length === 0) {\n componentClassLabel += ')';\n } else {\n // Add the external specifiers, concatenated with 'V'.\n const externalSpecifierLabel = externalSpecifiers\n .map(generateSpecifierName)\n .sort()\n .join(' V ');\n componentClassLabel += ` ~ ${externalSpecifierLabel})`;\n }\n\n // process.stderr.write(`component class label: ${componentClassLabel}\\n`);\n\n // TODO We need to replace this with an actual object-based comparison,\n // rather than trusting the labels to tell us everything.\n if (reusePrevious && has(this.componentClassesByLabel, componentClassLabel)) {\n // If we see the same label again, return the previously defined component class.\n return { '@id': this.componentClassesByLabel[componentClassLabel]['@id'] };\n }\n\n // Create a new component class for this set of internal and external specifiers.\n this.componentClassCount += 1;\n const componentClass = {};\n componentClass['@id'] = `${jsonld['@id']}_component${this.componentClassCount}`;\n // process.stderr.write(`Creating new componentClass with id: ${componentClass['@id']}`);\n\n componentClass['@type'] = 'owl:Class';\n componentClass.label = componentClassLabel;\n componentClass.equivalentClass = equivClass;\n if (externalSpecifiers.length > 0) componentClass.subClassOf = ['phyloref:PhyloreferenceUsingMaximumClade'];\n else componentClass.subClassOf = ['phyloref:PhyloreferenceUsingMinimumClade'];\n\n if (parentClass) {\n componentClass.subClassOf.push({\n '@id': parentClass['@id'],\n });\n }\n\n // Save it in the cache for later usage.\n this.componentClassesByLabel[componentClassLabel] = componentClass;\n\n // The first time we create a componentClass, we include it into the logical\n // expression directly. On subsequent calls, we'll only return the `@id`\n // (see above).\n return componentClass;\n }\n\n getIncludesRestrictionForTU(tu) {\n return {\n '@type': 'owl:Restriction',\n onProperty: 'phyloref:includes_TU',\n someValuesFrom: new TaxonomicUnitWrapper(tu, this.defaultNomenCode).asOWLEquivClass,\n };\n }\n\n /**\n * Return an OWL restriction for the most recent common ancestor (MRCA)\n * of two taxonomic units.\n */\n getMRCARestrictionOfTwoTUs(tu1, tu2) {\n return {\n '@type': 'owl:Restriction',\n onProperty: 'obo:CDAO_0000149', // cdao:has_Child\n someValuesFrom: {\n '@type': 'owl:Class',\n intersectionOf: [\n {\n '@type': 'owl:Restriction',\n onProperty: 'phyloref:excludes_TU',\n someValuesFrom: new TaxonomicUnitWrapper(tu1, this.defaultNomenCode).asOWLEquivClass,\n },\n this.getIncludesRestrictionForTU(tu2),\n ],\n },\n };\n }\n\n /*\n * Create an OWL restriction for a phyloreference made up entirely of internal\n * specifiers.\n * - jsonld: the JSON-LD representation of this phyloreference in model 1.0.\n * We mainly use this to access the '@id' and internal and external specifiers.\n * - remainingInternals: all internal specifiers that have not yet been selected.\n * - selected: internal specifiers have been seen selected. This should initially\n * be [], and will be filled in when this method calls itself recursively.\n *\n * This method works like this:\n * 1. We have several special cases: we fail if 0 or 1 specifiers are\n * provided, and we have a special representation for 2 specifiers.\n * 2. Create an expression for the currently selected specifiers. This expression\n * is in the form:\n * has_Child some (\n * excludes_lineage_to some [remaining specifiers]\n * and [selected specifiers]\n * )\n * We generate the expressions for remaining specifiers and selected specifiers by calling\n * this method recursively.\n * 3. Finally, we select another internal from the remainingInternals and generate an\n * expression for that selection by calling this method recursively. Note that we\n * only process cases where there are more remainingInternals than selected\n * internals -- when there are fewer, we'll just end up with the inverses of the\n * previous comparisons, which we'll already have covered.\n */\n createClassExpressionsForInternals(jsonld, remainingInternals, selected) {\n // process.stderr.write(`@id [${jsonld['@id']}] Remaining internals:\n // ${remainingInternals.length}, selected: ${selected.length}\\n`);\n\n // Quick special case: if we have two 'remainingInternals' and zero selecteds,\n // we can just return the MRCA for two internal specifiers.\n if (selected.length === 0) {\n if (remainingInternals.length === 2) {\n return [\n this.getMRCARestrictionOfTwoTUs(remainingInternals[0], remainingInternals[1]),\n ];\n } if (remainingInternals.length === 1) {\n throw new Error('Cannot determine class expression for a single specifier');\n } else if (remainingInternals.length === 0) {\n throw new Error('Cannot determine class expression for zero specifiers');\n }\n }\n\n // Step 1. If we've already selected something, create an expression for it.\n const classExprs = [];\n if (selected.length > 0) {\n let remainingInternalsExpr = [];\n if (remainingInternals.length === 1) {\n remainingInternalsExpr = this.getIncludesRestrictionForTU(remainingInternals[0]);\n } else if (remainingInternals.length === 2) {\n remainingInternalsExpr = this.getMRCARestrictionOfTwoTUs(\n remainingInternals[0],\n remainingInternals[1]\n );\n } else {\n remainingInternalsExpr = this.createComponentClass(\n jsonld,\n remainingInternals,\n [],\n this.createClassExpressionsForInternals(jsonld, remainingInternals, [])\n );\n }\n\n let selectedExpr = [];\n if (selected.length === 1) {\n selectedExpr = this.getIncludesRestrictionForTU(selected[0]);\n } else if (selected.length === 2) {\n selectedExpr = this.getMRCARestrictionOfTwoTUs(selected[0], selected[1]);\n } else {\n selectedExpr = this.createComponentClass(\n jsonld,\n selected,\n [],\n this.createClassExpressionsForInternals(jsonld, selected, [])\n );\n }\n\n classExprs.push({\n '@type': 'owl:Restriction',\n onProperty: 'obo:CDAO_0000149', // cdao:has_Child\n someValuesFrom: {\n '@type': 'owl:Class',\n intersectionOf: [{\n '@type': 'owl:Restriction',\n onProperty: 'phyloref:excludes_lineage_to',\n someValuesFrom: remainingInternalsExpr,\n }, selectedExpr],\n },\n });\n }\n\n // Step 2. Now select everything from remaining once, and start recursing through\n // every possibility.\n // Note that we only process cases where there are more remainingInternals than\n // selected internals -- when there are fewer, we'll just end up with the inverses\n // of the previous comparisons, which we'll already have covered.\n if (remainingInternals.length > 1 && selected.length <= remainingInternals.length) {\n remainingInternals.map(newlySelected => this.createClassExpressionsForInternals(\n jsonld,\n // The new remaining is the old remaining minus the selected TU.\n remainingInternals.filter(i => i !== newlySelected),\n // The new selected is the old selected plus the selected TU.\n selected.concat([newlySelected])\n ))\n .reduce((acc, val) => acc.concat(val), [])\n .forEach(expr => classExprs.push(expr));\n }\n\n return classExprs;\n }\n\n /*\n * Phyloref.asJSONLD(fallbackIRI)\n *\n * Export this phylogeny as JSON-LD.\n *\n * Arguments:\n * - fallbackIRI: The base IRI to use for this phyloref if it does not have\n * an '@id'.\n */\n asJSONLD(fallbackIRI) {\n // Keep all currently extant data.\n const phylorefAsJSONLD = cloneDeep(this.phyloref);\n\n // Set the @id and @type. If we don't already have an '@id', use the\n // fallbackIRI.\n if (!has(phylorefAsJSONLD, '@id')) phylorefAsJSONLD['@id'] = fallbackIRI;\n phylorefAsJSONLD['@type'] = 'owl:Class';\n\n // If we don't have a bibliographicCitation but we do have a definition source,\n // then generate a bibliographicCitation for the source.\n if (has(phylorefAsJSONLD, 'definitionSource')) {\n const definitionSource = phylorefAsJSONLD.definitionSource;\n if (!has(definitionSource, 'bibliographicCitation')) {\n definitionSource.bibliographicCitation = new CitationWrapper(definitionSource).toString();\n }\n }\n\n // Construct a class expression for this phyloreference.\n const internalSpecifiers = phylorefAsJSONLD.internalSpecifiers || [];\n const externalSpecifiers = phylorefAsJSONLD.externalSpecifiers || [];\n\n // If it is an apomorphy-based class expression, we should generate a\n // logical expression that describes the apomorphy.\n const phylorefType = phylorefAsJSONLD.phylorefType;\n if (\n (phylorefType && phylorefType === 'phyloref:PhyloreferenceUsingApomorphy')\n || (has(phylorefAsJSONLD, 'apomorphy'))\n ) {\n // This is an apomorphy-based definition!\n phylorefAsJSONLD.subClassOf = [\n 'phyloref:Phyloreference',\n 'phyloref:PhyloreferenceUsingApomorphy',\n ];\n\n // Someday, we will probably want to turn this apomorphy into a\n // logical expression so that it can be computed alongside other\n // OWL ontologies. This is outside our scope for the moment, so\n // we will simply pass on the phyloreference as-is.\n\n return phylorefAsJSONLD;\n }\n\n // We might need to make component classes.\n // So we reset our component class counts and records.\n this.componentClassCount = 0;\n this.componentClassesByLabel = {};\n\n // The type of this phyloreference.\n let calculatedPhylorefType;\n\n // The list of logical expressions generated for this phyloref.\n let logicalExpressions = [];\n\n if (internalSpecifiers.length === 0) {\n // We can't handle phyloreferences without at least one internal specifier.\n calculatedPhylorefType = 'phyloref:MalformedPhyloreference';\n phylorefAsJSONLD.malformedPhyloreference = 'No internal specifiers provided';\n } else if (externalSpecifiers.length > 0) {\n calculatedPhylorefType = 'phyloref:PhyloreferenceUsingMaximumClade';\n\n // If the phyloreference has at least one external specifier, we\n // can provide a simplified expression for the internal specifier,\n // in the form:\n // phyloref:includes_TU some [internal1] and\n // phyloref:includes_TU some [internal2] and ...\n // phyloref:excludes_TU some [exclusion1] and\n // has_Ancestor some (phyloref:excludesTU some [exclusion2]) ...\n //\n // Since we don't know which of the external specifiers will actually\n // be the one that will be used, we need to generate logical expressions\n // for every possibility.\n\n logicalExpressions = externalSpecifiers.map((selectedExternal) => {\n // Add the internal specifiers.\n const intersectionExprs = internalSpecifiers.map(\n sp => this.getIncludesRestrictionForTU(sp)\n );\n\n // Add the selected external specifier.\n intersectionExprs.push({\n '@type': 'owl:Restriction',\n onProperty: 'phyloref:excludes_TU',\n someValuesFrom: new TaxonomicUnitWrapper(\n selectedExternal,\n this.defaultNomenCode\n ).asOWLEquivClass,\n });\n\n // Collect all of the externals that are not selected.\n const remainingExternals = externalSpecifiers.filter(ex => ex !== selectedExternal);\n\n // Add the remaining externals, which we assume will resolve outside of\n // this clade.\n remainingExternals.forEach((externalTU) => {\n intersectionExprs.push({\n '@type': 'owl:Restriction',\n onProperty: 'obo:CDAO_0000144', // has_Ancestor\n someValuesFrom: {\n '@type': 'owl:Restriction',\n onProperty: 'phyloref:excludes_TU',\n someValuesFrom: new TaxonomicUnitWrapper(\n externalTU,\n this.defaultNomenCode\n ).asOWLEquivClass,\n },\n });\n });\n\n return {\n '@type': 'owl:Class',\n intersectionOf: intersectionExprs,\n };\n });\n } else {\n calculatedPhylorefType = 'phyloref:PhyloreferenceUsingMinimumClade';\n\n // We only have internal specifiers. We therefore need to use the algorithm in\n // this.createClassExpressionsForInternals() to create this expression.\n logicalExpressions = this.createClassExpressionsForInternals(\n phylorefAsJSONLD, internalSpecifiers, []\n );\n }\n\n // If we have a single logical expression, we set that as an equivalentClass\n // expression. If we have more than one, we produce multiple component classes\n // to represent it.\n if (logicalExpressions.length === 0) {\n // This is fine, as long as there is an explanation in\n // phyloref.malformedPhyloreference explaining why no logical expressions\n // could be generated. Otherwise, throw an error.\n if (!has(phylorefAsJSONLD, 'malformedPhyloreference')) {\n throw new Error(\n `Phyloref ${this.label} was generated by Phyx.js with neither logical expressions nor an explanation for the lack of logical expressions. `\n + 'This indicates an error in the Phyx.js library. Please report this bug at https://github.com/phyloref/phyx.js/issues.'\n );\n }\n } else if (logicalExpressions.length === 1) {\n // If we have a single logical expression, then that is what this phyloref\n // is equivalent to.\n phylorefAsJSONLD.equivalentClass = logicalExpressions[0];\n } else {\n // If we have multiple logical expressions, the phyloreference can be\n // represented by any of them. We model this by creating subclasses of\n // the phyloreference for each logical expression -- that way, it's clear\n // that these expressions aren't equivalent to each other (which is what\n // caused https://github.com/phyloref/phyx.js/issues/57), but nodes\n // resolved by any of those expressions will also be included in the\n // phyloreference itself.\n //\n // Note that there are two differences from the way in which we usually call\n // this.createComponentClass():\n // 1. Usually, createComponentClass() reuses logical expressions with the\n // same sets of internal and external specifiers. That won't work here,\n // since *all* these logical expressions have the same specifiers. So,\n // we turn off caching.\n // 2. We need to set each of these component classes to be a subclass of\n // this phyloreference so that it can include instances from each of the\n // logical expressions.\n phylorefAsJSONLD.subClasses = logicalExpressions.map(classExpr => this.createComponentClass(\n phylorefAsJSONLD,\n internalSpecifiers,\n externalSpecifiers,\n classExpr,\n // False in order to turn off caching by internal and external specifiers.\n false,\n // Make the new component class a subclass of this phyloreference.\n phylorefAsJSONLD\n ));\n }\n\n // Every phyloreference is a subclass of phyloref:Phyloreference.\n if (!phylorefAsJSONLD.subClassOf) phylorefAsJSONLD.subClassOf = [];\n if (!Array.isArray(phylorefAsJSONLD.subClassOf)) {\n phylorefAsJSONLD.subClassOf = [phylorefAsJSONLD.subClassOf];\n }\n phylorefAsJSONLD.subClassOf.push('phyloref:Phyloreference');\n\n // If the this Phyloref has a phylorefType that differs from the calculated\n // phyloref type, throw an error.\n if (has(phylorefAsJSONLD, 'phylorefType') && phylorefAsJSONLD.phylorefType !== calculatedPhylorefType) {\n throw new Error(\n `Phyloref ${this.label} has phylorefType set to '${phylorefAsJSONLD.phylorefType}', but it appears to be a '${calculatedPhylorefType}'.`\n );\n }\n phylorefAsJSONLD.subClassOf.push(calculatedPhylorefType);\n\n return phylorefAsJSONLD;\n }\n}\n\nmodule.exports = {\n PhylorefWrapper,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/wrappers/PhylorefWrapper.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/wrappers/PhylorefWrapper.js", "access": "public", "description": null, "lineNumber": 1 @@ -2231,7 +2231,7 @@ "name": "src/wrappers/PhyxWrapper.js", "content": "const fs = require('fs');\nconst path = require('path');\n\n/** Helper methods from lodash. */\nconst { has, cloneDeep, uniq } = require('lodash');\n\n/** For NQuads export. */\nconst JSONLD = require('jsonld');\n\nconst owlterms = require('../utils/owlterms');\n\nconst { PhylorefWrapper } = require('./PhylorefWrapper');\nconst { PhylogenyWrapper } = require('./PhylogenyWrapper');\nconst { CitationWrapper } = require('./CitationWrapper');\n\n/**\n * The PhyxWrapper wraps an entire Phyx document.\n */\n\nclass PhyxWrapper {\n /**\n * Wraps an entire PHYX document.\n * @param {Object} phyx - The Phyx structure to wrap.\n * @param {function(newick: string): {name: string, children: Object[]}}\n * [newickParser=PhylogenyWrapper.getParsedNewick] - A method\n * that accepts a Newick string and returns a list of nodes. Each node should have a\n * 'children' key with its children and optionally a 'name' key with its label. This\n * code previously depended on phylotree.js, whose newick_parser() function works exactly\n * like this. This option allows you to drop in Phylotree's newick_parser() or -- if you\n * prefer -- any other option.\n */\n constructor(phyx, newickParser = PhylogenyWrapper.getParsedNewick) {\n //\n this.phyx = phyx;\n this.newickParser = newickParser;\n }\n\n // Determine a 'default nomenclatural code' for this Phyx file. There are\n // two ways to do this:\n // 1. If the Phyx file has a 'defaultNomenclaturalCodeIRI' property, we use that.\n // 2. Otherwise, we check to see if every phyloref in this file has the same\n // nomenclatural code. If so, we can use that code. If not, i.e. if any of\n // the phylorefs are missing a nomenclatural code or include a specifier,\n // we default to owlterms.UNKNOWN_CODE.\n get defaultNomenCode() {\n if (has(this.phyx, 'defaultNomenclaturalCodeIRI')) return this.phyx.defaultNomenclaturalCodeIRI;\n const nomenCodes = (this.phyx.phylorefs || [])\n .map(phyloref => new PhylorefWrapper(phyloref).defaultNomenCode);\n const uniqNomenCodes = uniq(nomenCodes);\n if (uniqNomenCodes.length === 1) return uniqNomenCodes[0];\n return owlterms.UNKNOWN_CODE;\n }\n\n /**\n * Return a provided Phyx document as a normalized JSON document. We ignore most keys -- including\n * keys we don't know -- but any key that can be wrapped by one of the other Wrappers in this\n * package will be wrapped and normalized before being returned.\n *\n * Normalization is mostly needed for TaxonomicUnitWrappers and its subclasses\n * (TaxonConceptWrapper, TaxonNameWrapper), since these can be represented in several essentially\n * identical ways. But if we implement it at every level, we can implement comparison code in\n * Klados easily.\n *\n * Two Phyx documents should -- upon being normalized -- be comparable with each other with\n * lodash.deepEqual().\n */\n static normalize(phyxDocument) {\n const normalizedDocument = cloneDeep(phyxDocument);\n\n normalizedDocument.phylorefs = (phyxDocument.phylorefs || []).map(PhylorefWrapper.normalize);\n normalizedDocument.phylogenies = (phyxDocument.phylogenies || [])\n .map(PhylogenyWrapper.normalize);\n if ('source' in phyxDocument) {\n normalizedDocument.source = CitationWrapper.normalize(phyxDocument.source);\n }\n\n return normalizedDocument;\n }\n\n /**\n * Generate an executable ontology from this Phyx document. The document is mostly in JSON-LD\n * already, except for three important things:\n * 1. We have to convert all phylogenies into a series of statements relating to the nodes\n * inside these phylogenies.\n * 2. We have to convert phylogenies into OWL restrictions.\n * 3. Insert all matches between taxonomic units in this file.\n *\n * @param {string} [baseIRI=\"\"] - The base IRI to use when generating this Phyx document.\n * This should include a trailing '#' or '/'. Use '' to indicate that relative IDs\n * should be generated in the produced ontology (e.g. '#phylogeny1'). Note that if a\n * baseIRI is provided, then relative IDs already in the Phyx file (identified by an\n * initial '#') will be turned into absolute IDs by removing the initial `#` and\n * prepending them with the baseIRI.\n * @return {Object} This Phyx document as an OWL ontology as a JSON-LD object.\n */\n asJSONLD(baseIRI = '') {\n const jsonld = cloneDeep(this.phyx);\n\n // Some helper methods for generating base IRIs for phylorefs and phylogenies.\n function getBaseIRIForPhyloref(index) {\n if (baseIRI) return `${baseIRI}phyloref${index}`;\n return `#phyloref${index}`;\n }\n\n function getBaseIRIForPhylogeny(index) {\n if (baseIRI) return `${baseIRI}phylogeny${index}`;\n return `#phylogeny${index}`;\n }\n\n // Given a relative ID (e.g. '#phylo1') make it absolute (`${baseIRI}phylo1`).\n function makeIDAbsolute(phylogenyId) {\n if (baseIRI && phylogenyId.startsWith('#')) return `${baseIRI}${phylogenyId.substring(1)}`; // Remove the initial '#'.\n return phylogenyId;\n }\n\n // Given an absolute ID (`${baseIRI}phylo1`) make it relative (e.g. '#phylo1').\n function makeIDRelative(phylogenyId) {\n if (phylogenyId.startsWith(baseIRI)) return `#${phylogenyId.substring(baseIRI.length)}`;\n return phylogenyId;\n }\n\n if (has(jsonld, 'phylorefs')) {\n // We might have phyloref IDs set to relative IRIs (e.g. \"#phyloref0\").\n // If the baseIRI is set to '', that's fine. But if not, we'll add it\n // to the relative IRI to make it absolute. This seems to avoid problems\n // with some JSON-LD parsers.\n if (baseIRI) {\n jsonld.phylorefs = jsonld.phylorefs.map((phyloref) => {\n if ((phyloref['@id'] || '').startsWith('#')) {\n const modifiedPhyloref = cloneDeep(phyloref);\n modifiedPhyloref['@id'] = makeIDAbsolute(phyloref['@id']);\n return modifiedPhyloref;\n }\n return phyloref;\n });\n }\n\n // Convert phyloreferences into an OWL class restriction\n jsonld.phylorefs = jsonld.phylorefs.map(\n (phyloref, countPhyloref) => new PhylorefWrapper(phyloref, this.defaultNomenCode)\n .asJSONLD(getBaseIRIForPhyloref(countPhyloref))\n );\n }\n\n if (has(jsonld, 'phylogenies')) {\n // We might have phyloref IDs set to relative IRIs (e.g. \"#phyloref0\").\n // If the baseIRI is set to '', that's fine. But if not, we'll add it\n // to the relative IRI to make it absolute. This seems to avoid problems\n // with some JSON-LD parsers.\n if (baseIRI) {\n jsonld.phylogenies = jsonld.phylogenies.map((phylogeny) => {\n if ((phylogeny['@id'] || '').startsWith('#')) {\n const modifiedPhylogeny = cloneDeep(phylogeny);\n modifiedPhylogeny['@id'] = makeIDAbsolute(phylogeny['@id']);\n return modifiedPhylogeny;\n }\n return phylogeny;\n });\n }\n\n // Add descriptions for individual nodes in each phylogeny.\n jsonld.phylogenies = jsonld.phylogenies.map(\n (phylogeny, countPhylogeny) => new PhylogenyWrapper(phylogeny, this.defaultNomenCode)\n .asJSONLD(getBaseIRIForPhylogeny(countPhylogeny), this.newickParser)\n );\n\n // Go through all the nodes and add information on expected resolution.\n jsonld.phylogenies.forEach((phylogeny) => {\n const phylogenyId = phylogeny['@id'];\n (phylogeny.nodes || []).forEach((node) => {\n // We can't set expected resolution information on unlabeled nodes.\n if (!node.labels) return;\n\n jsonld.phylorefs.forEach((phyloref) => {\n const phylorefId = phyloref['@id'];\n\n // There are two ways in which we determine that a phyloreference\n // is expected to resolve to a node:\n // (1) If nodeLabel is set, then that must be one of the node's labels.\n // (2) If nodeLabel is not set, then one of the node's label should be\n // identical to the phyloreference's label.\n //\n // We set flagNodeExpectsPhyloref in all cases where we should note\n // that this node expects to resolve to this phyloreference.\n let flagNodeExpectsPhyloref = false;\n\n // console.log(`Testing expected resolution of '${phylorefId}' on `\n // + `'${phylogenyId}' (${makeIDRelative(phylogenyId)}).`);\n\n if (\n has(phyloref, 'expectedResolution')\n && (\n // The user might have used the absolute phylogeny ID here.\n has(phyloref.expectedResolution, phylogenyId)\n\n // Or they might have used a relative phylogeny ID.\n || has(phyloref.expectedResolution, makeIDRelative(phylogenyId))\n )\n ) {\n // Expected resolution information set! The node label mentioned in that\n // information must be identical to one of the labels of this phylogeny node.\n\n // Figure out which phylogenyId was matched here.\n const nodeLabel = has(phyloref.expectedResolution, phylogenyId)\n ? phyloref.expectedResolution[phylogenyId].nodeLabel\n : phyloref.expectedResolution[makeIDRelative(phylogenyId)].nodeLabel;\n\n if (nodeLabel && (node.labels || []).includes(nodeLabel)) {\n flagNodeExpectsPhyloref = true;\n }\n } else if ((node.labels || []).includes(phyloref.label)) {\n // No expected resolution information, so we just check whether\n // the phyloref label is one of the labels on this phylogeny node.\n flagNodeExpectsPhyloref = true;\n }\n\n if (flagNodeExpectsPhyloref) {\n // Modify this phylogeny node's type to include that it is a type\n // of:\n // obi:is_specified_output_of some (\n // obi:Prediction and obi:has_specified_output some #phyloref_id\n // )\n node[owlterms.RDF_TYPE].push({\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.OBI_IS_SPECIFIED_OUTPUT_OF,\n someValuesFrom: {\n '@type': owlterms.OWL_CLASS,\n intersectionOf: [\n { '@id': owlterms.OBI_PREDICTION },\n {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.OBI_HAS_SPECIFIED_INPUT,\n someValuesFrom: {\n '@id': phylorefId,\n },\n },\n ],\n },\n });\n }\n });\n });\n });\n }\n\n // Earlier, we used to generate a list of taxonomic matches here (stored in\n // jsonld.hasTaxonomicUnitMatches) that logically expressed how taxonomic\n // units in phyloref specifiers were related to taxonomic units in phylogeny\n // nodes. This is no longer necessary, since phyloref specifiers are now logical\n // expressions that directly evaluate to phylogeny nodes. However, if in the\n // future we decide that we need to perform more advanced TU matching, this\n // would be the place to implement that.\n\n // If there is a top-level source, generate a bibliographicCitation for it.\n if (has(jsonld, 'source')) {\n jsonld.source.bibliographicCitation = new CitationWrapper(jsonld.source).toString();\n }\n\n // Set up the top-level object '@type'. If one is present, we add our terms to that.\n if (!has(jsonld, '@type')) jsonld['@type'] = [];\n if (!Array.isArray(jsonld['@type'])) jsonld['@type'] = [jsonld['@type']];\n jsonld['@type'].push('owl:Ontology');\n\n // Set up the ontology imports. If one is present, we add our imports to that.\n if (!has(jsonld, 'owl:imports')) jsonld['owl:imports'] = [];\n if (!Array.isArray(jsonld['owl:imports'])) jsonld['owl:imports'] = [jsonld['owl:imports']];\n jsonld['owl:imports'].push('http://ontology.phyloref.org/2018-12-14/phyloref.owl');\n jsonld['owl:imports'].push('http://ontology.phyloref.org/2018-12-14/tcan.owl');\n\n // If the '@context' is missing, add it here.\n if (!has(jsonld, '@context')) {\n jsonld['@context'] = owlterms.PHYX_CONTEXT_JSON;\n }\n\n return jsonld;\n }\n\n /**\n * Generate an executable ontology from this Phyx document as N-Quads. Under the\n * hood, we generate an OWL/JSON-LD representation of this Phyx document, and then\n * convert it into N-Quads so that OWLAPI-supporting tools can directly consume it.\n *\n * @param {string} [baseIRI=\"\"] - The base IRI to use when generating this Phyx document.\n * This should include a trailing '#' or '/'. Use '' to indicate that relative IDs\n * should be generated in the produced ontology (e.g. '#phylogeny1'). Note that if a\n * baseIRI is provided, then relative IDs already in the Phyx file (identified by an\n * initial '#') will be turned into absolute IDs by removing the initial `#` and\n * prepending them with the baseIRI.\n * @param {string} [filePath=undefined] - The path of the Phyx file being converted.\n * Used only if the `@context` of the file is a relative path.\n * @return {Promise[string]} A Promise to return this Phyx document as a string that can\n * be written to an N-Quads file.\n */\n toRDF(baseIRI = '', filePath = undefined) {\n const owlJSONLD = this.asJSONLD(baseIRI);\n\n // For the purposes of testing, we are sometimes given a relative path to `@context`,\n // but the JSONLD package does not support this. Instead, we'll import the contents\n // of the relative path on the fly.\n if (filePath && has(owlJSONLD, '@context') && owlJSONLD['@context'].startsWith('.')) {\n owlJSONLD['@context'] = JSON.parse(fs.readFileSync(\n path.resolve(filePath, owlJSONLD['@context'])\n ));\n }\n\n return JSONLD.toRDF(owlJSONLD, { format: 'application/n-quads' });\n }\n}\n\nmodule.exports = {\n PhyxWrapper,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/wrappers/PhyxWrapper.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/wrappers/PhyxWrapper.js", "access": "public", "description": null, "lineNumber": 1 @@ -2537,9 +2537,9 @@ "__docId__": 144, "kind": "file", "name": "src/wrappers/SpecimenWrapper.js", - "content": "const { has } = require('lodash');\nconst { TaxonConceptWrapper } = require('./TaxonConceptWrapper');\nconst owlterms = require('../utils/owlterms');\nconst { PhyxCacheManager } = require('../utils/PhyxCacheManager');\n\n/**\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a dwc:occurrenceID with the occurrence identifier.\n * - Should have a dwc:basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n */\nclass SpecimenWrapper {\n /** The '@type' of specimens in JSON-LD document. */\n static get TYPE_SPECIMEN() {\n return owlterms.DWC_OCCURRENCE;\n }\n\n /** Construct a wrapper around a specimen. */\n constructor(specimen) {\n this.specimen = specimen;\n }\n\n /**\n * Normalize the specified specimen.\n * @param specimen A specimen to be normalized.\n */\n static normalize(specimen) {\n const wrapped = new SpecimenWrapper(specimen);\n const normalizedSpecimen = {\n '@type': SpecimenWrapper.TYPE_SPECIMEN,\n label: wrapped.label,\n 'dwc:basisOfRecord': wrapped.basisOfRecord,\n occurrenceID: wrapped.occurrenceID,\n catalogNumber: wrapped.catalogNumber,\n institutionCode: wrapped.institutionCode,\n collectionCode: wrapped.collectionCode,\n };\n if ('@id' in specimen) normalizedSpecimen['@id'] = specimen['@id'];\n return normalizedSpecimen;\n }\n\n /**\n * Parse the provided occurrence ID. The two expected formats are:\n * - 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]'\n * (in which case, we ignore the first two \"components\" here)\n * - '[institutionCode]:[collectionCode]:[catalogNumber]'\n */\n static fromOccurrenceID(occurrenceID, basisOfRecord = 'PreservedSpecimen') {\n // Copy the occurrence ID so we can truncate it if necessary.\n let occurID = occurrenceID;\n if (occurID.startsWith('urn:catalog:')) occurID = occurID.substr(12);\n\n // Prepare the specimen.\n const specimen = {\n '@type': SpecimenWrapper.TYPE_SPECIMEN,\n 'dwc:basisOfRecord': basisOfRecord,\n occurrenceID: occurID,\n };\n\n // Look for certain prefixes that suggest that we've been passed a URN or\n // URL instead. If so, don't do any further processing!\n const URL_URN_PREFIXES = [\n 'http://',\n 'https://',\n 'ftp://',\n 'sftp://',\n 'file://',\n 'urn:',\n ];\n if (URL_URN_PREFIXES.filter(prefix => occurID.toLowerCase().startsWith(prefix)).length > 0) {\n return specimen;\n }\n\n // Parsing an occurrence ID takes some time, so we should memoize it.\n if (PhyxCacheManager.has('SpecimenWrapper.occurrenceIDCache', occurID)) {\n return PhyxCacheManager.get('SpecimenWrapper.occurrenceIDCache', occurID);\n }\n\n // Split the occurrence ID into components, and store them in the appropriate fields.\n const comps = occurID.split(/:/);\n if (comps.length === 1) {\n // specimen.institutionCode = undefined;\n // specimen.collectionCode = undefined;\n [specimen.catalogNumber] = comps;\n } else if (comps.length === 2) {\n [specimen.institutionCode, specimen.catalogNumber] = comps;\n } else if (comps.length >= 3) {\n let catalogNumValues = []; // Store all split catalog number values.\n [specimen.institutionCode, specimen.collectionCode, ...catalogNumValues] = comps;\n specimen.catalogNumber = catalogNumValues.join(':');\n }\n\n PhyxCacheManager.put('SpecimenWrapper.occurrenceIDCache', occurID, specimen);\n return specimen;\n }\n\n /**\n * Get the catalogNumber if present.\n */\n get catalogNumber() {\n // Get the catalog number from the specimen object if present.\n if (has(this.specimen, 'catalogNumber')) return this.specimen.catalogNumber;\n\n // Otherwise, try to parse the occurrenceID and see if we can extract a\n // catalogNumber from there.\n if (has(this.specimen, 'occurrenceID')) {\n const specimen = SpecimenWrapper.fromOccurrenceID(this.specimen.occurrenceID);\n if (has(specimen, 'catalogNumber')) return specimen.catalogNumber;\n }\n return undefined;\n }\n\n /**\n * Get the institutionCode if present.\n */\n get institutionCode() {\n // Get the institution code from the specimen object if present.\n if (has(this.specimen, 'institutionCode')) return this.specimen.institutionCode;\n\n // Otherwise, try to parse the occurrenceID and see if we can extract an\n // occurrenceID from there.\n if (has(this.specimen, 'occurrenceID')) {\n const specimen = SpecimenWrapper.fromOccurrenceID(this.specimen.occurrenceID);\n if (has(specimen, 'institutionCode')) return specimen.institutionCode;\n }\n return undefined;\n }\n\n /**\n * Get the collectionCode if present.\n */\n get collectionCode() {\n // Get the collection code from the specimen object if present.\n if (has(this.specimen, 'collectionCode')) return this.specimen.collectionCode;\n\n // Otherwise, try to parse the occurrenceID and see if we can extract an\n // occurrenceID from there.\n if (has(this.specimen, 'occurrenceID')) {\n const specimen = SpecimenWrapper.fromOccurrenceID(this.specimen.occurrenceID);\n if (has(specimen, 'collectionCode')) return specimen.collectionCode;\n }\n return undefined;\n }\n\n /**\n * Return the occurrence ID of this specimen, if we have one. Otherwise, we\n * attempt to construct one in the form:\n * \"urn:catalog:\" + institutionCode (if present) + ':' +\n * collectionCode (if present) + ':' + catalogNumber (if present)\n */\n get occurrenceID() {\n // Return the occurrenceID if it exists.\n if (has(this.specimen, 'occurrenceID') && this.specimen.occurrenceID.trim() !== '') {\n return this.specimen.occurrenceID.trim();\n }\n\n // Otherwise, we could try to construct the occurrenceID from its components.\n if (has(this.specimen, 'catalogNumber')) {\n if (has(this.specimen, 'institutionCode')) {\n if (has(this.specimen, 'collectionCode')) {\n return `urn:catalog:${this.specimen.institutionCode.trim()}:${this.specimen.collectionCode.trim()}:${this.specimen.catalogNumber.trim()}`;\n }\n return `urn:catalog:${this.specimen.institutionCode.trim()}::${this.specimen.catalogNumber.trim()}`;\n }\n if (has(this.specimen, 'collectionCode')) {\n return `urn:catalog::${this.specimen.collectionCode.trim()}:${this.specimen.catalogNumber.trim()}`;\n }\n return `urn:catalog:::${this.specimen.catalogNumber.trim()}`;\n }\n\n // None of our specimen identifier schemes worked.\n return undefined;\n }\n\n /**\n * Return the basis of record, if one is present.\n */\n get basisOfRecord() {\n if (has(this.specimen, 'dwc:basisOfRecord')) return this.specimen['dwc:basisOfRecord'];\n return undefined;\n }\n\n /**\n * Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for\n * recommended values.\n */\n set basisOfRecord(bor) {\n this.specimen['dwc:basisOfRecord'] = bor;\n }\n\n /** Return this specimen as a taxon concept if it contains taxon name information. */\n get taxonConcept() {\n if (has(this.specimen, 'hasName')) return this.specimen;\n if (has(this.specimen, 'nameString')) return this.specimen;\n return undefined;\n }\n\n /** Return a label for this specimen. */\n get label() {\n // We can't return anything without an occurrenceID.\n if (!this.occurrenceID) return undefined;\n\n // Note that specimens may be identified to a taxon concept. If so, we should\n // include that information in the label.\n if (this.taxonConcept) {\n return `Specimen ${this.occurrenceID} identified as ${new TaxonConceptWrapper(this.taxonConcept).label}`;\n }\n\n // Return a label for this specimen.\n return `Specimen ${this.occurrenceID}`;\n }\n\n /** Return this specimen as an equivalentClass expression. */\n get asOWLEquivClass() {\n // We can't do anything without an occurrence ID!\n if (!this.occurrenceID) return undefined;\n\n // TODO: Should we also match by this.taxonConcept is one is available?\n // Technically no, but it might be useful. Hmm.\n\n // Return as an OWL restriction.\n return {\n '@type': 'owl:Restriction',\n onProperty: owlterms.DWC_OCCURRENCE_ID,\n hasValue: this.occurrenceID,\n };\n }\n}\n\nmodule.exports = {\n SpecimenWrapper,\n};\n", + "content": "const { has } = require('lodash');\nconst { TaxonConceptWrapper } = require('./TaxonConceptWrapper');\nconst owlterms = require('../utils/owlterms');\nconst { PhyxCacheManager } = require('../utils/PhyxCacheManager');\n\n/**\n * The SpecimenWrapper wraps specimen taxonomic units. These can be identified\n * with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\n * https://dwc.tdwg.org/terms/#occurrence).\n *\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n * - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n * - Should have a occurrenceID with the occurrence identifier.\n * - Should have a basisOfRecord to indicate what sort of occurrence this is.\n *\n * Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\n * SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n * (see https://github.com/tdwg/ontology). Therefore, it instead improvises a\n * representation based on dwc:Occurrence.\n */\nclass SpecimenWrapper {\n /** The '@type' of specimens in JSON-LD document. */\n static get TYPE_SPECIMEN() {\n return owlterms.DWC_OCCURRENCE;\n }\n\n /** Construct a wrapper around a specimen. */\n constructor(specimen) {\n this.specimen = specimen;\n }\n\n /**\n * Normalize the specified specimen.\n * @param specimen A specimen to be normalized.\n */\n static normalize(specimen) {\n const wrapped = new SpecimenWrapper(specimen);\n const normalizedSpecimen = {\n '@type': SpecimenWrapper.TYPE_SPECIMEN,\n label: wrapped.label,\n basisOfRecord: wrapped.basisOfRecord,\n occurrenceID: wrapped.occurrenceID,\n catalogNumber: wrapped.catalogNumber,\n institutionCode: wrapped.institutionCode,\n collectionCode: wrapped.collectionCode,\n };\n if ('@id' in specimen) normalizedSpecimen['@id'] = specimen['@id'];\n return normalizedSpecimen;\n }\n\n /**\n * Parse the provided occurrence ID. The two expected formats are:\n * - 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]'\n * (in which case, we ignore the first two \"components\" here)\n * - '[institutionCode]:[collectionCode]:[catalogNumber]'\n */\n static fromOccurrenceID(occurrenceID, basisOfRecord = 'PreservedSpecimen') {\n // Copy the occurrence ID so we can truncate it if necessary.\n let occurID = occurrenceID;\n if (occurID.startsWith('urn:catalog:')) occurID = occurID.substring(12);\n\n // Prepare the specimen.\n const specimen = {\n '@type': SpecimenWrapper.TYPE_SPECIMEN,\n basisOfRecord,\n occurrenceID: occurID,\n };\n\n // Look for certain prefixes that suggest that we've been passed a URN or\n // URL instead. If so, don't do any further processing!\n const URL_URN_PREFIXES = [\n 'http://',\n 'https://',\n 'ftp://',\n 'sftp://',\n 'file://',\n 'urn:',\n ];\n if (URL_URN_PREFIXES.filter(prefix => occurID.toLowerCase().startsWith(prefix)).length > 0) {\n return specimen;\n }\n\n // Parsing an occurrence ID takes some time, so we should memoize it.\n if (PhyxCacheManager.has('SpecimenWrapper.occurrenceIDCache', occurID)) {\n return PhyxCacheManager.get('SpecimenWrapper.occurrenceIDCache', occurID);\n }\n\n // Split the occurrence ID into components, and store them in the appropriate fields.\n const comps = occurID.split(/:/);\n if (comps.length === 1) {\n // specimen.institutionCode = undefined;\n // specimen.collectionCode = undefined;\n [specimen.catalogNumber] = comps;\n } else if (comps.length === 2) {\n [specimen.institutionCode, specimen.catalogNumber] = comps;\n } else if (comps.length >= 3) {\n let catalogNumValues = []; // Store all split catalog number values.\n [specimen.institutionCode, specimen.collectionCode, ...catalogNumValues] = comps;\n specimen.catalogNumber = catalogNumValues.join(':');\n }\n\n PhyxCacheManager.put('SpecimenWrapper.occurrenceIDCache', occurID, specimen);\n return specimen;\n }\n\n /**\n * Get the catalogNumber if present.\n */\n get catalogNumber() {\n // Get the catalog number from the specimen object if present.\n if (has(this.specimen, 'catalogNumber')) return this.specimen.catalogNumber;\n\n // Otherwise, try to parse the occurrenceID and see if we can extract a\n // catalogNumber from there.\n if (has(this.specimen, 'occurrenceID')) {\n const specimen = SpecimenWrapper.fromOccurrenceID(this.specimen.occurrenceID);\n if (has(specimen, 'catalogNumber')) return specimen.catalogNumber;\n }\n return undefined;\n }\n\n /**\n * Get the institutionCode if present.\n */\n get institutionCode() {\n // Get the institution code from the specimen object if present.\n if (has(this.specimen, 'institutionCode')) return this.specimen.institutionCode;\n\n // Otherwise, try to parse the occurrenceID and see if we can extract an\n // occurrenceID from there.\n if (has(this.specimen, 'occurrenceID')) {\n const specimen = SpecimenWrapper.fromOccurrenceID(this.specimen.occurrenceID);\n if (has(specimen, 'institutionCode')) return specimen.institutionCode;\n }\n return undefined;\n }\n\n /**\n * Get the collectionCode if present.\n */\n get collectionCode() {\n // Get the collection code from the specimen object if present.\n if (has(this.specimen, 'collectionCode')) return this.specimen.collectionCode;\n\n // Otherwise, try to parse the occurrenceID and see if we can extract an\n // occurrenceID from there.\n if (has(this.specimen, 'occurrenceID')) {\n const specimen = SpecimenWrapper.fromOccurrenceID(this.specimen.occurrenceID);\n if (has(specimen, 'collectionCode')) return specimen.collectionCode;\n }\n return undefined;\n }\n\n /**\n * Return the occurrence ID of this specimen, if we have one. Otherwise, we\n * attempt to construct one in the form:\n * \"urn:catalog:\" + institutionCode (if present) + ':' +\n * collectionCode (if present) + ':' + catalogNumber (if present)\n */\n get occurrenceID() {\n // Return the occurrenceID if it exists.\n if (has(this.specimen, 'occurrenceID')) {\n return this.specimen.occurrenceID.trim();\n }\n\n // Otherwise, we could try to construct the occurrenceID from its components.\n if (has(this.specimen, 'catalogNumber')) {\n if (has(this.specimen, 'institutionCode')) {\n if (has(this.specimen, 'collectionCode')) {\n return `urn:catalog:${this.specimen.institutionCode.trim()}:${this.specimen.collectionCode.trim()}:${this.specimen.catalogNumber.trim()}`;\n }\n return `urn:catalog:${this.specimen.institutionCode.trim()}::${this.specimen.catalogNumber.trim()}`;\n }\n if (has(this.specimen, 'collectionCode')) {\n return `urn:catalog::${this.specimen.collectionCode.trim()}:${this.specimen.catalogNumber.trim()}`;\n }\n return `urn:catalog:::${this.specimen.catalogNumber.trim()}`;\n }\n\n // None of our specimen identifier schemes worked.\n return undefined;\n }\n\n /**\n * Return the basis of record, if one is present.\n */\n get basisOfRecord() {\n if (has(this.specimen, 'basisOfRecord')) return this.specimen.basisOfRecord;\n return undefined;\n }\n\n /**\n * Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for\n * recommended values.\n */\n set basisOfRecord(bor) {\n this.specimen.basisOfRecord = bor;\n }\n\n /** Return this specimen as a taxon concept if it contains taxon name information. */\n get taxonConcept() {\n if (has(this.specimen, 'hasName')) return this.specimen;\n if (has(this.specimen, 'nameString')) return this.specimen;\n return undefined;\n }\n\n /** Return a label for this specimen. */\n get label() {\n // We can't return anything without an occurrenceID.\n if (!this.occurrenceID) return undefined;\n\n // Note that specimens may be identified to a taxon concept. If so, we should\n // include that information in the label.\n if (this.taxonConcept) {\n return `Specimen ${this.occurrenceID} identified as ${new TaxonConceptWrapper(this.taxonConcept).label}`;\n }\n\n // Return a label for this specimen.\n return `Specimen ${this.occurrenceID}`;\n }\n\n /** Return this specimen as an equivalentClass expression. */\n get asOWLEquivClass() {\n // We can't do anything without an occurrence ID!\n if (!this.occurrenceID) return undefined;\n\n // TODO: Should we also match by this.taxonConcept is one is available?\n // Technically no, but it might be useful. Hmm.\n\n // Return as an OWL restriction.\n return {\n '@type': 'owl:Restriction',\n onProperty: owlterms.DWC_OCCURRENCE_ID,\n hasValue: this.occurrenceID,\n };\n }\n}\n\nmodule.exports = {\n SpecimenWrapper,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/wrappers/SpecimenWrapper.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/wrappers/SpecimenWrapper.js", "access": "public", "description": null, "lineNumber": 1 @@ -2618,7 +2618,7 @@ "export": true, "importPath": "@phyloref/phyx/src/wrappers/SpecimenWrapper.js", "importStyle": "{SpecimenWrapper}", - "description": "The SpecimenWrapper wraps specimen taxonomic units. These can be identified\nwith a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\nhttps://dwc.tdwg.org/terms/#occurrence).\n\n- TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n - Should have a dwc:occurrenceID with the occurrence identifier.\n - Should have a dwc:basisOfRecord to indicate what sort of occurrence this is.\n\nSince TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\nSpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n(see https://github.com/tdwg/ontology). Therefore, it instead improvises a\nrepresentation based on dwc:Occurrence.", + "description": "The SpecimenWrapper wraps specimen taxonomic units. These can be identified\nwith a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently\nhttps://dwc.tdwg.org/terms/#occurrence).\n\n- TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.\n - Based on http://rs.tdwg.org/dwc/terms/Occurrence\n - Should have a occurrenceID with the occurrence identifier.\n - Should have a basisOfRecord to indicate what sort of occurrence this is.\n\nSince TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for\nSpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated\n(see https://github.com/tdwg/ontology). Therefore, it instead improvises a\nrepresentation based on dwc:Occurrence.", "lineNumber": 24, "interface": false }, @@ -2898,7 +2898,7 @@ "name": "src/wrappers/TaxonConceptWrapper.js", "content": "/** Utility functions. */\nconst { has } = require('lodash');\n\n/** List of OWL/RDF terms we use. */\nconst owlterms = require('../utils/owlterms');\n\n/** For parsing scientific names. */\nconst { TaxonNameWrapper } = require('./TaxonNameWrapper');\n\n/**\n * The TaxonConceptWrapper wraps taxon concepts. These are taxonomic units with\n * a type of TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT. They are based on the\n * Taxon Concept ontology at https://github.com/tdwg/ontology/tree/master/ontology/voc.\n *\n * A taxon concept:\n * - SHOULD have a hasName property indicating the name this taxon refers to.\n * - MAY have accordingTo, describedBy or circumscribedBy to indicate how this\n * taxon concept should be circumscribed. If none of these are present,\n * this taxonomic unit will be considered a taxon rather than a taxon concept\n * (i.e. as a nominal taxon concept, as in https://github.com/darwin-sw/dsw/wiki/ClassTaxon).\n * - MAY have nameString and accordingToString properties. We will fall back\n * to these properties if hasName or accordingTo are missing.\n */\n\nclass TaxonConceptWrapper {\n /** The @type of a taxon or taxon concept. */\n static get TYPE_TAXON_CONCEPT() {\n return owlterms.TDWG_VOC_TAXON_CONCEPT;\n }\n\n /** Create a TaxonConceptWrapper around a taxon concept. */\n constructor(tunit, defaultNomenCode = owlterms.UNKNOWN_CODE) {\n this.tunit = tunit;\n this.defaultNomenCode = defaultNomenCode;\n }\n\n /**\n * Normalize the specified taxon concept.\n * @param tc A taxon concept to be normalized.\n */\n static normalize(tc) {\n const wrapped = new TaxonConceptWrapper(tc);\n const normalizedTC = {\n '@type': TaxonConceptWrapper.TYPE_TAXON_CONCEPT,\n label: wrapped.label,\n hasName: TaxonNameWrapper.normalize(wrapped.taxonName),\n nameString: wrapped.taxonName.nameComplete,\n accordingTo: wrapped.accordingTo,\n };\n if ('@id' in tc) normalizedTC['@id'] = tc['@id'];\n return normalizedTC;\n }\n\n /**\n * Return the taxon name of this taxon concept (if any) as an object.\n */\n get taxonName() {\n // Do we have any names as taxon name objects?\n if (has(this.tunit, 'hasName')) return this.tunit.hasName;\n\n // Do we have a nameString with a taxon name as string?\n if (has(this.tunit, 'nameString')) return TaxonNameWrapper.fromVerbatimName(this.tunit.nameString, this.defaultNomenCode);\n\n // If not, we have no name!\n return undefined;\n }\n\n /**\n * Return the complete taxon name of this taxon concept (if any), which is the\n * uninomial, binomial or trinomial name.\n */\n get nameComplete() {\n // Do we have any names as taxon name objects?\n if (has(this.tunit, 'hasName')) return new TaxonNameWrapper(this.tunit.hasName, this.defaultNomenCode).nameComplete;\n\n // Do we have a nameString with a taxon name as string?\n if (has(this.tunit, 'nameString')) return TaxonNameWrapper.fromVerbatimName(this.tunit.nameString, this.defaultNomenCode).nameComplete;\n\n // If not, we have no name!\n return undefined;\n }\n\n /**\n * Return the nomenclatural code of this taxon concept as a string.\n */\n get nomenCode() {\n if (has(this.tunit, 'hasName')) return new TaxonNameWrapper(this.tunit.hasName, this.defaultNomenCode).nomenclaturalCode;\n\n return owlterms.UNKNOWN_CODE;\n }\n\n /**\n * Return the nomenclatural code of this taxon concept as an object.\n */\n get nomenCodeDetails() {\n if (has(this.tunit, 'hasName')) return new TaxonNameWrapper(this.tunit.hasName, this.defaultNomenCode).nomenclaturalCodeDetails;\n\n return TaxonNameWrapper.getNomenCodeDetails(owlterms.UNKNOWN_CODE);\n }\n\n /**\n * Return the accordingTo information (if any) as an object.\n *\n * For now, we return this verbatim. Once we close #15, we should parse raw labels\n * with a CitationWrapper.\n */\n get accordingTo() {\n // Do we have any accordingTo information?\n if (has(this.tunit, 'accordingTo')) return this.tunit.accordingTo;\n\n // Do we have an accordingToString?\n if (has(this.tunit, 'accordingToString')) return this.tunit.accordingToString;\n\n // If not, we have no accodingTo information!\n return undefined;\n }\n\n /**\n * Return the accordingTo information (if any) as a string.\n *\n * For now, we stringify objects by converting them into JSON strings. Once we\n * close #15, we will be able to generate a label using CitationWrapper.\n */\n get accordingToString() {\n // Do we have any accordingTo information?\n if (has(this.tunit, 'accordingTo')) return JSON.stringify(this.tunit.accordingTo);\n\n // Do we have an accordingToString?\n if (has(this.tunit, 'accordingToString')) return this.tunit.accordingToString;\n\n // If not, we have no accodingTo information!\n return undefined;\n }\n\n /**\n * Return the label of this taxon concept.\n */\n get label() {\n // If we're wrapping a taxonName, use its label.\n if (this.taxonName) {\n // Do we also have accordingTo information?\n if (this.accordingToString) {\n return `${new TaxonNameWrapper(this.taxonName, this.defaultNomenCode).label} sensu ${this.accordingToString}`;\n }\n\n return new TaxonNameWrapper(this.taxonName, this.defaultNomenCode).label;\n }\n\n return undefined;\n }\n\n /**\n * Given a node label, attempt to parse it as a scientific name.\n *\n * Note that this is NOT memoized -- you should really be using\n * TaxonomicUnitWrapper.fromLabel() or TaxonNameWrapper.fromVerbatimName() rather\n * than calling this directly.\n *\n * @return A taxonomic unit that corresponds to this taxon concept.\n */\n static fromLabel(nodeLabel, nomenCode = owlterms.UNKNOWN_CODE) {\n if (nodeLabel === undefined || nodeLabel === null || nodeLabel.trim() === '') return undefined;\n\n // Check if this label can be divided into a name and a sensu/sec component.\n const match = /^\\s*(.*)\\s+(?:sec|sensu)\\.?\\s+(.*)\\s*$/.exec(nodeLabel);\n let accordingTo;\n if (match) {\n accordingTo = match[2];\n }\n\n // Can we parse it as a taxon name? If not, we will return undefined.\n const taxonName = TaxonNameWrapper.fromVerbatimName(nodeLabel, nomenCode);\n if (taxonName) {\n return TaxonConceptWrapper.wrapTaxonName(taxonName, accordingTo);\n }\n\n // Couldn't parse it at all.\n return undefined;\n }\n\n /** Wrap a taxon name with a particular TaxonName object and an accordingTo (string). */\n static wrapTaxonName(taxonName, accordingTo) {\n const result = {\n '@type': TaxonConceptWrapper.TYPE_TAXON_CONCEPT,\n hasName: taxonName,\n };\n if (accordingTo) result.accordingTo = accordingTo;\n return result;\n }\n\n /**\n * Return how this class should look in an OWL equivalentClass expression.\n *\n * Note that we don't include the accordingTo information in this\n * query, since we don't have a useful way to use that during OWL reasoning.\n */\n get asOWLEquivClass() {\n // Without a taxonomicName, we can't do anything.\n if (!this.taxonName) return undefined;\n\n return {\n '@type': 'owl:Restriction',\n onProperty: owlterms.TDWG_VOC_HAS_NAME,\n someValuesFrom: new TaxonNameWrapper(this.taxonName, this.defaultNomenCode).asOWLEquivClass,\n };\n }\n}\n\nmodule.exports = {\n TaxonConceptWrapper,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/wrappers/TaxonConceptWrapper.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/wrappers/TaxonConceptWrapper.js", "access": "public", "description": null, "lineNumber": 1 @@ -3273,7 +3273,7 @@ "name": "src/wrappers/TaxonNameWrapper.js", "content": "/** Utility functions. */\nconst { has, cloneDeep, isArray } = require('lodash');\n\n/** OWL/RDF terms. */\nconst owlterms = require('../utils/owlterms');\n\n/** We need the cache manager to memoize parsing scientific names. */\nconst { PhyxCacheManager } = require('../utils/PhyxCacheManager');\n\n/**\n * Wraps a taxon name to provide access to components of\n * the taxon name. This is based on the TDWG TaxonName standard, as at\n * https://github.com/tdwg/ontology/blob/master/ontology/voc/TaxonName.rdf.\n *\n * Every instance of this class is expected to have some combination of the\n * following fields:\n * - rdfs:label -- the verbatim taxon name\n * - nameComplete -- the complete uninomial, binomial or trinomial name.\n * - nomenclaturalCode -- the nomenclatural code under which the complete name\n * should be interpreted.\n *\n * We will also read the following fields if they are present:\n * - uninomial: The uninomial name of this taxon, if one is present.\n * - genusPart: The genus name.\n * - specificEpithet: The specific epithet.\n * - infraspecificEpithet: The infraspecific epithet.\n *\n * We wrap whatever we're given, so we won't assume that these fields are actually\n * consistent with each other. However, when one of these fields are set, we\n * overwrite the nameComplete to ensure that they are consistent. Similarly,\n * changing the nameComplete will overwrite the genusPart, specificEpithet and\n * infraspecificEpithet.\n *\n * Note that the TaxonName ontology recommends dc:title instead of rdfs:label;\n * however, I like the idea of using dc:title for documents and rdfs:label for\n * vocabulary terms, so I'm okay with using rdfs:label for the verbatim name.\n */\nclass TaxonNameWrapper {\n /**\n * Create a new taxon name wrapper around the JSON representation of\n * a taxon name.\n */\n constructor(txname, defaultNomenCode = owlterms.UNKNOWN_CODE) {\n if (txname === undefined) throw new Error('TaxonNameWrapper tried to wrap undefined');\n this.txname = txname;\n this.defaultNomenCode = defaultNomenCode;\n }\n\n /**\n * The type associated with these taxonName objects.\n */\n static get TYPE_TAXON_NAME() {\n return owlterms.TDWG_VOC_TAXON_NAME;\n }\n\n /**\n * The IRI for an unknown nomenclatural code (i.e. all we know is that it's a scientific name).\n */\n static get UNKNOWN_CODE() {\n return owlterms.UNKNOWN_CODE;\n }\n\n /* Directly access IRIs for nomenclatural codes. */\n static get ICZN_CODE() { return owlterms.ICZN_CODE; }\n\n static get ICN_CODE() { return owlterms.ICN_CODE; }\n\n static get ICNP_CODE() { return owlterms.ICNP_CODE; }\n\n static get ICTV_CODE() { return owlterms.ICTV_CODE; }\n\n static get ICNCP_CODE() { return owlterms.ICNCP_CODE; }\n\n /**\n * Return a list of all supported nomenclatural code. Each entry will have\n * the following keys:\n * - code: A list of short names that can be used to represent this nomenclatural code.\n * - label: An informal name of this nomenclatural code in English.\n * - title: The formal name of this nomenclatural code in English.\n * - iri: The IRI of this nomenclatural code.\n *\n * This will be used in drawing user interfaces, so this should be in order\n * of likelihood of use.\n */\n static getNomenclaturalCodes() {\n return [\n // Note: the unknown code needs to be the first one in this list.\n {\n iri: owlterms.UNKNOWN_CODE,\n shortName: 'Code not known',\n label: 'Nomenclatural code not known',\n title: 'Nomenclatural code not known',\n },\n {\n iri: owlterms.ICZN_CODE,\n shortName: 'ICZN',\n label: 'Animals (ICZN)',\n title: 'International Code of Zoological Nomenclature',\n },\n {\n iri: owlterms.ICN_CODE,\n shortName: 'ICN',\n label: 'Algae, fungi and plants (ICN, previously ICBN)',\n title: 'International Code of Nomenclature for algae, fungi, and plants',\n },\n {\n iri: owlterms.ICNP_CODE,\n shortName: 'ICNP',\n label: 'Prokaryotes (ICNP)',\n title: 'International Code of Nomenclature of Prokaryotes',\n },\n {\n iri: owlterms.ICTV_CODE,\n shortName: 'ICTV',\n label: 'Viruses (ICTV)',\n title: 'International Committee on Taxonomy of Viruses',\n },\n {\n iri: owlterms.ICNCP_CODE,\n shortName: 'ICNCP',\n label: 'Cultivated plants (ICNCP)',\n title: 'International Code of Cultivated Plants',\n },\n ];\n }\n\n /**\n * Returns the nomenclatural code entry for a code.\n */\n static getNomenCodeDetails(nomenCode) {\n const codes = TaxonNameWrapper.getNomenclaturalCodes();\n\n // If the nomenCode provided is owlterms.UNKNOWN_CODE,\n // return that entry.\n if (nomenCode === owlterms.UNKNOWN_CODE) {\n return codes[0];\n }\n\n // Look for the entry with the same IRI as the provided IRI.\n const matchingCode = codes\n .find(code => (code.iri || '').toLowerCase() === nomenCode.toLowerCase());\n if (matchingCode) return matchingCode;\n return undefined;\n }\n\n /**\n * Normalize the specified taxon name.\n * @param txname A taxon name to be normalized.\n */\n static normalize(txname) {\n const wrapped = new TaxonNameWrapper(txname);\n const normalizedTxname = {\n '@type': TaxonNameWrapper.TYPE_TAXON_NAME,\n nomenclaturalCode: wrapped.nomenclaturalCode,\n label: wrapped.label,\n nameComplete: wrapped.nameComplete,\n genusPart: wrapped.genusPart,\n specificEpithet: wrapped.specificEpithet,\n infraspecificEpithet: wrapped.infraspecificEpithet,\n };\n if ('@id' in txname) normalizedTxname['@id'] = txname['@id'];\n return normalizedTxname;\n }\n\n /**\n * Returns the nomenclatural code of this taxon name.\n */\n get nomenclaturalCode() {\n return this.txname.nomenclaturalCode || this.defaultNomenCode;\n }\n\n /**\n * Returns the nomenclatural code of this taxon name as a IRI.\n */\n get nomenclaturalCodeDetails() {\n const nomenCode = this.nomenclaturalCode;\n const nomenObj = TaxonNameWrapper.getNomenCodeDetails(nomenCode);\n if (!nomenObj) return undefined;\n\n return nomenObj;\n }\n\n /**\n * Set the nomenclatural code of this taxon name.\n */\n set nomenclaturalCode(nomenCode) {\n this.txname.nomenclaturalCode = nomenCode;\n }\n\n /**\n * Parses a verbatim taxon name into an (unwrapped) TaxonName.\n */\n static fromVerbatimName(verbatimName, nomenCode = owlterms.UNKNOWN_CODE) {\n // Have we already parsed this verbatim name?\n if (PhyxCacheManager.has(`TaxonNameWrapper.taxonNameCache.${nomenCode}`, verbatimName)) {\n return PhyxCacheManager.get(`TaxonNameWrapper.taxonNameCache.${nomenCode}`, verbatimName);\n }\n\n // Use a regular expression to parse the verbatimName.\n\n // Attempt 1. Look for a trinomial name.\n let txname;\n let results = /^([A-Z][a-z]+)[ _]([a-z-]+\\.?)(?:\\b|_)\\s*([a-z-]+)\\b/.exec(verbatimName);\n\n if (results) {\n txname = {\n '@type': TaxonNameWrapper.TYPE_TAXON_NAME,\n label: verbatimName,\n nameComplete: `${results[1]} ${results[2]} ${results[3]}`.trim(),\n genusPart: results[1],\n specificEpithet: results[2],\n infraspecificEpithet: results[3],\n };\n }\n\n // Attempt 2. Look for a binomial name.\n if (!txname) {\n results = /^([A-Z][a-z]+)[ _]([a-z-]+\\.?)(?:\\b|_)/.exec(verbatimName);\n\n if (results) {\n txname = {\n '@type': TaxonNameWrapper.TYPE_TAXON_NAME,\n label: verbatimName,\n nameComplete: `${results[1]} ${results[2]}`.trim(),\n genusPart: results[1],\n specificEpithet: results[2],\n };\n }\n }\n\n // Attempt 3. Look for a uninomial name.\n if (!txname) {\n // Is it a uninomial name?\n results = /^([A-Z][a-z]+)(?:[_\\s]|\\b)/.exec(verbatimName);\n if (results) {\n txname = {\n '@type': TaxonNameWrapper.TYPE_TAXON_NAME,\n label: verbatimName,\n nameComplete: results[1],\n uninomial: results[1],\n };\n }\n }\n\n // Add a nomenclatural code if possible.\n if (txname && nomenCode) {\n txname.nomenclaturalCode = nomenCode;\n }\n\n // Store in the cache.\n if (txname !== undefined) {\n PhyxCacheManager.put(`TaxonNameWrapper.taxonNameCache.${nomenCode}`, verbatimName, txname);\n }\n\n return txname;\n }\n\n /**\n * Return the label of this scientific name.\n */\n get label() {\n return this.txname.label || this.nameComplete;\n }\n\n /**\n * Set the label of this scientific name.\n */\n set label(lab) {\n this.txname.label = lab;\n if (!this.nameComplete) {\n // If we don't have a nameComplete, treat this as the name complete.\n this.nameComplete = lab;\n }\n }\n\n /**\n * Return the verbatim name of this taxon name.\n */\n get verbatimName() {\n return this.txname.label;\n }\n\n /*\n * Return the complete name (i.e. the uninomial, binomial or trinomial name\n * without authority information).\n */\n get nameComplete() {\n return this.txname.nameComplete\n || this.trinomialName\n || this.binomialName\n || this.uninomialName;\n }\n\n /**\n * Set the complete name. To do this, we re-parse the provided name.\n */\n set nameComplete(name) {\n this.txname = TaxonNameWrapper.fromVerbatimName(name, this.nomenclaturalCode);\n }\n\n /** Return the uninomial name if there is one. */\n get uninomial() {\n if (this.txname.uninomial) return this.txname.uninomial;\n\n // If there is no genus but there is a scientificName, try to extract a genus\n // from it.\n if (this.txname.nameComplete) {\n const txname = TaxonNameWrapper.fromVerbatimName(\n this.txname.nameComplete,\n this.nomenclaturalCode\n );\n if (has(txname, 'uninomial')) return txname.uninomial;\n }\n\n return undefined;\n }\n\n /** Set the uninomial name. */\n set uninomial(uninom) {\n this.txname.uninomial = uninom;\n this.txname.nameComplete = uninom;\n }\n\n /** Return the binomial name if available. */\n get binomialName() {\n // Get the binomial name. Constructed from the genus and specific epithet\n // if available.\n if (this.genusPart === undefined || this.specificEpithet === undefined) return undefined;\n return `${this.genusPart} ${this.specificEpithet}`;\n }\n\n /** Set the binomial name. */\n set binomialName(binom) {\n this.txname.uninomial = undefined;\n this.txname.nameComplete = binom;\n }\n\n /** Return the trinomial name if available. */\n get trinomialName() {\n if (\n this.infraspecificEpithet === undefined\n || this.specificEpithet === undefined\n || this.genusPart === undefined\n ) return undefined;\n return `${this.genusPart} ${this.specificEpithet} ${this.infraspecificEpithet}`;\n }\n\n /** Set the trinomial name. */\n set trinomialName(trinom) {\n this.txname.uninomial = undefined;\n this.txname.nameComplete = trinom;\n }\n\n /** Return the genus part of this scientific name if available. */\n get genusPart() {\n // Try to read the genus if available.\n if (has(this.txname, 'genusPart')) return this.txname.genusPart;\n\n // If there is no genus but there is a scientificName, try to extract a genus\n // from it.\n if (this.txname.nameComplete) {\n const txname = TaxonNameWrapper.fromVerbatimName(\n this.txname.nameComplete,\n this.nomenclaturalCode\n );\n if (has(txname, 'genusPart')) return txname.genusPart;\n }\n\n return undefined;\n }\n\n /** Set the genus part of this name. */\n set genusPart(genus) {\n this.txname.genusPart = genus;\n if (this.specificEpithet) {\n if (this.infraspecificEpithet) {\n this.txname.nameComplete = `${genus} ${this.specificEpithet} ${this.infraspecificEpithet}`;\n } else {\n this.txname.nameComplete = `${genus} ${this.specificEpithet}`;\n }\n }\n }\n\n /** Return the specific epithet of this scientific name if available. */\n get specificEpithet() {\n // Try to read the specific epithet if available.\n if (has(this.txname, 'specificEpithet')) return this.txname.specificEpithet;\n\n // If there is no specific epithet but there is a scientificName, try to\n // extract a specific epithet from it.\n if (this.nameComplete) {\n const txname = TaxonNameWrapper.fromVerbatimName(\n this.nameComplete,\n this.nomenclaturalCode\n );\n if (has(txname, 'specificEpithet')) return txname.specificEpithet;\n }\n\n return undefined;\n }\n\n /** Set the specificEpithet part of this name. */\n set specificEpithet(epithet) {\n this.txname.specificEpithet = epithet;\n if (this.genusPart) {\n if (this.infraspecificEpithet) {\n this.txname.nameComplete = `${this.genusPart} ${epithet} ${this.infraspecificEpithet}`;\n } else {\n this.txname.nameComplete = `${this.genusPart} ${epithet}`;\n }\n }\n }\n\n /** Return the infraspecific epithet of this scientific name if available. */\n get infraspecificEpithet() {\n // Try to read the specific epithet if available.\n if (has(this.txname, 'infraspecificEpithet')) return this.txname.infraspecificEpithet;\n\n // If there is no specific epithet but there is a scientificName, try to\n // extract a specific epithet from it.\n if (this.txname.nameComplete) {\n const txname = TaxonNameWrapper.fromVerbatimName(\n this.nameComplete,\n this.nomenclaturalCode\n );\n if (has(txname, 'infraspecificEpithet')) return txname.infraspecificEpithet;\n }\n\n return undefined;\n }\n\n /** Set the infraspecificEpithet part of this name. */\n set infraspecificEpithet(epithet) {\n this.txname.infraspecificEpithet = epithet;\n if (this.genusPart) {\n if (this.specificEpithet) {\n this.txname.nameComplete = `${this.genusPart} ${this.specificEpithet} ${epithet}`;\n } else {\n this.txname.nameComplete = `${this.genusPart} sp. ${epithet}`;\n }\n }\n }\n\n /**\n * Return this taxon name in an JSON-LD representation.\n */\n get asJSONLD() {\n const jsonld = cloneDeep(this.txname);\n\n // Make sure '@type' is an array.\n if (!has(jsonld, '@type')) jsonld['@type'] = [];\n if (!isArray(jsonld['@type'])) jsonld['@type'] = [jsonld['@type']];\n\n // Make it explicit that the type includes the nomenclaturalCode.\n const nomenCode = this.nomenclaturalCode;\n if (!jsonld['@type'].includes(nomenCode)) jsonld['@type'].push(nomenCode);\n\n return jsonld;\n }\n\n /**\n * Return this taxon name as an OWL equivalentClass expression.\n */\n get asOWLEquivClass() {\n // No complete name, can't return anything.\n if (!this.nameComplete) return undefined;\n\n // Do we have a nomenclaturalCode?\n if (!this.nomenclaturalCode) {\n return {\n '@type': 'owl:Restriction',\n onProperty: owlterms.TDWG_VOC_NAME_COMPLETE,\n hasValue: this.nameComplete,\n };\n }\n\n // If we do have a nomenclatural code, incorporate that into the logical\n // expression as well.\n return {\n '@type': 'owl:Class',\n intersectionOf: [{\n '@type': 'owl:Restriction',\n onProperty: owlterms.TDWG_VOC_NAME_COMPLETE,\n hasValue: this.nameComplete,\n }, {\n '@type': 'owl:Restriction',\n onProperty: owlterms.NOMENCLATURAL_CODE,\n hasValue: {\n '@id': this.nomenclaturalCode,\n },\n }],\n };\n }\n}\n\nmodule.exports = {\n TaxonNameWrapper,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/wrappers/TaxonNameWrapper.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/wrappers/TaxonNameWrapper.js", "access": "public", "description": null, "lineNumber": 1 @@ -3979,7 +3979,7 @@ "name": "src/wrappers/TaxonomicUnitWrapper.js", "content": "/** Utility functions. */\nconst {\n has,\n isArray,\n cloneDeep,\n assign,\n} = require('lodash');\n\n/** List of OWL/RDF terms we use. */\nconst owlterms = require('../utils/owlterms');\n\n/** We store the taxonomic units we extract from phylogeny labels in the Phyx Cache Manager. */\nconst { PhyxCacheManager } = require('../utils/PhyxCacheManager');\n\n/** For parsing specimen identifiers. */\nconst { SpecimenWrapper } = require('./SpecimenWrapper');\n\n/** For parsing scientific names. */\nconst { TaxonConceptWrapper } = require('./TaxonConceptWrapper');\n\n/**\n * The TaxonomicUnitWrapper wraps taxonomic units, whether on a node or being used\n * as a specifier on a phyloreference. Every taxonomic unit can additionally be\n * wrapped by more specific classes, such as {@link TaxonConceptWrapper} or\n * {@link SpecimenWrapper}. We can determine which type it is based on its\n * '@type' and whether it includes:\n * - TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT => {@link TaxonConceptWrapper}\n * - TaxonomicUnitWrapper.TYPE_SPECIMEN => {@link SpecimenWrapper}\n * - TaxonomicUnitWrapper.TYPE_APOMORPHY => reserved for future use\n * - TaxonomicUnitWrapper.TYPE_PHYLOREF => reserved for future use\n *\n * It also contains static methods for extracting\n * taxonomic units from arbitrary strings, such as phylogeny labels.\n *\n * Every taxonomic unit SHOULD have an rdfs:label and MAY include a dcterm:description\n * to describe it in human-readable terms. It MUST include a '@type' that specifies\n * what type of taxonomic unit it is.\n *\n * Taxonomic units may be specified with only an '@id' or a set of '@id's, which\n * indicate external references.\n */\n\nclass TaxonomicUnitWrapper {\n /* Types of taxonomic units we support (see documentation above). */\n\n /** A taxon or taxon concept. */\n static get TYPE_TAXON_CONCEPT() {\n return TaxonConceptWrapper.TYPE_TAXON_CONCEPT;\n }\n\n /** A specimen. */\n static get TYPE_SPECIMEN() {\n return SpecimenWrapper.TYPE_SPECIMEN;\n }\n\n /** Wrap a taxonomic unit. */\n constructor(tunit, defaultNomenCode = owlterms.NAME_IN_UNKNOWN_CODE) {\n this.tunit = tunit;\n this.defaultNomenCode = defaultNomenCode;\n }\n\n /**\n * Normalize the specified taxonomic unit.\n * @param tunit A taxonomic unit to be normalized.\n */\n static normalize(tunit) {\n const wrapped = new TaxonomicUnitWrapper(tunit);\n if (wrapped.taxonConcept) {\n return TaxonConceptWrapper.normalize(tunit);\n }\n if (wrapped.specimen) {\n return SpecimenWrapper.normalize(tunit);\n }\n if (wrapped.externalReferences) {\n // External references should only have an `@id`.\n return tunit;\n }\n return tunit;\n }\n\n /**\n * What type of specifier is this? This is an array that could contain multiple\n * classes, but should contain one of:\n * - {@link TYPE_TAXON_CONCEPT}\n * - {@link TYPE_SPECIMEN}\n */\n get types() {\n if (!has(this.tunit, '@type')) return [];\n if (isArray(this.tunit['@type'])) return this.tunit['@type'];\n return [this.tunit['@type']];\n }\n\n /**\n * Return this taxonomic unit if it is a taxon concept.\n */\n get taxonConcept() {\n if (this.types.includes(TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT)) return this.tunit;\n return undefined;\n }\n\n /**\n * Return this taxonomic unit if it is a specimen.\n */\n get specimen() {\n // Only specimens have scientific names.\n if (this.types.includes(TaxonomicUnitWrapper.TYPE_SPECIMEN)) return this.tunit;\n\n return undefined;\n }\n\n /**\n * Return the list of external references for this taxonomic unit.\n * This is just all the '@ids' of this object.\n */\n get externalReferences() {\n if (!has(this.tunit, '@id')) return [];\n if (isArray(this.tunit['@id'])) return this.tunit['@id'];\n return [this.tunit['@id']];\n }\n\n /**\n * Return the label of this taxonomic unit.\n */\n get label() {\n // A label or description for this TU?\n if (has(this.tunit, 'label')) return this.tunit.label;\n if (has(this.tunit, 'description')) return this.tunit.description;\n\n // Is this a specimen?\n if (this.specimen) {\n return new SpecimenWrapper(this.specimen).label;\n }\n\n // Is this a taxon concept?\n if (this.taxonConcept) {\n return new TaxonConceptWrapper(this.taxonConcept).label;\n }\n\n // If its neither a specimen nor a taxon concept, just list the\n // external references.\n const externalReferences = this.externalReferences;\n if (externalReferences.length > 0) {\n return externalReferences\n .map(externalRef => `<${externalRef}>`)\n .join(' and ');\n }\n\n // If we don't have any properties of a taxonomic unit, return undefined.\n return undefined;\n }\n\n /**\n * Given a label, attempt to parse it into a taxonomic unit, whether a scientific\n * name or a specimen identifier. The provided nomenclatural code is used.\n *\n * @return A taxonomic unit that this label could be parsed as.\n */\n static fromLabel(nodeLabel, nomenCode = owlterms.NAME_IN_UNKNOWN_CODE) {\n if (nodeLabel === undefined || nodeLabel === null || nodeLabel.trim() === '') return undefined;\n\n // Rather than figuring out with this label, check to see if we've parsed\n // this before.\n if (PhyxCacheManager.has(`TaxonomicUnitWrapper.taxonomicUnitsFromNodeLabelCache.${nomenCode}`, nodeLabel)) {\n return PhyxCacheManager.get(`TaxonomicUnitWrapper.taxonomicUnitsFromNodeLabelCache.${nomenCode}`, nodeLabel);\n }\n\n // Look for taxon concept.\n const taxonConcept = TaxonConceptWrapper.fromLabel(nodeLabel, nomenCode);\n\n // Look for specimen information.\n let specimen;\n if (nodeLabel.toLowerCase().startsWith('specimen ')) {\n // Eliminate a 'Specimen ' prefix if it exists.\n specimen = SpecimenWrapper.fromOccurrenceID(nodeLabel.substr(9));\n }\n\n let tunit;\n if (taxonConcept && specimen) {\n // If we have both, then treat it as a specimen that has been identified\n // to a particular taxonomic name.\n tunit = assign({}, taxonConcept, specimen);\n\n tunit['@type'] = TaxonomicUnitWrapper.TYPE_SPECIMEN;\n } else if (taxonConcept) {\n tunit = taxonConcept;\n } else if (specimen) {\n tunit = specimen;\n }\n\n // Look for external references. For now, we only check to see if the entire\n // nodeLabel starts with URL/URNs, but we should eventually just look for\n // them inside the label.\n const URL_URN_PREFIXES = [\n 'http://',\n 'https://',\n 'ftp://',\n 'sftp://',\n 'file://',\n 'urn:',\n ];\n\n if (URL_URN_PREFIXES.filter(prefix => nodeLabel.startsWith(prefix)).length > 0) {\n // The node label starts with something that looks like a URL!\n // Treat it as an external reference.\n if (tunit === undefined) tunit = {};\n tunit['@id'] = nodeLabel;\n }\n\n // Finally, let's record the label we parsed to get to this tunit!\n if (tunit) {\n tunit.label = nodeLabel;\n }\n\n // Record in the cache\n PhyxCacheManager.put(`TaxonomicUnitWrapper.taxonomicUnitsFromNodeLabelCache.${nomenCode}`, nodeLabel, tunit);\n\n return tunit;\n }\n\n /**\n * Return the JSON representation of this taxonomic unit, i.e. the object we're wrapping.\n */\n get asJSON() {\n return this.tunit;\n }\n\n /**\n * Return this taxonomic unit as an OWL/JSON-LD object.\n */\n get asJSONLD() {\n const jsonld = cloneDeep(this.tunit);\n\n // Add CDAO_TU as a type to the existing types.\n if (has(this.tunit, '@type')) {\n if (isArray(this.tunit['@type'])) this.tunit['@type'].push(owlterms.CDAO_TU);\n }\n\n const equivClass = this.asOWLEquivClass;\n if (equivClass) {\n jsonld.equivalentClass = equivClass;\n }\n\n return jsonld;\n }\n\n /**\n * Return the equivalent class expression for this taxonomic unit.\n */\n get asOWLEquivClass() {\n if (this.types.includes(TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT)) {\n return new TaxonConceptWrapper(this.tunit, this.defaultNomenCode).asOWLEquivClass;\n }\n\n if (this.types.includes(TaxonomicUnitWrapper.TYPE_SPECIMEN)) {\n return new SpecimenWrapper(this.specimen).asOWLEquivClass;\n }\n\n // Nothing we can do, so just ignore it.\n return undefined;\n }\n}\n\nmodule.exports = {\n TaxonomicUnitWrapper,\n};\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/src/wrappers/TaxonomicUnitWrapper.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/src/wrappers/TaxonomicUnitWrapper.js", "access": "public", "description": null, "lineNumber": 1 @@ -4378,16 +4378,16 @@ }, { "kind": "index", - "content": "# phyx.js\n\n[![Build Status](https://github.com/phyloref/phyx.js/workflows/Build%20and%20Test/badge.svg)](https://github.com/phyloref/phyx.js/actions?query=workflow%3A%22Build+and+Test%22)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5576556.svg)](https://doi.org/10.5281/zenodo.5576556)\n\nThe Phyloreference Exchange (PHYX) format is a JSON representation that can be\nused to store and transfer definitions of [phyloreferences]. This library provides\nclasses to help interpret some parts of these files, and for transforming an\nentire Phyx file into a [JSON-LD] representation that can be reasoned over with\nan [OWL 2 DL] reasoner. See the [Phyloreference Curation Tool] or the [Clade Ontology]\nfor examples of its usage.\n\n[Tutorials demonstrating the use of phyx.js](./tutorials/) are available.\n\n## Citation\n\nphyx.js should be cited by citing our publication documenting the Phyx format and phyx.js.\n\n> Vaidya G, Cellinese N, Lapp H. 2022. A new phylogenetic data standard for computable clade definitions: the\n> Phyloreference Exchange Format (Phyx) PeerJ 10:e12618 [doi:10.7717/peerj.12618](https://doi.org/10.7717/peerj.12618)\n\n## Funding\nFunded by the US National Science Foundation through collaborative grants [DBI-1458484]\nand [DBI-1458604]. See [Funding] for details.\n\n [phyloreferences]: http://phyloref.org\n [JSON-LD]: https://en.wikipedia.org/wiki/JSON-LD\n [OWL 2 DL]: https://www.w3.org/TR/owl2-overview/\n [Phyloreference Curation Tool]: https://github.com/phyloref/curation-tool\n [Clade Ontology]: https://github.com/phyloref/clade-ontology\n [DBI-1458484]: http://www.nsf.gov/awardsearch/showAward?AWD_ID=1458484\n [DBI-1458604]: http://www.nsf.gov/awardsearch/showAward?AWD_ID=1458604\n [Funding]: http://www.phyloref.org/about/#funding\n", - "longname": "/Users/gaurav/Development/phyloref/phyx.js/README.md", + "content": "# phyx.js\n\n[![Build Status](https://github.com/phyloref/phyx.js/workflows/Build%20and%20Test/badge.svg)](https://github.com/phyloref/phyx.js/actions?query=workflow%3A%22Build+and+Test%22)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5576556.svg)](https://doi.org/10.5281/zenodo.5576556)\n[![NPM Version](https://img.shields.io/npm/v/@phyloref/phyx)](https://www.npmjs.com/package/@phyloref/phyx)\n\nThe Phyloreference Exchange (PHYX) format is a JSON representation that can be\nused to store and transfer definitions of [phyloreferences]. This library provides\nclasses to help interpret some parts of these files, and for transforming an\nentire Phyx file into a [JSON-LD] representation that can be reasoned over with\nan [OWL 2 DL] reasoner. See the [Phyloreference Curation Tool] or the [Clade Ontology]\nfor examples of its usage.\n\n## Usage\n\nYou can install [phyx.js using npm](https://www.npmjs.com/package/@phyloref/phyx):\n\n```shell\n$ npm install @phyloref/phyx\n```\n\n[Tutorials demonstrating the use of phyx.js](./tutorials/) are available.\n\n## Citation\n\nphyx.js should be cited by citing our publication documenting the Phyx format and phyx.js.\n\n> Vaidya G, Cellinese N, Lapp H. 2022. A new phylogenetic data standard for computable clade definitions: the\n> Phyloreference Exchange Format (Phyx) PeerJ 10:e12618 [doi:10.7717/peerj.12618](https://doi.org/10.7717/peerj.12618)\n\n## Funding\nFunded by the US National Science Foundation through collaborative grants [DBI-1458484]\nand [DBI-1458604]. See [Funding] for details.\n\n [phyloreferences]: http://phyloref.org\n [JSON-LD]: https://en.wikipedia.org/wiki/JSON-LD\n [OWL 2 DL]: https://www.w3.org/TR/owl2-overview/\n [Phyloreference Curation Tool]: https://github.com/phyloref/curation-tool\n [Clade Ontology]: https://github.com/phyloref/clade-ontology\n [DBI-1458484]: http://www.nsf.gov/awardsearch/showAward?AWD_ID=1458484\n [DBI-1458604]: http://www.nsf.gov/awardsearch/showAward?AWD_ID=1458604\n [Funding]: http://www.phyloref.org/about/#funding\n", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/README.md", "name": "./README.md", "static": true, "access": "public" }, { "kind": "packageJSON", - "content": "{\n \"name\": \"@phyloref/phyx\",\n \"version\": \"1.2.0-alpha1\",\n \"description\": \"Classes and methods that help read and manipulate components of Phyloreference Exchange (PHYX) format files\",\n \"keywords\": [\n \"phylogenetics\",\n \"phylogeny\",\n \"phylogenetic definitions\",\n \"clade definitions\"\n ],\n \"homepage\": \"https://github.com/phyloref/phyx.js#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/phyloref/phyx.js/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/phyloref/phyx.js.git\"\n },\n \"license\": \"MIT\",\n \"author\": \"Gaurav Vaidya \",\n \"main\": \"src/index.js\",\n \"bin\": {\n \"phyx2owl\": \"bin/phyx2owl.js\",\n \"resolve\": \"bin/resolve.js\"\n },\n \"scripts\": {\n \"docs\": \"esdoc\",\n \"generate-every-topology\": \"every-topology-testing/generate-topologies.js\",\n \"lint\": \"eslint \\\"src/**/*.js\\\" \\\"test/**/*.js\\\" \\\"**/*.json\\\"\",\n \"phyx2owl\": \"node bin/phyx2owl.js\",\n \"resolve\": \"node bin/resolve.js\",\n \"pretest\": \"npm run lint\",\n \"test\": \"mocha --recursive\"\n },\n \"dependencies\": {\n \"jsonld\": \"^5.0.0\",\n \"lodash\": \"^4.17.20\",\n \"moment\": \"^2.27.0\",\n \"newick-js\": \"^1.2.1\",\n \"retus\": \"^1.1.1\",\n \"yargs\": \"^15.4.1\"\n },\n \"devDependencies\": {\n \"ajv\": \"^6.12.2\",\n \"chai\": \"^4.2.0\",\n \"esdoc\": \"^1.1.0\",\n \"esdoc-node\": \"^1.0.5\",\n \"esdoc-standard-plugin\": \"^1.0.0\",\n \"eslint\": \"^5.16.0\",\n \"eslint-config-airbnb-base\": \"^13.2.0\",\n \"eslint-plugin-import\": \"^2.22.1\",\n \"eslint-plugin-json-format\": \"^2.0.1\",\n \"eslint-plugin-mocha\": \"^5.3.0\",\n \"mocha\": \"^5.2.0\",\n \"nodejs-file-downloader\": \"^4.1.1\",\n \"yargs\": \"^15.3.1\"\n },\n \"esdoc\": {\n \"source\": \"./src\",\n \"destination\": \"./docs\",\n \"plugins\": [\n {\n \"name\": \"esdoc-standard-plugin\",\n \"option\": {\n \"manual\": {\n \"files\": [\n \"./CHANGELOG.md\",\n \"./tutorials/Introduction.md\"\n ]\n },\n \"test\": {\n \"source\": \"./test/\",\n \"includes\": [\n \"\\\\.js$\"\n ]\n }\n }\n },\n {\n \"name\": \"esdoc-node\"\n }\n ]\n }\n}\n", - "longname": "/Users/gaurav/Development/phyloref/phyx.js/package.json", + "content": "{\n \"name\": \"@phyloref/phyx\",\n \"version\": \"1.2.0-alpha2\",\n \"description\": \"Classes and methods that help read and manipulate components of Phyloreference Exchange (PHYX) format files\",\n \"keywords\": [\n \"phylogenetics\",\n \"phylogeny\",\n \"phylogenetic definitions\",\n \"clade definitions\"\n ],\n \"homepage\": \"https://github.com/phyloref/phyx.js#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/phyloref/phyx.js/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/phyloref/phyx.js.git\"\n },\n \"license\": \"MIT\",\n \"author\": \"Gaurav Vaidya \",\n \"main\": \"src/index.js\",\n \"bin\": {\n \"phyx2owl\": \"bin/phyx2owl.js\",\n \"resolve\": \"bin/resolve.js\"\n },\n \"scripts\": {\n \"docs\": \"esdoc\",\n \"generate-every-topology\": \"every-topology-testing/generate-topologies.js\",\n \"lint\": \"eslint \\\"src/**/*.js\\\" \\\"test/**/*.js\\\" \\\"**/*.json\\\"\",\n \"phyx2owl\": \"node bin/phyx2owl.js\",\n \"resolve\": \"node bin/resolve.js\",\n \"pretest\": \"npm run lint\",\n \"test\": \"mocha --recursive\"\n },\n \"dependencies\": {\n \"jsonld\": \"^5.0.0\",\n \"lodash\": \"^4.17.20\",\n \"moment\": \"^2.27.0\",\n \"newick-js\": \"^1.2.1\",\n \"retus\": \"^1.1.1\",\n \"yargs\": \"^15.4.1\"\n },\n \"devDependencies\": {\n \"@shinnn/eslint-config\": \"^7.0.0\",\n \"ajv\": \"^6.12.2\",\n \"chai\": \"^4.2.0\",\n \"esdoc\": \"^1.1.0\",\n \"esdoc-node\": \"^1.0.5\",\n \"esdoc-standard-plugin\": \"^1.0.0\",\n \"eslint\": \"^5.16.0\",\n \"eslint-config-airbnb-base\": \"^13.2.0\",\n \"eslint-plugin-import\": \"^2.22.1\",\n \"eslint-plugin-json-format\": \"^2.0.1\",\n \"eslint-plugin-mocha\": \"^5.3.0\",\n \"mocha\": \"^5.2.0\",\n \"nodejs-file-downloader\": \"^4.1.1\",\n \"yargs\": \"^15.3.1\"\n },\n \"esdoc\": {\n \"source\": \"./src\",\n \"destination\": \"./docs\",\n \"plugins\": [\n {\n \"name\": \"esdoc-standard-plugin\",\n \"option\": {\n \"manual\": {\n \"files\": [\n \"./CHANGELOG.md\",\n \"./tutorials/Introduction.md\"\n ]\n },\n \"test\": {\n \"source\": \"./test/\",\n \"includes\": [\n \"\\\\.js$\"\n ]\n }\n }\n },\n {\n \"name\": \"esdoc-node\"\n }\n ]\n }\n}\n", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/package.json", "name": "package.json", "static": true, "access": "public" @@ -4402,7 +4402,7 @@ }, { "kind": "manual", - "longname": "/Users/gaurav/Development/phyloref/phyx.js/CHANGELOG.md", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/CHANGELOG.md", "name": "./CHANGELOG.md", "content": "# Changelog\nAll notable changes to this library will be documented in this file.\n\nThe format is based on [Keep a Changelog] and this project adheres to [Semantic Versioning].\n\n## [Unreleased]\n\n## [1.2.0] - 2024-06-18\n- PR #138: Added normalization methods so that Phyx objects can be normalized.\n- PR #139: upgraded NPM packages and minor test fixes\n\n## [1.1.1] - 2023-08-01\n- PR #133: Add guards to some usages of `phyloref.internalSpecifiers/phyloref.externalSpecifiers`.\n- PR #136: Improved GitHub test action, including changing Node versions.\n- PR #127: Upgraded Newick.js to ^1.2.1. This means that we no longer\n support Node.js v10.x, which end-of-lifed on April 30, 2021.\n\n## [1.1.0] - 2023-05-11\n- PR #129: Added curator notes to phylorefs and phylogenies.\n- PR #128: Added citation to README and a CITATION.CFF file.\n- PR #125: Added curator information as contributors to Phyx file.\n\n## [1.0.1] - 2021-10-15\n- Created a tutorial for using phyx.js, including:\n - PR #99: Add tutorial.\n - PR #103: Improve integration of the tutorial.\n - PR #109: Add resolve.js instructions to Introduction tutorial.\n- Improvements to README files, including:\n - PR #108: Added links to published JSON-LD contexts and JSON schemas.\n - PR #110: Added note that Binder cannot be used.\n - PR #111: Changes link to tutorials to directory.\n- PR #106: Fixed typo in resolve.js.\n- Updated timeout to 60s as 20s was timing out on GitHub Actions.\n- Updated NPM packages and resorted packages in package.json.\n\n## [1.0.0] - 2021-03-16\n- Many changes across the entire library.\n- Two new scripts: `bin/phyx2owl.js` for converting a Phyx file into OWL/JSON-LD\n and `bin/resolve.js` to resolve a Phyx file on the Open Tree of Life.\n- Incorporation of JPhyloRef into testing.\n- Fixed a bug in which phyloref and phylogeny `@id` values were being overwritten when generating JSON-LD.\n- Added scripts to generate every possible topology from n=2 to n=6 with expected resolution and to test them with JPhyloRef.\n\n## [0.2.1] - 2019-08-15\n- Updated all NPM packages to their latest version.\n- Fixed a bug in which node's types were not being correctly set to obo:CDAO\\_0000140.\n\n## [0.2.0] - 2019-07-18\n### Changed\n- The single index.js has been split into multiple files, one per class, with documentation using ESdocs (#21).\n- Added support for generating \"model 2.0\" ontologies, which can be reasoned over in an OWL 2 EL reasoner such as Elk (#4). As part of this change, specifiers have been changed so that they are taxonomic units, rather than containing taxonomic units and a new Phyx context file has been created (#19).\n- Taxonomic units have been cleaned up, are clearly typed, and taxonomic names now include nomenclatural codes (#18) and support trinomial names (#22).\n\n## [0.1.2] - 2019-02-08\n### Added\n- Moved Phyx context file for JSON-LD into this repository from the Curation Tool and changed URI to point to it.\n\n## [0.1.1] - 2019-02-06\n### Added\n- A replacement for the Phylotree.js Newick parser.\n\n## [0.1.0] - 2019-01-27\n### Added\n- Transfered initial code from the [Phyloreference Curation Tool]. The initial\nrelease of this package was based on [commit 14d2c3d5d1] in that repository.\n\n### Changed\n- Replaced references to the [phylotree] library with the [newick-js] library.\n- Made other changes to the initial code as needed to work as an independent NPM package.\n\n [Unreleased]: https://github.com/phyloref/phyx.js/compare/v1.2.0...master\n [1.2.0]: https://github.com/phyloref/phyx.js/compare/v1.1.1...v1.2.0\n [1.1.1]: https://github.com/phyloref/phyx.js/compare/v1.1.0...v1.1.1\n [1.1.0]: https://github.com/phyloref/phyx.js/compare/v1.0.1...v1.1.0\n [1.0.1]: https://github.com/phyloref/phyx.js/compare/v1.0.0...v1.0.1\n [1.0.0]: https://github.com/phyloref/phyx.js/compare/v0.2.1...v1.0.0\n [0.2.1]: https://github.com/phyloref/phyx.js/compare/v0.2.0...v0.2.1\n [0.2.0]: https://github.com/phyloref/phyx.js/compare/v0.1.2...v0.2.0\n [0.1.2]: https://github.com/phyloref/phyx.js/compare/v0.1.1...v0.1.2\n [0.1.1]: https://github.com/phyloref/phyx.js/compare/v0.1.0...v0.1.1\n [0.1.0]: https://github.com/phyloref/phyx.js/releases/tag/v0.1.0\n [Keep a Changelog]: https://keepachangelog.com/en/1.0.0/\n [Semantic Versioning]: https://semver.org/spec/v2.0.0.html\n [Phyloreference Curation Tool]: http://github.com/phyloref/curation-tool\n [commit 14d2c3d5d1]: https://github.com/phyloref/curation-tool/commit/14d2c3d5d12ee4e925e29961bd46587aabfb8cd4\n [phylotree]: https://www.npmjs.com/package/phylotree\n [newick-js]: https://www.npmjs.com/package/newick-js\n", "static": true, @@ -4410,7 +4410,7 @@ }, { "kind": "manual", - "longname": "/Users/gaurav/Development/phyloref/phyx.js/tutorials/Introduction.md", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/tutorials/Introduction.md", "name": "./tutorials/Introduction.md", "content": "---\ntitle: Introduction to phyx.js\nauthor: Gaurav Vaidya\ndate: August 24, 2021\ncode-block-font-size: \\footnotesize\n---\n# Introduction to phyx.js\n\n*Written by Gaurav Vaidya. Last updated August 24, 2021*\n\nThis tutorial provides an introduction to the phyx.js library, and shows you how it can be used to read a Phyx file, check it for validity, examine [phyloreferences](https://www.phyloref.org/), phylogenies and specifiers, and describe how to convert the file into RDF.\n\n## Starting with Phyx files\n\nPhyx files are digitized clade definitions in a JSON-LD format. While you can use an editor like [Klados](https://github.com/phyloref/klados#readme) to create Phyx files, you can also write one by yourself as a JSON document.\n\n\n```javascript\nvar alligatoridae_brochu2003 = {\n \"@context\": \"https://www.phyloref.org/phyx.js/context/v1.0.0/phyx.json\",\n \n // Phylogeny from Brochu 2003: https://doi.org/10.1146/annurev.earth.31.100901.141308\n \"phylogenies\": [{\n \"newick\": \"(Parasuchia,(rauisuchians,Aetosauria,(sphenosuchians,(protosuchians,(mesosuchians,(Hylaeochampsa,Aegyptosuchus,Stomatosuchus,(Allodaposuchus,('Gavialis gangeticus',(('Diplocynodon ratelii',('Alligator mississippiensis','Caiman crocodilus')Alligatoridae)Alligatoroidea,('Tomistoma schlegelii',('Osteolaemus tetraspis','Crocodylus niloticus')Crocodylinae)Crocodylidae)Brevirostres)Crocodylia))Eusuchia)Mesoeucrocodylia)Crocodyliformes)Crocodylomorpha));\",\n \"source\": {\n \"type\": \"article\",\n \"title\": \"Phylogenetic approaches toward crocodylian history\",\n \"authors\": [{\n \"firstname\": \"Christopher\",\n \"middlename\": \"A.\",\n \"lastname\": \"Brochu\"\n }],\n \"year\": 2003,\n \"figure\": \"1\",\n \"identifier\": [{\n \"type\": \"doi\",\n \"id\": \"10.1146/annurev.earth.31.100901.141308\"\n }],\n \"journal\": {\n \"name\": \"Annual Review of Earth and Planetary Sciences\",\n \"volume\": \"31\",\n \"pages\": \"357--397\",\n \"identifier\": [{ \"type\": \"eISSN\", \"id\": \"1545-4495\" }]\n }\n }\n }],\n \n // Clade definition from Brochu 2003: Alligatoridae\n \"phylorefs\": [{\n \"label\": \"Alligatoridae\",\n \"scientificNameAuthorship\": { \"bibliographicCitation\": \"(Cuvier 1807)\" },\n \"phylorefType\": \"phyloref:PhyloreferenceUsingMinimumClade\",\n \"definition\": \"Alligatoridae (Cuvier 1807).\\n\\nLast common ancestor of Alligator mississippiensis and Caiman crocodilus and all of its descendents.\",\n \"definitionSource\": {\n \"bibliographicCitation\": \"Brochu (2003) Phylogenetic approaches toward crocodylian history. Annual Review of Earth and Planetary Sciences 31:1, 357-397. doi: 10.1146/annurev.earth.31.100901.141308\"\n },\n \"internalSpecifiers\": [\n {\n \"@type\": \"http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept\",\n \"hasName\": {\n \"@type\": \"http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName\",\n \"nomenclaturalCode\": \"http://rs.tdwg.org/ontology/voc/TaxonName#ICZN\",\n \"label\": \"Caiman crocodilus Linnaeus, 1758\",\n \"nameComplete\": \"Caiman crocodilus\",\n \"genusPart\": \"Caiman\",\n \"specificEpithet\": \"crocodilus\"\n }\n }, {\n \"@type\": \"http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept\",\n \"hasName\": {\n \"@type\": \"http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName\",\n \"nomenclaturalCode\": \"http://rs.tdwg.org/ontology/voc/TaxonName#ICZN\",\n \"label\": \"Alligator mississippiensis (Daudin, 1802)\",\n \"nameComplete\": \"Alligator mississippiensis\",\n \"genusPart\": \"Alligator\",\n \"specificEpithet\": \"mississippiensis\"\n }\n }\n ]\n }]\n}\n```\n\n## Validating a Phyx document using JSON Schema\n\nWe publish a [JSON Schema](https://json-schema.org/) with phyx.js, which can be used to validate that a Phyx document is correctly formed. We use [Ajv](https://ajv.js.org/), a JSON Schema validator for JavaScript. Note that we use the copy of the context file that is included in this repository, but you can also [download it from our website](https://www.phyloref.org/phyx.js/context/v1.0.0/schema.json).\n\n\n```javascript\nvar fs = require('fs');\nvar Ajv = require('ajv');\n\n// Configure Ajv.\nvar ajv = new Ajv({\n allErrors: true, // Display all error messages, not just the first.\n});\n\n// We use the JSON Schema included with this repository, but you can download the\n// Phyx JSON Schema from https://www.phyloref.org/phyx.js/context/v1.0.0/schema.json\nvar validator = ajv.compile(JSON.parse(fs.readFileSync('../docs/context/v1.0.0/schema.json')));\n\n// Attempt to validate the Brochu 2003 example file.\nvar result = validator(alligatoridae_brochu2003);\nconsole.log(`Is alligatoridae_brochu2003 valid? ${result}`);\nconsole.log('Errors:', validator.errors || 'none');\n\n// Let's make an invalid copy of the Brochu 2003 example file to make sure this is working.\nvar alligatoridae_brochu2003copy = {...alligatoridae_brochu2003};\ndelete alligatoridae_brochu2003copy['@context']; // @context is required for successful validation\n\nvar result = validator(alligatoridae_brochu2003copy);\nconsole.log(`Is alligatoridae_brochu2003copy valid? ${result}`);\nconsole.log('Errors:', validator.errors);\n```\n\n Is alligatoridae_brochu2003 valid? true\n Errors: none\n Is alligatoridae_brochu2003copy valid? false\n Errors: [\n {\n keyword: 'required',\n dataPath: '',\n schemaPath: '#/required',\n params: { missingProperty: '@context' },\n message: \"should have required property '@context'\"\n }\n ]\n\n\n## Examining phyloreferences, taxonomic units and taxon concepts\n\nThe phyx.js library was built in order to simplify the process of working with individual components of Phyx documents, and to facilitate the conversion of a Phyx document into OWL. The library consists of a series of [wrappers](https://www.phyloref.org/phyx.js/identifiers.html#wrappers), each of which wraps part of the document. For example, we can wrap every specifier that is a [taxonomic unit](http://purl.obolibrary.org/obo/CDAO_0000138) using the [TaxonomicUnitWrapper](https://www.phyloref.org/phyx.js/class/src/wrappers/TaxonomicUnitWrapper.js~TaxonomicUnitWrapper.html).\n\nThis provides a number of convenience methods: for example, `.internalSpecifiers` and `.externalSpecifiers` will always return lists, whether or not these are defined in the underlying phyloreference (if undefined, the methods return empty lists). There is also a `.specifiers` method that lists both internal and external specifiers.\n\nFurthermore, taxonomic units that are taxon concepts can be wrapped by a [TaxonConceptWrapper](https://www.phyloref.org/phyx.js/class/src/wrappers/TaxonConceptWrapper.js~TaxonConceptWrapper.html), which have methods for accessing the \"complete name\" (i.e. the monomial, binomial or trinomial name) and the nomenclatural code.\n\n\n```javascript\n// Load the Phyx library.\nvar phyx = require('..');\n\n// List all the phyloreferences along with their specifiers.\nalligatoridae_brochu2003.phylorefs.forEach(phyloref => {\n let wrappedPhyloref = new phyx.PhylorefWrapper(phyloref);\n \n console.log(wrappedPhyloref.label);\n \n // Extract the \"complete name\" and the nomenclatural code short name for each specifier that is a taxonomic unit.\n wrappedPhyloref.internalSpecifiers.forEach(specifier => {\n let wrappedSpecifier = new phyx.TaxonomicUnitWrapper(specifier);\n if (wrappedSpecifier.taxonConcept) {\n let wrappedTaxonConcept = new phyx.TaxonConceptWrapper(wrappedSpecifier.taxonConcept);\n console.log(` - Internal: ${wrappedTaxonConcept.nameComplete} (${wrappedTaxonConcept.nomenCodeDetails.shortName})`);\n } else {\n console.log(` - Internal: ${wrappedSpecifier.label}`);\n }\n });\n \n // Note that the phyloref doesn't have an `externalSpecifiers` key, but the wrapper provides it as an empty list\n // for ease of use.\n wrappedPhyloref.externalSpecifiers.forEach(specifier => {\n let wrappedSpecifier = new phyx.TaxonomicUnitWrapper(specifier);\n if (wrappedSpecifier.taxonConcept) {\n let wrappedTaxonConcept = new phyx.TaxonConceptWrapper(wrappedSpecifier.taxonConcept);\n console.log(` - External: ${wrappedTaxonConcept.nameComplete} (${wrappedTaxonConcept.nomenCodeDetails.shortName})`);\n } else {\n console.log(` - External: ${wrappedSpecifier.label}`);\n }\n });\n \n console.log();\n});\n```\n\n Alligatoridae\n - Internal: Caiman crocodilus (ICZN)\n - Internal: Alligator mississippiensis (ICZN)\n \n\n\n### Examining phylogenies\n\nPhylogenies are stored in JSON files as Newick strings, but the [PhylogenyWrapper](https://www.phyloref.org/phyx.js/class/src/wrappers/PhylogenyWrapper.js~PhylogenyWrapper.html) can be used to look at internal and terminal node labels and to translate the Newick string into a JSON structure for use by downstream programs.\n\n\n```javascript\nvar phylogeny = alligatoridae_brochu2003.phylogenies[0];\nconsole.log(`The phylogeny is represented by the Newick string: ${phylogeny.newick}`);\nconsole.log();\n\n// Display internal and external nodes.\nvar wrappedPhylogeny = new phyx.PhylogenyWrapper(phylogeny);\nconsole.log(`This consists of the following nodes:\\n - Internal nodes: ${wrappedPhylogeny.getNodeLabels('internal').join(', ')}`);\nconsole.log(` - Terminal nodes: ${wrappedPhylogeny.getNodeLabels('terminal').join(', ')}`);\nconsole.log();\n\n// Convert the Newick string into a JSON structure for examination.\nconsole.log(`Newick string as a JSON structure: ${JSON.stringify(phyx.PhylogenyWrapper.getParsedNewick(phylogeny.newick), undefined, 2)}`);\nconsole.log();\n```\n\n The phylogeny is represented by the Newick string: (Parasuchia,(rauisuchians,Aetosauria,(sphenosuchians,(protosuchians,(mesosuchians,(Hylaeochampsa,Aegyptosuchus,Stomatosuchus,(Allodaposuchus,('Gavialis gangeticus',(('Diplocynodon ratelii',('Alligator mississippiensis','Caiman crocodilus')Alligatoridae)Alligatoroidea,('Tomistoma schlegelii',('Osteolaemus tetraspis','Crocodylus niloticus')Crocodylinae)Crocodylidae)Brevirostres)Crocodylia))Eusuchia)Mesoeucrocodylia)Crocodyliformes)Crocodylomorpha));\n \n This consists of the following nodes:\n - Internal nodes: Alligatoridae, Alligatoroidea, Crocodylinae, Crocodylidae, Brevirostres, Crocodylia, Eusuchia, Mesoeucrocodylia, Crocodyliformes, Crocodylomorpha\n - Terminal nodes: Parasuchia, rauisuchians, Aetosauria, sphenosuchians, protosuchians, mesosuchians, Hylaeochampsa, Aegyptosuchus, Stomatosuchus, Allodaposuchus, Gavialis gangeticus, Diplocynodon ratelii, Alligator mississippiensis, Caiman crocodilus, Tomistoma schlegelii, Osteolaemus tetraspis, Crocodylus niloticus\n \n Newick string as a JSON structure: {\n \"json\": {\n \"children\": [\n {\n \"children\": [\n {\n \"label\": \"Crocodylomorpha\",\n \"children\": [\n {\n \"label\": \"Crocodyliformes\",\n \"children\": [\n {\n \"label\": \"Mesoeucrocodylia\",\n \"children\": [\n {\n \"label\": \"Eusuchia\",\n \"children\": [\n {\n \"children\": [\n {\n \"label\": \"Crocodylia\",\n \"children\": [\n {\n \"label\": \"Brevirostres\",\n \"children\": [\n {\n \"label\": \"Crocodylidae\",\n \"children\": [\n {\n \"label\": \"Crocodylinae\",\n \"children\": [\n {\n \"label\": \"Crocodylus niloticus\",\n \"name\": \"Crocodylus niloticus\"\n },\n {\n \"label\": \"Osteolaemus tetraspis\",\n \"name\": \"Osteolaemus tetraspis\"\n }\n ],\n \"name\": \"Crocodylinae\"\n },\n {\n \"label\": \"Tomistoma schlegelii\",\n \"name\": \"Tomistoma schlegelii\"\n }\n ],\n \"name\": \"Crocodylidae\"\n },\n {\n \"label\": \"Alligatoroidea\",\n \"children\": [\n {\n \"label\": \"Alligatoridae\",\n \"children\": [\n {\n \"label\": \"Caiman crocodilus\",\n \"name\": \"Caiman crocodilus\"\n },\n {\n \"label\": \"Alligator mississippiensis\",\n \"name\": \"Alligator mississippiensis\"\n }\n ],\n \"name\": \"Alligatoridae\"\n },\n {\n \"label\": \"Diplocynodon ratelii\",\n \"name\": \"Diplocynodon ratelii\"\n }\n ],\n \"name\": \"Alligatoroidea\"\n }\n ],\n \"name\": \"Brevirostres\"\n },\n {\n \"label\": \"Gavialis gangeticus\",\n \"name\": \"Gavialis gangeticus\"\n }\n ],\n \"name\": \"Crocodylia\"\n },\n {\n \"label\": \"Allodaposuchus\",\n \"name\": \"Allodaposuchus\"\n }\n ]\n },\n {\n \"label\": \"Stomatosuchus\",\n \"name\": \"Stomatosuchus\"\n },\n {\n \"label\": \"Aegyptosuchus\",\n \"name\": \"Aegyptosuchus\"\n },\n {\n \"label\": \"Hylaeochampsa\",\n \"name\": \"Hylaeochampsa\"\n }\n ],\n \"name\": \"Eusuchia\"\n },\n {\n \"label\": \"mesosuchians\",\n \"name\": \"mesosuchians\"\n }\n ],\n \"name\": \"Mesoeucrocodylia\"\n },\n {\n \"label\": \"protosuchians\",\n \"name\": \"protosuchians\"\n }\n ],\n \"name\": \"Crocodyliformes\"\n },\n {\n \"label\": \"sphenosuchians\",\n \"name\": \"sphenosuchians\"\n }\n ],\n \"name\": \"Crocodylomorpha\"\n },\n {\n \"label\": \"Aetosauria\",\n \"name\": \"Aetosauria\"\n },\n {\n \"label\": \"rauisuchians\",\n \"name\": \"rauisuchians\"\n }\n ]\n },\n {\n \"label\": \"Parasuchia\",\n \"name\": \"Parasuchia\"\n }\n ]\n }\n }\n \n\n\n### Accessing citations\n\nAnother example of a wrapper that can be used for wrapping a part of a Phyx file is the [CitationWrapper](https://www.phyloref.org/phyx.js/class/src/wrappers/CitationWrapper.js~CitationWrapper.html). This can be used to wrap citations anywhere in the Phyx file to provide a full bibliographic citation for the citation.\n\n\n```javascript\nvar wrappedPhylogenyCitation = new phyx.CitationWrapper(alligatoridae_brochu2003.phylogenies[0].source);\nconsole.log(`The source of the phylogeny in this Phyx document is: ${wrappedPhylogenyCitation.toString()}`);\n\nvar wrappedPhylorefCitation = new phyx.CitationWrapper(alligatoridae_brochu2003.phylorefs[0].definitionSource);\nconsole.log(`The definition source of the phyloreference in this Phyx document is: ${wrappedPhylorefCitation.toString()}`);\n```\n\n The source of the phylogeny in this Phyx document is: Christopher A. Brochu (2003) Phylogenetic approaches toward crocodylian history Annual Review of Earth and Planetary Sciences 31:357--397 fig 1 doi: 10.1146/annurev.earth.31.100901.141308\n The definition source of the phyloreference in this Phyx document is: Brochu (2003) Phylogenetic approaches toward crocodylian history. Annual Review of Earth and Planetary Sciences 31:1, 357-397. doi: 10.1146/annurev.earth.31.100901.141308\n\n\n### Converting a Phyx document into OWL\n\nA Phyx document (which is in JSON-LD format) can be converted into OWL/RDF in the form of [N-Quads](https://www.w3.org/TR/n-quads/) by using the `PhyxWrapper` to wrap the entire Phyx document. A base URL can be specified.\n\n\n```javascript\nnQuads = new phyx.PhyxWrapper(alligatoridae_brochu2003).toRDF('http://example.org/phyx-tutorial#');\nnQuads.then(nq => console.log(nq.slice(0, 2500) + '...'));\n```\n\n \"(Parasuchia,(rauisuchians,Aetosauria,(sphenosuchians,(protosuchians,(mesosuchians,(Hylaeochampsa,Aegyptosuchus,Stomatosuchus,(Allodaposuchus,('Gavialis gangeticus',(('Diplocynodon ratelii',('Alligator mississippiensis','Caiman crocodilus')Alligatoridae)Alligatoroidea,('Tomistoma schlegelii',('Osteolaemus tetraspis','Crocodylus niloticus')Crocodylinae)Crocodylidae)Brevirostres)Crocodylia))Eusuchia)Mesoeucrocodylia)Crocodyliformes)Crocodylomorpha));\" .\n .\n _:b165 .\n .\n _:b0 .\n .\n .\n .\n .\n .\n .\n .\n .\n _:b50 .\n {\n someNqs = nq.slice(0, 1071)\n\n var streamParser = new N3.StreamParser(),\n inputStream = Readable.from([someNqs]),\n streamWriter = new N3.StreamWriter();\n\n inputStream.pipe(streamParser);\n streamParser.pipe(streamWriter);\n streamWriter.pipe(process.stdout);\n});\n\nundefined;\n```\n\n## Navigating a Phyx document as a JSON file\n\nMost phyx.js wrappers have been designed to help interpret the more complex parts of a Phyx file, such as the phyloreferences, specifiers, phylogenies, citations and the entire Phyx document. However, since every Phyx document is also a JSON document, much of the information in the Phyx document can be accessed sufficiently easily using standard JSON libraries. In some cases, as in the demonstration below, this requires more complex code than would be necessary by using the phyx.js wrappers.\n\n\n```javascript\n// List all the phylorefs in a Phyx document.\nalligatoridae_brochu2003copy.phylorefs.forEach((phyloref, index) => {\n console.log(`- Phyloref ${index + 1}. ${phyloref.label}:`);\n (phyloref.internalSpecifiers || []).forEach(specifier => {\n console.log(` - Internal specifier: ${(specifier.hasName || {}).nameComplete}`);\n });\n (phyloref.externalSpecifiers || []).forEach(specifier => {\n console.log(` - External specifier: ${(specifier.hasName || {}).nameComplete}`);\n });\n console.log();\n});\n```\n\n \"(Parasuchia,(rauisuchians,Aetosauria,(sphenosuchians,(protosuchians,(mesosuchians,(Hylaeochampsa,Aegyptosuchus,Stomatosuchus,(Allodaposuchus,('Gavialis gangeticus',(('Diplocynodon ratelii',('Alligator mississippiensis','Caiman crocodilus')Alligatoridae)Alligatoroidea,('Tomistoma schlegelii',('Osteolaemus tetraspis','Crocodylus niloticus')Crocodylinae)Crocodylidae)Brevirostres)Crocodylia))Eusuchia)Mesoeucrocodylia)Crocodyliformes)Crocodylomorpha));\";\n ;\n _:b0_b165;\n a ;\n _:b0_b0.\n - Phyloref 1. Alligatoridae:\n - Internal specifier: Caiman crocodilus\n - Internal specifier: Alligator mississippiensis\n \n\n\n## Looking up phyloreferences on the Open Tree of Life\n\nAn included script, `resolve.js`, can be used to resolve a phyloreference on the Open Tree of Life. This can be executed from the command line by running:\n\n```bash\n$ npm run resolve test/examples/correct/brochu_2003.json\n```\n\nHowever, this script can also be invoked from within Node.js.\n\n\n```javascript\nvar child_process = require('child_process');\n\nchild = child_process.spawnSync('../bin/resolve.js', ['../test/examples/correct/brochu_2003.json'], {\n encoding: 'utf-8',\n stdio: 'pipe',\n});\nresults = JSON.parse(child.output.join('\\n'));\n\nObject.keys(results).forEach(key => {\n console.log(`- ${key}:`);\n values = results[key];\n values.forEach(value => {\n if('status' in value) {\n resolved = value['resolved'];\n console.log(` - Resolved ${value['cladeType']} clade-type phylorefence`);\n console.log(` to: ${resolved['@id']} (label: ${resolved['label']})`);\n } else if ('error' in value) {\n console.log(` - Could not resolve: ${value['error']}`);\n } else {\n console.log(` - Unable to interpret: ${JSON.stringify(value, undefined, 2)}`);\n }\n })\n});\n```\n\n - Alligatoridae:\n - Resolved minimum phylorefence\n to: https://tree.opentreeoflife.org/opentree/argus/opentree13.4@ott195670 (label: Alligatoridae)\n - Alligatorinae:\n - Resolved maximum phylorefence\n to: https://tree.opentreeoflife.org/opentree/argus/opentree13.4@ott151255 (label: Alligatorinae)\n - Caimaninae:\n - Resolved maximum phylorefence\n to: https://tree.opentreeoflife.org/opentree/argus/opentree13.4@ott195671 (label: Caimaninae)\n - Crocodyloidea:\n - Resolved maximum phylorefence\n to: https://tree.opentreeoflife.org/opentree/argus/opentree13.4@ott335582 (label: Crocodylidae)\n - Crocodylidae:\n - Resolved minimum phylorefence\n to: https://tree.opentreeoflife.org/opentree/argus/opentree13.4@ott1092501 (label: Longirostres)\n - Diplocynodontinae:\n - Could not resolve: no_mrca_found:400\n\n\n## About this notebook\n\nThis document was created as a [Jupyter Notebook](https://jupyter.org/), and the source file is available in our GitHub repository. We recommend installing [Jupyterlab via Homebrew on Mac](https://formulae.brew.sh/formula/jupyterlab#default), but [other installation options are available](https://jupyter.org/install). Once Jupyter Notebook is set up, you should be able to open this notebook for editing by running `jupyter notebook Introduction\\ to\\ phyx.js.ipynb` from the command line.\n\nWe use [IJavascript](https://github.com/n-riesco/ijavascript) to use Javascript as a kernel in Jupyter Notebook. If you would like to edit this notebook, you will need to [install this](https://github.com/n-riesco/ijavascript#installation) as well.\n", "static": true, @@ -4422,7 +4422,7 @@ "name": "test/citations.js", "content": "/*\n * Test citations.\n */\n\n// Require phyx.js, our PHYX library, and Chai for testing.\nconst chai = require('chai');\nconst phyx = require('../src');\n\n// We use Chai's Expect API.\nconst expect = chai.expect;\n\n/*\n * Citation tests check to see if the CitationWrapper works correctly.\n */\n\ndescribe('CitationWrapper', function () {\n // Some citations to use in testing.\n const citations = [{\n bibliographicCitation: 'Christopher A. Brochu (2003) Phylogenetic approaches toward crocodylian history Annual Review of Earth and Planetary Sciences 31:357--397 fig 1 doi: 10.1146/annurev.earth.31.100901.141308 URL: https://www.annualreviews.org/doi/10.1146/annurev.earth.31.100901.141308',\n citation: {\n type: 'article',\n title: 'Phylogenetic approaches toward crocodylian history',\n authors: [\n {\n name: 'Christopher A. Brochu',\n alternate: ['Brochu, Christopher A.'],\n firstname: 'Christopher',\n middlename: 'A.',\n lastname: 'Brochu',\n },\n ],\n year: 2003,\n figure: 1,\n identifier: [\n {\n type: 'doi',\n id: '10.1146/annurev.earth.31.100901.141308',\n },\n ],\n link: [\n {\n url: 'https://www.annualreviews.org/doi/10.1146/annurev.earth.31.100901.141308',\n },\n ],\n journal: {\n name: 'Annual Review of Earth and Planetary Sciences',\n volume: '31',\n pages: '357--397',\n identifier: [{\n type: 'eISSN',\n id: '1545-4495',\n }],\n },\n },\n }];\n\n describe('given an empty citation', function () {\n const wrapper = new phyx.CitationWrapper({});\n\n describe('#constructor', function () {\n it('should return a CitationWrapper', function () {\n expect(wrapper).to.be.an.instanceOf(phyx.CitationWrapper);\n });\n });\n\n describe('#toString', function () {\n it('should return undefined', function () {\n expect(wrapper.toString()).to.be.undefined;\n });\n\n it('should be settable by changing the title', function () {\n wrapper.citation.title = 'Title';\n expect(wrapper.toString()).equals('Anonymous (n.d.) Title');\n });\n });\n });\n\n citations.forEach((test, index) => {\n describe(`for test citation #${index + 1}`, function () {\n const wrapper = new phyx.CitationWrapper(test.citation);\n\n describe('#constructor', function () {\n it('should return a CitationWrapper', function () {\n expect(wrapper).to.be.an.instanceOf(phyx.CitationWrapper);\n });\n });\n\n describe('#toString', function () {\n it('should return the expected string', function () {\n expect(wrapper.toString()).to.equal(test.bibliographicCitation);\n });\n });\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/citations.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/citations.js", "access": null, "description": null, "lineNumber": 1 @@ -4588,7 +4588,7 @@ "name": "test/examples.js", "content": "/*\n * Test conversion on example files.\n */\n\nconst fs = require('fs');\nconst path = require('path');\n\nconst chai = require('chai');\nconst Ajv = require('ajv');\n\nconst phyx = require('../src');\n\nconst expect = chai.expect;\n\n/*\n * Constants\n */\n// If REPLACE_EXISTING is set to true, we replace the existing JSON-LD and N-Quads\n// files rather than comparing them -- not a good way to test, but useful when\n// the output has changed.\nconst REPLACE_EXISTING = false;\n\n/**\n * Test whether conversion of Phyx files to an OWL ontology occurs predictably.\n */\n\ndescribe('PhyxWrapper', function () {\n const ajv = new Ajv({\n allErrors: true, // Display all error messages, not just the first.\n });\n const validator = ajv.compile(\n JSON.parse(\n fs.readFileSync(\n path.resolve(__dirname, '../docs/context/development/schema.json')\n )\n )\n );\n\n describe('Test all correct example Phyx files', function () {\n const examples = fs.readdirSync(path.resolve(__dirname, './examples/correct'))\n .filter(filename => filename.endsWith('.json'));\n\n examples.forEach((example) => {\n const basename = path.resolve(__dirname, './examples/correct', path.parse(example).name);\n const jsonFilename = `${basename}.json`;\n const jsonldFilename = `${basename}.jsonld`;\n const nqFilename = `${basename}.nq`;\n\n let json;\n let jsonld;\n let nq;\n\n describe(`Test file '${example}'`, function () {\n it('should be loadable', function () {\n json = JSON.parse(fs.readFileSync(jsonFilename));\n expect(json).to.be.an('object');\n });\n\n it('should validate against our JSON schema', function () {\n const valid = validator(json);\n expect(\n validator.errors,\n `The following validation errors were generated: ${JSON.stringify(validator.errors, null, 2)}`\n ).to.be.null;\n expect(valid).to.be.true;\n });\n\n it('should be able to convertible to an OWL Ontology', function () {\n this.timeout(10000);\n jsonld = new phyx.PhyxWrapper(json)\n .asJSONLD('http://example.org/phyx.js/example#');\n if (REPLACE_EXISTING) {\n fs.writeFileSync(\n jsonldFilename,\n JSON.stringify(jsonld, null, 2)\n );\n }\n expect(jsonld).to.be.an('object');\n });\n\n it('should generate the same OWL ontology as it generated earlier', function () {\n const expectedJSONLD = JSON.parse(fs.readFileSync(jsonldFilename));\n expect(jsonld).to.deep.equal(expectedJSONLD);\n });\n\n it('should be convertible to n-quads', function () {\n this.timeout(10000);\n\n return new phyx.PhyxWrapper(json)\n .toRDF('http://example.org/phyx.js/example#', path.resolve(__dirname, 'examples', 'correct'))\n .then((rdf) => {\n nq = rdf;\n if (REPLACE_EXISTING) fs.writeFileSync(nqFilename, nq);\n expect(nq).to.be.a('string');\n });\n });\n\n it('should generate the same n-quads ontology as it generated earlier', function () {\n const expectedNQ = fs.readFileSync(nqFilename).toString();\n expect(nq).to.deep.equal(expectedNQ);\n });\n });\n });\n });\n\n describe('Test incorrect example Phyx files that should fail validation', function () {\n const filesThatShouldFailValidation = [\n {\n fileName: 'examples/incorrect/no-context.json',\n expectedErrors: [{\n dataPath: '',\n keyword: 'required',\n message: \"should have required property '@context'\",\n params: {\n missingProperty: '@context',\n },\n schemaPath: '#/required',\n }],\n },\n {\n fileName: 'examples/incorrect/invalid-specifier.json',\n expectedErrors: [\n {\n dataPath: '.phylorefs[0].internalSpecifiers',\n keyword: 'minItems',\n message: 'should NOT have fewer than 1 items',\n params: {\n limit: 1,\n },\n schemaPath: '#/properties/phylorefs/items/properties/internalSpecifiers/minItems',\n },\n {\n dataPath: '.phylorefs[0].externalSpecifiers[0].hasName',\n keyword: 'required',\n message: \"should have required property 'nameComplete'\",\n params: {\n missingProperty: 'nameComplete',\n },\n schemaPath: '#/required',\n },\n {\n dataPath: \".phylorefs[0].externalSpecifiers[0]['@type']\",\n keyword: 'enum',\n message: 'should be equal to one of the allowed values',\n params: {\n allowedValues: [\n 'http://rs.tdwg.org/dwc/terms/Occurrence',\n ],\n },\n schemaPath: '#/properties/%40type/enum',\n },\n {\n dataPath: '.phylorefs[0].externalSpecifiers[0].hasName',\n keyword: 'required',\n message: \"should have required property 'nameComplete'\",\n params: {\n missingProperty: 'nameComplete',\n },\n schemaPath: '#/required',\n },\n {\n dataPath: '.phylorefs[0].externalSpecifiers[0]',\n keyword: 'additionalProperties',\n message: 'should NOT have additional properties',\n params: {\n additionalProperty: '@type',\n },\n schemaPath: '#/definitions/taxonomic_unit_by_id/additionalProperties',\n },\n {\n dataPath: '.phylorefs[0].externalSpecifiers[0]',\n keyword: 'additionalProperties',\n message: 'should NOT have additional properties',\n params: {\n additionalProperty: 'hasName',\n },\n schemaPath: '#/definitions/taxonomic_unit_by_id/additionalProperties',\n },\n {\n dataPath: '.phylorefs[0].externalSpecifiers[0]',\n keyword: 'additionalProperties',\n message: 'should NOT have additional properties',\n params: {\n additionalProperty: 'label',\n },\n schemaPath: '#/definitions/taxonomic_unit_by_id/additionalProperties',\n },\n {\n dataPath: '.phylorefs[0].externalSpecifiers[0]',\n keyword: 'required',\n message: \"should have required property '@id'\",\n params: {\n missingProperty: '@id',\n },\n schemaPath: '#/definitions/taxonomic_unit_by_id/required',\n },\n {\n dataPath: '.phylorefs[0].externalSpecifiers[0]',\n keyword: 'anyOf',\n message: 'should match some schema in anyOf',\n params: {},\n schemaPath: '#/anyOf',\n },\n ],\n },\n {\n fileName: 'examples/incorrect/unexpected-field-in-contributor.json',\n expectedErrors: [{\n dataPath: '.contributors[0]',\n keyword: 'additionalProperties',\n message: 'should NOT have additional properties',\n params: {\n additionalProperty: 'first_name',\n },\n schemaPath: '#/definitions/contributor/additionalProperties',\n }, {\n dataPath: '.contributors[0]',\n keyword: 'additionalProperties',\n message: 'should NOT have additional properties',\n params: {\n additionalProperty: 'last_name',\n },\n schemaPath: '#/definitions/contributor/additionalProperties',\n },\n ],\n },\n ];\n\n filesThatShouldFailValidation.forEach((entry) => {\n describe(`Example file ${entry.fileName}`, function () {\n it('should not validate against our JSON schema', function () {\n const phyxContent = JSON.parse(\n fs.readFileSync(\n path.resolve(__dirname, entry.fileName)\n )\n );\n const valid = validator(phyxContent);\n expect(validator.errors).to.deep.equal(entry.expectedErrors);\n expect(valid).to.not.be.true;\n });\n });\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/examples.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/examples.js", "access": null, "description": null, "lineNumber": 1 @@ -4753,7 +4753,7 @@ "name": "test/jphyloref.js", "content": "/*\n * Use JPhyloRef to ensure that the expected JSON-LD files pass testing.\n * A different test, `examples.js`, will then test whether the current Phyx.js\n * produces a file identical to the expected JSON-LD files.\n */\n\nconst fs = require('fs');\nconst path = require('path');\nconst childProcess = require('child_process');\n\nconst Downloader = require('nodejs-file-downloader');\nconst chai = require('chai');\n\nconst expect = chai.expect;\n\n/*\n * Constants\n */\n// The version of JPhyloRef to download.\nconst JPHYLOREF_VERSION = '1.1.1';\n\n// The URL from where JPhyloRef should be downloaded.\nconst JPHYLOREF_URL = `https://repo.maven.apache.org/maven2/org/phyloref/jphyloref/${JPHYLOREF_VERSION}/jphyloref-${JPHYLOREF_VERSION}.jar`;\n// Where should the JPhyloRef be stored?\nconst JPHYLOREF_PATH = path.resolve(__dirname, `jphyloref-${JPHYLOREF_VERSION}.jar`);\n\n/**\n * Test whether the expected JSON-LD files pass testing using JPhyloRef.\n */\n\ndescribe('JPhyloRef', function () {\n describe('download JPhyloRef', function () {\n // TODO: we should eventually use SHA to ensure that we have the expected file.\n if (\n fs.existsSync(JPHYLOREF_PATH)\n && fs.statSync(JPHYLOREF_PATH).size > 0\n ) {\n it('has already been downloaded', function () {\n expect(true);\n });\n } else {\n it('should be downloadable', function () {\n this.timeout(10000);\n // Download JPhyloRef from Maven and save it to JPHYLOREF_PATH.\n return new Downloader({\n url: JPHYLOREF_URL,\n directory: path.dirname(JPHYLOREF_PATH),\n fileName: path.basename(JPHYLOREF_PATH),\n }).download();\n });\n }\n });\n\n describe('test example JSON-LD files using JPhyloRef', function () {\n fs.readdirSync(path.resolve(__dirname, 'examples', 'correct'))\n .filter(filename => filename.endsWith('.nq'))\n .forEach((filename) => {\n it(`testing ${filename}`, function () {\n this.timeout(60000);\n\n // Start JPhyloRef to test filename.\n const filePath = path.resolve(__dirname, 'examples', 'correct', filename);\n const child = childProcess.spawnSync(\n 'java',\n [\n '-jar', JPHYLOREF_PATH,\n 'test', filePath,\n ],\n {\n encoding: 'utf8',\n shell: true,\n }\n );\n const matches = /Testing complete:(\\d+) successes, (\\d+) failures, (\\d+) failures marked TODO, (\\d+) skipped./.exec(child.stderr);\n\n expect(matches, `Test result line not found in STDERR <${child.stderr}>`).to.have.lengthOf(5);\n\n // const countSuccess = Number(matches[1]);\n const countFailure = Number(matches[2]);\n const countTODOs = Number(matches[3]);\n // const countSkipped = Number(matches[4]);\n\n // We can't test for one or more successes since some example Phyx file\n // such as apomorphy-based phyloreferences don't have any successes at all.\n // expect(countSuccess, 'Expected one or more successes').to.be.greaterThan(0);\n expect(countFailure, 'Expected zero failures').to.equal(0);\n expect(countTODOs, 'Expected zero TODOs').to.equal(0);\n\n // An exit code of 0 means success. An exit code of 255 means that while\n // there were no successes, there were also no failures. Either is acceptable here.\n expect(child.status).to.be.oneOf([0, 255]);\n });\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/jphyloref.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/jphyloref.js", "access": null, "description": null, "lineNumber": 1 @@ -4841,7 +4841,7 @@ "name": "test/nomenclatural-codes.js", "content": "/*\n * Test nomenclatural code lookups and fallback behavior. While most of the\n * nomenclatural code logic is in TaxonNameWrapper, we need to provide fallback\n * nomenclatural codes in TaxonConceptWrapper, TaxonomicUnitWrapper and\n * PhylorefWrapper as well. This test file makes sure that this functionality\n * works correctly at all of these levels.\n */\n\nconst fs = require('fs');\nconst path = require('path');\n\nconst { cloneDeep } = require('lodash');\n\nconst chai = require('chai');\nconst phyx = require('../src');\nconst owlterms = require('../src/utils/owlterms');\n\n// Use Chai's expect API.\nconst expect = chai.expect;\n\n/* The list of expected fields in nomenclatural details. */\nconst EXPECTED_NOMEN_DETAIL_FIELDS = ['iri', 'shortName', 'label', 'title'];\n\n/* Some example taxon names to use. */\nconst ranaLuteiventris = {\n '@type': [\n phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n ],\n hasName: {\n label: 'Rana luteiventris',\n },\n occurrenceID: 'MVZ 225749',\n};\n\n/*\n * The nomenclatural codes are set up in TaxonNameWrapper, so that's where\n * most of the nomenclatural code behavior code exists.\n */\ndescribe('TaxonNameWrapper', function () {\n describe('#getNomenclaturalCodes', function () {\n it('should provide a non-empty list with the expected keys', function () {\n const nomenCodes = phyx.TaxonNameWrapper.getNomenclaturalCodes();\n\n expect(nomenCodes)\n .to.be.an('array')\n .that.is.not.empty;\n\n nomenCodes.forEach((nomenCode) => {\n expect(nomenCode).to.have.all.keys(EXPECTED_NOMEN_DETAIL_FIELDS);\n });\n });\n });\n\n describe('#getNomenCodeDetails', function () {\n it('should provide details for some built-in codes', function () {\n const codesToTest = {\n 'Code not known': owlterms.UNKNOWN_CODE,\n ICZN: owlterms.ICZN_CODE,\n ICN: owlterms.ICN_CODE,\n ICNP: owlterms.ICNP_CODE,\n ICTV: owlterms.ICTV_CODE,\n ICNCP: owlterms.ICNCP_CODE,\n };\n\n Object.keys(codesToTest).forEach((code) => {\n const uri = codesToTest[code];\n const details = phyx.TaxonNameWrapper.getNomenCodeDetails(uri);\n expect(details).to.have.all.keys(EXPECTED_NOMEN_DETAIL_FIELDS);\n expect(details.shortName).to.equal(code);\n });\n });\n });\n\n describe('#nomenclaturalCodeDetails', function () {\n it('should provide nomenclatural code details for an example taxon name', function () {\n const wrapper = new phyx.TaxonNameWrapper(ranaLuteiventris.hasName);\n expect(wrapper.nomenclaturalCode).to.equal(owlterms.UNKNOWN_CODE);\n expect(wrapper.nomenclaturalCodeDetails.shortName).to.equal('Code not known');\n\n const wrapperWithDefault = new phyx.TaxonNameWrapper(\n ranaLuteiventris.hasName,\n owlterms.ICZN_CODE\n );\n expect(wrapperWithDefault.nomenclaturalCode).to.equal(owlterms.ICZN_CODE);\n expect(wrapperWithDefault.nomenclaturalCodeDetails.shortName).to.equal('ICZN');\n\n const nameWithNomenCode = cloneDeep(ranaLuteiventris.hasName);\n nameWithNomenCode.nomenclaturalCode = owlterms.ICZN_CODE;\n const wrapperWithExplicit = new phyx.TaxonNameWrapper(nameWithNomenCode, owlterms.ICN_CODE);\n expect(wrapperWithExplicit.nomenclaturalCode).to.equal(owlterms.ICZN_CODE);\n expect(wrapperWithExplicit.nomenclaturalCodeDetails.shortName).to.equal('ICZN');\n });\n });\n});\n\n/*\n * Make sure we can set a default nomenclatural code in TaxonConceptWrapper.\n */\ndescribe('TaxonConceptWrapper', function () {\n describe('#nomenCode', function () {\n const wrapper = new phyx.TaxonConceptWrapper(ranaLuteiventris);\n\n it('should return UNKNOWN_CODE if one is not set', function () {\n expect(wrapper.nomenCode).to.equal(owlterms.UNKNOWN_CODE);\n });\n\n it('should return the default nomenclatural code if one is provided', function () {\n const wrapperWithDefault = new phyx.TaxonConceptWrapper(ranaLuteiventris, owlterms.ICZN_CODE);\n expect(wrapperWithDefault.nomenCode).to.equal(owlterms.ICZN_CODE);\n expect(wrapperWithDefault.nomenCodeDetails.shortName).to.equal('ICZN');\n });\n });\n});\n\n/*\n * There are two ways in which nomenclatural codes can be set at the Phyx level:\n * (1) If there is a `defaultNomenclaturalCodeIRI` field at the Phyx level,\n * that will be used to provide a nomenclatural code for all specifiers\n * without a nomenclatural code as well as for all the phylogeny nodes.\n * (2) If no `defaultNomenclaturalCodeIRI` is provided, but all the specifiers\n * on all the phylorefs in the file have the same nomenclatural code, then\n * that code will be used on all the phylogeny nodes.\n */\ndescribe('PhyxWrapper', function () {\n it('should use the defaultNomenclaturalCodeIRI for phylogeny nodes', function () {\n // The examples/correct/alligatoridae_default_nomen_code.json file has\n // a `defaultNomenclaturalCodeIRI`.\n const json = JSON.parse(fs.readFileSync(\n path.resolve(__dirname, './examples/correct/alligatoridae_default_nomen_code.json')\n ));\n\n // Make sure this is the right example file.\n expect(json, 'Expected alligatoridae_default_nomen_code.json to include a defaultNomenclaturalCodeIRI value.')\n .to.include.key('defaultNomenclaturalCodeIRI');\n const defaultNomenclaturalCodeIRI = json.defaultNomenclaturalCodeIRI;\n\n const jsonld = new phyx.PhyxWrapper(json).asJSONLD();\n\n // Step 1. Check the phyloreferences. Neither specifier has a nomenclatural code,\n // but they should pick up the default nomenclatural code for the Phyx file.\n expect(jsonld.phylorefs).to.be.an('array').of.length(1);\n const phyloref1 = jsonld.phylorefs[0];\n expect(phyloref1).to.be.an('object').and.to.include.key('equivalentClass');\n\n const equivalentClass = phyloref1.equivalentClass;\n const specifierExprs = equivalentClass.someValuesFrom.intersectionOf;\n expect(specifierExprs).to.be.an('array').with.length(2);\n\n specifierExprs.forEach((specifierExpr) => {\n const nameExprs = specifierExpr.someValuesFrom.someValuesFrom.intersectionOf;\n\n expect(nameExprs).to.be.an('array').with.length(2).and.to.deep.include(\n {\n '@type': 'owl:Restriction',\n onProperty: 'http://rs.tdwg.org/ontology/voc/TaxonName#nomenclaturalCode',\n hasValue: {\n '@id': defaultNomenclaturalCodeIRI,\n },\n }\n );\n });\n\n // Step 2. Check the phylogenies.\n expect(jsonld).to.include.key('phylogenies');\n expect(jsonld.phylogenies).to.be.an('array').with.length(1);\n\n const phylogeny1 = jsonld.phylogenies[0];\n expect(phylogeny1).to.include.key('nodes');\n\n phylogeny1.nodes.forEach((node) => {\n const nodeType = node['rdf:type'];\n\n // There should be at least one type definition: obo:CDAO_0000140.\n expect(nodeType[0]).to.deep.equal({\n '@id': 'obo:CDAO_0000140',\n });\n\n // The second type definition -- if it exists -- must be a name entry,\n // which should include the appropriate nomenclatural code.\n if (nodeType.length > 1) {\n const nameEntry = nodeType[1];\n expect(nameEntry.someValuesFrom.someValuesFrom.intersectionOf).to.deep.include(\n {\n '@type': 'owl:Restriction',\n onProperty: 'http://rs.tdwg.org/ontology/voc/TaxonName#nomenclaturalCode',\n hasValue: {\n '@id': defaultNomenclaturalCodeIRI,\n },\n }\n );\n }\n });\n });\n\n it('should use the inferred nomenclatural code for phylogeny nodes', function () {\n // The examples/correct/alligatoridae_inferred_nomen_code.json file does not have\n // a `defaultNomenclaturalCodeIRI`, but the nomenclatural code can be inferred from\n // its specifiers.\n const json = JSON.parse(fs.readFileSync(\n path.resolve(__dirname, './examples/correct/alligatoridae_inferred_nomen_code.json')\n ));\n\n // Make sure this is the right example file.\n expect(json, 'Expected alligatoridae_inferred_nomen_code.json to not include a defaultNomenclaturalCodeIRI value.')\n .to.not.include.key('defaultNomenclaturalCodeIRI');\n\n const wrapped = new phyx.PhyxWrapper(json);\n const inferredNomenCode = wrapped.defaultNomenCode;\n expect(inferredNomenCode).to.equal(owlterms.ICZN_CODE);\n\n const jsonld = wrapped.asJSONLD();\n\n // Step 1. Check the phyloreferences. Since only *Caiman crocodilus* has a\n // nomenclatural code set, we should make sure that the other specifier\n // picks up the inferred nomenclatural code of the entire file.\n expect(jsonld.phylorefs).to.be.an('array').of.length(1);\n const phyloref1 = jsonld.phylorefs[0];\n expect(phyloref1).to.be.an('object').and.to.include.key('equivalentClass');\n\n const equivalentClass = phyloref1.equivalentClass;\n const specifierExprs = equivalentClass.someValuesFrom.intersectionOf;\n expect(specifierExprs).to.be.an('array').with.length(2);\n\n specifierExprs.forEach((specifierExpr) => {\n const nameExprs = specifierExpr.someValuesFrom.someValuesFrom.intersectionOf;\n\n expect(nameExprs).to.be.an('array').with.length(2).and.to.deep.include(\n {\n '@type': 'owl:Restriction',\n onProperty: 'http://rs.tdwg.org/ontology/voc/TaxonName#nomenclaturalCode',\n hasValue: {\n '@id': inferredNomenCode,\n },\n }\n );\n });\n\n // Step 2. Check the phylogenies.\n expect(jsonld).to.include.key('phylogenies');\n expect(jsonld.phylogenies).to.be.an('array').with.length(1);\n\n const phylogeny1 = jsonld.phylogenies[0];\n expect(phylogeny1).to.include.key('nodes');\n\n phylogeny1.nodes.forEach((node) => {\n const nodeType = node['rdf:type'];\n\n // There should be at least one type definition: obo:CDAO_0000140.\n expect(nodeType[0]).to.deep.equal({\n '@id': 'obo:CDAO_0000140',\n });\n\n // The second type definition -- if it exists -- must be a name entry,\n // which should include the appropriate nomenclatural code.\n if (nodeType.length > 1) {\n const nameEntry = nodeType[1];\n expect(nameEntry.someValuesFrom.someValuesFrom.intersectionOf).to.deep.include(\n {\n '@type': 'owl:Restriction',\n onProperty: 'http://rs.tdwg.org/ontology/voc/TaxonName#nomenclaturalCode',\n hasValue: {\n '@id': inferredNomenCode,\n },\n }\n );\n }\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/nomenclatural-codes.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/nomenclatural-codes.js", "access": null, "description": null, "lineNumber": 1 @@ -5034,7 +5034,7 @@ "name": "test/normalization.js", "content": "/*\n * Test normalization on examples/correct/normalization files.\n */\n\nconst fs = require('fs');\nconst path = require('path');\n\nconst chai = require('chai');\n\nconst phyx = require('../src');\n\nconst expect = chai.expect;\n\n/**\n * When making the comparisons, we need to remove the `@id`s which would otherwise be different\n * between the phylorefs being compared.\n *\n * @param phyloref The phyloref whose '@id' needs to be removed.\n */\nfunction removeId(phyloref) {\n // Shallow copy the phyloref.\n const copiedPhyloref = Object.assign({}, phyloref);\n // Delete the '@id'.\n delete copiedPhyloref['@id'];\n return copiedPhyloref;\n}\n\n\n/**\n * Test whether normalization of phyloreferences and phylogenies work as expected.\n * This test does not cover Phyx normalization.\n */\n\ndescribe('Phyloref and phylogeny normalization', function () {\n describe('Test all normalization Phyx files', function () {\n /*\n * Normalization Phyx files consist of a number of phyloreferences and phylogenies. We can\n * test them by confirming:\n * - every phyloref or phylogeny should be DIFFERENT from every other.\n * - every phyloref or phylogeny whose `@id` ends with `_same` should be IDENTICAL to\n * every other phyloref or phylogeny whose `@id` ends with `_same` after NORMALIZATION (to\n * test non-same phyloref or phylogeny files, they should be placed in different files).\n * - every phyloref or phylogeny whose `@id` ends with `_different` should be DIFFERENT to\n * every phyloref or phylogeny whose `@id` ends with `_same` even after NORMALIZATION.\n */\n const normalizationExamples = fs\n .readdirSync(path.resolve(__dirname, './examples/correct/normalization'))\n .filter(filename => filename.endsWith('.json'));\n\n normalizationExamples.forEach((example) => {\n const basename = path.resolve(__dirname, './examples/correct/normalization', path.parse(example).name);\n const jsonFilename = `${basename}.json`;\n\n describe(`Normalization test file '${example}'`, function () {\n const phyxDoc = JSON.parse(fs.readFileSync(jsonFilename));\n const phylorefs = phyxDoc.phylorefs || [];\n const samePhylorefs = phylorefs.filter(p => (p['@id'] || '').endsWith('_same'));\n const differentPhylorefs = phylorefs.filter(p => (p['@id'] || '').endsWith('_different'));\n\n // We don't need phylogeny normalization yet, so there's no point in testing them.\n describe('Test phylogenies', function () {\n it(\"These tests have not yet been implemented since we don't have an urgent need for them.\");\n });\n\n // So we only focus on phyloreference normalization.\n describe('Test phyloreferences', function () {\n it('should have multiple same phyloreferences for testing', function () {\n expect(samePhylorefs).to.not.be.empty;\n });\n\n it('should not have any duplicate phylorefs (which would be pointless)', function () {\n // No two phyloreferences in a normalization file should be deeply identical to each\n // other, otherwise the test will be pointless.\n phylorefs.forEach((phyloref1) => {\n phylorefs.forEach((phyloref2) => {\n if (phyloref1 === phyloref2) return;\n expect(removeId(phyloref1))\n .to\n .not\n .deep\n .equal(removeId(phyloref2),\n 'No two phyloreferences in a single normalization file should be identical.');\n });\n });\n });\n\n it('should have pairs of `_same` phylorefs that are different, but are identical after normalization', function () {\n // Every pair of `_same` phyloreferences should be different.\n samePhylorefs.forEach((phyloref1) => {\n samePhylorefs.forEach((phyloref2) => {\n if (phyloref1 === phyloref2) return;\n expect(\n removeId(phyx.PhylorefWrapper.normalize(phyloref1))\n )\n .to\n .deep\n .equal(\n removeId(phyx.PhylorefWrapper.normalize(phyloref2)),\n `Expected phyloref ${phyloref1['@id']} to deeply equal ${phyloref2['@id']} `\n + 'after normalization'\n );\n });\n });\n });\n\n it('should have pairs of `_different` phylorefs that are different before and after normalization', function () {\n // Every pair of `_different` phyloreferences should be different from every `_same`\n // phyloreference, even after normalization.\n differentPhylorefs.forEach((phyloref1) => {\n samePhylorefs.forEach((phyloref2) => {\n if (phyloref1 === phyloref2) return;\n expect(\n removeId(phyx.PhylorefWrapper.normalize(phyloref1))\n )\n .to\n .not\n .deep\n .equal(\n removeId(phyx.PhylorefWrapper.normalize(phyloref2)),\n `Expected phyloref ${phyloref1['@id']} to not deeply equal ${phyloref2['@id']} `\n + 'after normalization'\n );\n });\n });\n });\n });\n });\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/normalization.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/normalization.js", "access": null, "description": null, "lineNumber": 1 @@ -5174,7 +5174,7 @@ "name": "test/phylogenies.js", "content": "/*\n * Test phylogenies.\n */\n\n// Load phyx.js, our PHYX library, and chai for testing.\nconst chai = require('chai');\nconst phyx = require('../src');\n\n// Make it easier to access owlterms.\nconst owlterms = require('../src/utils/owlterms');\n\n// Use Chai's expect API for testing.\nconst expect = chai.expect;\n\n/*\n * These tests focus on three aspects of PhylogenyWrapper:\n * - Whether it can detect errors in an input Newick string.\n * - Retrieve taxonomic units from the phylogeny based on either their node label\n * or on the additional properties associated with the phylogeny.\n * - Whether we can match specifiers with nodes on the phylogeny if they share\n * taxonomic units that match.\n */\n\ndescribe('PhylogenyWrapper', function () {\n describe('#constructor', function () {\n describe('when used to wrap an empty object', function () {\n it('should return a PhylogenyWrapper object', function () {\n expect(new phyx.PhylogenyWrapper({}))\n .to.be.an.instanceOf(phyx.PhylogenyWrapper);\n });\n });\n });\n\n describe('#getErrorsInNewickString', function () {\n describe('when given a correct Newick string', function () {\n const correctNewickStrings = [\n '(A:3, B:5, (C:6, N:7));',\n ];\n\n it('should return an empty list of errors', function () {\n correctNewickStrings.forEach((str) => {\n expect(phyx.PhylogenyWrapper.getErrorsInNewickString(str)).to.be.empty;\n });\n });\n });\n\n describe('when given an empty Newick string', function () {\n const emptyNewickStrings = [\n '()',\n '(); ',\n ];\n\n it('should return a single \"No phylogeny entered\" error', function () {\n emptyNewickStrings.forEach((newick) => {\n const errors = phyx.PhylogenyWrapper.getErrorsInNewickString(newick);\n expect(errors).to.have.length(1);\n expect(errors[0].title).to.equal('No phylogeny entered');\n });\n });\n });\n\n describe('when given an unbalanced Newick string', function () {\n const unbalancedNewickString = [\n {\n newick: '(A, B))',\n expected: 'You have 1 too few open parentheses',\n },\n {\n newick: '(A, (B, (C, D))',\n expected: 'You have 1 too many open parentheses',\n },\n {\n newick: '(A, (B, (C, (((D))',\n expected: 'You have 4 too many open parentheses',\n },\n ];\n\n it('should report how many parentheses are missing', function () {\n unbalancedNewickString.forEach((entry) => {\n const errors = phyx.PhylogenyWrapper.getErrorsInNewickString(entry.newick);\n\n // We should get two errors.\n expect(errors).to.have.lengthOf(2);\n\n // Should include an error about the unbalanced parentheses.\n expect(errors[0].title).to.equal('Unbalanced parentheses in Newick string');\n expect(errors[0].message).to.equal(entry.expected);\n\n // Should include an error passed on from the Newick parser.\n expect(errors[1].title).to.equal('Error parsing phylogeny');\n expect(errors[1].message).to.include('An error occured while parsing this phylogeny:');\n });\n });\n });\n\n describe('when given an incomplete Newick string', function () {\n const incompleteNewickStrings = [\n ';',\n '))(A, (B, ',\n ];\n\n it('should report an error parsing the phylogeny', function () {\n incompleteNewickStrings.forEach((newick) => {\n const errors = phyx.PhylogenyWrapper.getErrorsInNewickString(newick);\n\n expect(errors).to.have.lengthOf(1);\n expect(errors[0].title).to.equal('Error parsing phylogeny');\n expect(errors[0].message).to.include('An error occured while parsing this phylogeny:');\n });\n });\n });\n });\n\n describe('#getNodeLabels', function () {\n const tests = [\n {\n // Note that 'newick' is the input for this test.\n newick: '(A, (B, (C, D))E, F, (G, (H, I, J)K, L)M, N)O',\n // The following keys indicate the expected all/internal/terminal node labels\n // for the given Newick string.\n nodeLabels: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'],\n internalNodeLabels: ['E', 'K', 'M', 'O'],\n terminalNodeLabels: ['A', 'B', 'C', 'D', 'F', 'G', 'H', 'I', 'J', 'L', 'N'],\n },\n ];\n\n tests.forEach((test) => {\n const wrapper = new phyx.PhylogenyWrapper({ newick: test.newick });\n\n describe('For a particular Newick phylogeny', function () {\n it('should return a list of all node labels by default', function () {\n expect(wrapper.getNodeLabels().sort())\n .to.have.members(test.nodeLabels.sort());\n });\n\n it('should return a list of internal labels when asked for internal labels', function () {\n expect(wrapper.getNodeLabels('internal').sort())\n .to.have.members(test.internalNodeLabels.sort());\n });\n\n it('should return a list of terminal labels when asked for terminal labels', function () {\n expect(wrapper.getNodeLabels('terminal').sort())\n .to.have.members(test.terminalNodeLabels.sort());\n });\n });\n });\n });\n\n describe('given a particular phylogeny with additional node properties', function () {\n const wrapper = new phyx.PhylogenyWrapper({\n newick: '((MVZ225749, MVZ191016), Rana boylii)',\n additionalNodeProperties: {\n MVZ225749: {\n representsTaxonomicUnits: [{\n '@type': [\n phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n ],\n nameString: 'Rana luteiventris',\n occurrenceID: 'MVZ:225749',\n }],\n },\n MVZ191016: {\n representsTaxonomicUnits: [{\n '@type': [\n phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n ],\n nameString: 'Rana luteiventris',\n occurrenceID: 'MVZ:191016',\n }],\n },\n },\n });\n\n describe('#getNodeLabels', function () {\n it('should return the list of node labels from the Newick string', function () {\n expect(wrapper.getNodeLabels().sort())\n .to.have.members([\n 'MVZ191016',\n 'MVZ225749',\n 'Rana boylii',\n ]);\n });\n });\n\n describe('#getTaxonomicUnitsForNodeLabel', function () {\n it('should return the list of taxonomic units using information from additional node properties', function () {\n expect(wrapper.getTaxonomicUnitsForNodeLabel('MVZ191016')).to.deep.equal([{\n '@type': [\n phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n ],\n nameString: 'Rana luteiventris',\n occurrenceID: 'MVZ:191016',\n }]);\n\n expect(wrapper.getTaxonomicUnitsForNodeLabel('MVZ225749')).to.deep.equal([{\n '@type': [\n phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n ],\n nameString: 'Rana luteiventris',\n occurrenceID: 'MVZ:225749',\n }]);\n\n expect(wrapper.getTaxonomicUnitsForNodeLabel('Rana boylii')).to.deep.equal([{\n '@type': owlterms.TDWG_VOC_TAXON_CONCEPT,\n label: 'Rana boylii',\n hasName: {\n '@type': 'http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName',\n label: 'Rana boylii',\n nameComplete: 'Rana boylii',\n genusPart: 'Rana',\n specificEpithet: 'boylii',\n },\n }]);\n });\n });\n\n describe('#getNodeLabelsMatchedBySpecifier', function () {\n it('should match a specifier to MVZ225749 based on occurrence ID', function () {\n const specifier1 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n occurrenceID: 'MVZ:225749',\n };\n expect(wrapper.getNodeLabelsMatchedBySpecifier(specifier1))\n .to.have.members(['MVZ225749']);\n });\n\n it('should match a specifier to MVZ191016 based on occurrence ID', function () {\n const specifier2 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n occurrenceID: 'MVZ:191016',\n };\n\n expect(wrapper.getNodeLabelsMatchedBySpecifier(specifier2))\n .to.have.members(['MVZ191016']);\n });\n\n it('should match a specifier to node \"Rana boylii\" based on the parsed scientific name', function () {\n const specifier3 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n nameString: 'Rana boylii',\n };\n\n expect(wrapper.getNodeLabelsMatchedBySpecifier(specifier3))\n .to.have.members(['Rana boylii']);\n });\n });\n });\n\n describe('#asJSONLD', function () {\n it('should preserve an existing @id on input phylogenies', function () {\n const jsonld = new phyx.PhylogenyWrapper({\n '@id': '#providedId',\n newick: '((Homo_sapiens, Panthera_tigris), Mus_musculus)',\n }).asJSONLD('#phylogeny0');\n expect(jsonld).to.have.property('@id');\n expect(jsonld['@id']).to.equal('#providedId');\n });\n it('should generate a new @id on input phylorefs', function () {\n const jsonld = new phyx.PhylogenyWrapper({\n newick: '((Homo_sapiens, Panthera_tigris), Mus_musculus)',\n }, owlterms.ICZN_CODE).asJSONLD('#phylogeny0');\n expect(jsonld).to.have.property('@id');\n expect(jsonld['@id']).to.equal('#phylogeny0');\n });\n it('should generate the phylogeny in JSON-LD as expected', function () {\n const expectedResults = [\n {\n newick: '((Homo_sapiens, Panthera_tigris), Mus_musculus)',\n jsonld: {\n '@id': '#',\n '@type': 'phyloref:ReferencePhylogenyEvidence',\n hasRootNode: { '@id': '#_node0' },\n newick: '((Homo_sapiens, Panthera_tigris), Mus_musculus)',\n nodes: [\n {\n '@id': '#_node0',\n children: ['#_node1', '#_node2'],\n 'rdf:type': [{ '@id': owlterms.CDAO_NODE }],\n },\n {\n '@id': '#_node1',\n 'rdf:type': [\n { '@id': owlterms.CDAO_NODE },\n {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.CDAO_REPRESENTS_TU,\n someValuesFrom: {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.TDWG_VOC_HAS_NAME,\n someValuesFrom: {\n '@type': owlterms.OWL_CLASS,\n intersectionOf: [{\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: 'Mus musculus',\n onProperty: owlterms.TDWG_VOC_NAME_COMPLETE,\n }, {\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: {\n '@id': owlterms.ICZN_CODE,\n },\n onProperty: owlterms.NOMENCLATURAL_CODE,\n }],\n },\n },\n },\n ],\n labels: ['Mus_musculus'],\n parent: '#_node0',\n representsTaxonomicUnits: [{\n '@type': owlterms.TDWG_VOC_TAXON_CONCEPT,\n hasName: {\n '@type': owlterms.TDWG_VOC_TAXON_NAME,\n genusPart: 'Mus',\n label: 'Mus_musculus',\n nameComplete: 'Mus musculus',\n nomenclaturalCode: owlterms.ICZN_CODE,\n specificEpithet: 'musculus',\n },\n label: 'Mus_musculus',\n }],\n siblings: ['#_node2'],\n },\n {\n '@id': '#_node2',\n children: ['#_node3', '#_node4'],\n 'rdf:type': [{ '@id': owlterms.CDAO_NODE }],\n parent: '#_node0',\n siblings: ['#_node1'],\n },\n {\n '@id': '#_node3',\n 'rdf:type': [\n { '@id': owlterms.CDAO_NODE },\n {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.CDAO_REPRESENTS_TU,\n someValuesFrom: {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.TDWG_VOC_HAS_NAME,\n someValuesFrom: {\n '@type': owlterms.OWL_CLASS,\n intersectionOf: [{\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: 'Panthera tigris',\n onProperty: owlterms.TDWG_VOC_NAME_COMPLETE,\n }, {\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: {\n '@id': owlterms.ICZN_CODE,\n },\n onProperty: owlterms.NOMENCLATURAL_CODE,\n }],\n },\n },\n },\n ],\n labels: ['Panthera_tigris'],\n parent: '#_node2',\n representsTaxonomicUnits: [{\n '@type': owlterms.TDWG_VOC_TAXON_CONCEPT,\n hasName: {\n '@type': owlterms.TDWG_VOC_TAXON_NAME,\n genusPart: 'Panthera',\n label: 'Panthera_tigris',\n nameComplete: 'Panthera tigris',\n nomenclaturalCode: owlterms.ICZN_CODE,\n specificEpithet: 'tigris',\n },\n label: 'Panthera_tigris',\n }],\n siblings: ['#_node4'],\n },\n {\n '@id': '#_node4',\n 'rdf:type': [\n { '@id': owlterms.CDAO_NODE },\n {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.CDAO_REPRESENTS_TU,\n someValuesFrom: {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.TDWG_VOC_HAS_NAME,\n someValuesFrom: {\n '@type': owlterms.OWL_CLASS,\n intersectionOf: [{\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: 'Homo sapiens',\n onProperty: owlterms.TDWG_VOC_NAME_COMPLETE,\n }, {\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: {\n '@id': owlterms.ICZN_CODE,\n },\n onProperty: owlterms.NOMENCLATURAL_CODE,\n }],\n },\n },\n },\n ],\n labels: ['Homo_sapiens'],\n parent: '#_node2',\n representsTaxonomicUnits: [\n {\n '@type': owlterms.TDWG_VOC_TAXON_CONCEPT,\n hasName: {\n '@type': owlterms.TDWG_VOC_TAXON_NAME,\n genusPart: 'Homo',\n label: 'Homo_sapiens',\n nameComplete: 'Homo sapiens',\n nomenclaturalCode: owlterms.ICZN_CODE,\n specificEpithet: 'sapiens',\n },\n label: 'Homo_sapiens',\n },\n ],\n siblings: ['#_node3'],\n },\n ],\n },\n },\n ];\n\n expectedResults.forEach((expected) => {\n const wrapper = new phyx.PhylogenyWrapper({\n '@id': '#',\n newick: expected.newick,\n }, owlterms.ICZN_CODE);\n expect(wrapper.asJSONLD('#phylogeny0')).to.deep.equal(expected.jsonld);\n });\n });\n });\n\n describe('#getParsedNewickWithIRIs', function () {\n const tests = [\n {\n newick: '(((A, B)C, D)E, F)G',\n result: {\n json: {\n '@id': '_node0',\n name: 'G',\n label: 'G',\n children: [\n { '@id': '_node1', name: 'F', label: 'F' },\n {\n '@id': '_node2',\n name: 'E',\n label: 'E',\n children: [\n { '@id': '_node3', name: 'D', label: 'D' },\n {\n '@id': '_node4',\n name: 'C',\n label: 'C',\n children: [\n { '@id': '_node5', name: 'B', label: 'B' },\n { '@id': '_node6', name: 'A', label: 'A' },\n ],\n },\n ],\n },\n ],\n },\n },\n },\n ];\n\n tests.forEach((test) => {\n it('should be able to parse a provided Newick string as expected', function () {\n expect(new phyx.PhylogenyWrapper({ newick: test.newick }).getParsedNewickWithIRIs(''))\n .to.deep.equal(test.result);\n });\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/phylogenies.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/phylogenies.js", "access": null, "description": null, "lineNumber": 1 @@ -5614,7 +5614,7 @@ "name": "test/phylorefs.js", "content": "/*\n * Test phyloreferences.\n */\n\n// Require phyx.js, our PHYX library, and Chai for testing.\nconst chai = require('chai');\nconst phyx = require('../src');\n\n// Use owlterms so we don't have to repeat OWL terms.\nconst owlterms = require('../src/utils/owlterms');\n\n// We use Chai's Expect API.\nconst expect = chai.expect;\n\n/*\n * Phyloref tests cover three aspects of phyloreferences:\n * - Whether we can create a phyloref with a particular set of specifiers,\n * and whether we can correctly change the type of a specifer (from 'External'\n * to 'Internal'), delete specifiers, and retrieve specifier labels.\n * - Whether we can determine to which node a phyloref is expected to resolve to\n * by using additionalNodeProperties.\n * - Whether we can update the phyloref's status several times and retrieve the\n * full history of its status changes.\n */\n\ndescribe('PhylorefWrapper', function () {\n // Some specifiers to use in testing.\n const specifier1 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n occurrenceID: 'MVZ:225749',\n };\n const specifier2 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n occurrenceID: 'MVZ:191016',\n };\n const specifier3 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n hasName: {\n '@type': phyx.TaxonNameWrapper.TYPE_TAXON_NAME,\n nomenclaturalCode: owlterms.ICZN_CODE,\n nameComplete: 'Rana boylii',\n },\n };\n const specifier4 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n hasName: {\n '@type': phyx.TaxonNameWrapper.TYPE_TAXON_NAME,\n nomenclaturalCode: owlterms.ICN_CODE,\n nameComplete: 'Mangifera indica',\n },\n };\n\n describe('given an empty phyloreference', function () {\n const wrapper = new phyx.PhylorefWrapper({});\n\n describe('#constructor', function () {\n it('should return a PhylorefWrapper', function () {\n expect(wrapper).to.be.an.instanceOf(phyx.PhylorefWrapper);\n });\n });\n\n describe('#label', function () {\n it('should return undefined', function () {\n expect(wrapper.label).to.be.undefined;\n });\n\n it('should be settable by assigning to .label', function () {\n wrapper.label = 'phyloref1';\n expect(wrapper.label).equals('phyloref1');\n });\n });\n\n describe('#specifiers', function () {\n it('should initially return an empty list', function () {\n expect(wrapper.specifiers).to.be.empty;\n });\n\n it('should initially return a nomenclatural code of unknown', function () {\n expect(wrapper.defaultNomenCode).to.equal(owlterms.UNKNOWN_CODE);\n });\n\n describe('when a new external specifier is added using .externalSpecifiers', function () {\n it('should return a list with the new specifier', function () {\n wrapper.externalSpecifiers.push(specifier3);\n expect(wrapper.specifiers).to.deep.equal([specifier3]);\n });\n\n it('should return a nomenclatural code of ICZN', function () {\n expect(wrapper.defaultNomenCode).to.equal(owlterms.ICZN_CODE);\n });\n });\n\n describe('when a new external specifier is added using .externalSpecifiers', function () {\n it('should return a list with the new specifier', function () {\n wrapper.externalSpecifiers.push(specifier2);\n expect(wrapper.specifiers).to.deep.equal([specifier3, specifier2]);\n });\n\n it('should return two nomenclatural codes, one for each specifier', function () {\n expect(wrapper.uniqNomenCodes).to.have.lengthOf(2);\n expect(wrapper.uniqNomenCodes).to.include(owlterms.ICZN_CODE);\n expect(wrapper.uniqNomenCodes).to.include(owlterms.UNKNOWN_CODE);\n });\n\n it('should still return a nomenclatural code of ICZN', function () {\n expect(wrapper.defaultNomenCode).to.equal(owlterms.ICZN_CODE);\n });\n });\n\n describe('when a new internal specifier is added using .internalSpecifiers', function () {\n it('should return a list with the new specifier', function () {\n wrapper.internalSpecifiers.push(specifier4);\n expect(wrapper.specifiers).to.deep.equal([specifier4, specifier3, specifier2]);\n });\n\n it('should return three nomenclatural codes, one for each specifier', function () {\n expect(wrapper.uniqNomenCodes).to.have.lengthOf(3);\n expect(wrapper.uniqNomenCodes).to.include(owlterms.ICZN_CODE);\n expect(wrapper.uniqNomenCodes).to.include(owlterms.UNKNOWN_CODE);\n expect(wrapper.uniqNomenCodes).to.include(owlterms.ICN_CODE);\n });\n\n it('should change to a default nomenclatural code of owlterms.UNKNOWN_CODE', function () {\n expect(wrapper.defaultNomenCode).to.equal(owlterms.UNKNOWN_CODE);\n });\n });\n\n describe('when specifiers are deleted using .deleteSpecifier', function () {\n it('should return the updated list', function () {\n // Delete an external specifier.\n wrapper.deleteSpecifier(specifier2);\n // Delete an internal specifier.\n wrapper.deleteSpecifier(specifier4);\n\n // Only the first specifier should be left.\n expect(wrapper.specifiers).to.deep.equal([specifier3]);\n });\n });\n\n describe('when a specifier is added using .externalSpecifiers', function () {\n it('should return the updated list', function () {\n wrapper.externalSpecifiers.push(specifier1);\n expect(wrapper.specifiers).to.deep.equal([specifier3, specifier1]);\n });\n });\n\n describe('when a specifier is changed to an internal specifier using .setSpecifierType', function () {\n it('should remain in the list of specifiers', function () {\n wrapper.setSpecifierType(specifier1, 'Internal');\n expect(wrapper.specifiers).to.deep.equal([specifier1, specifier3]);\n });\n });\n\n describe('when a specifier is added using .internalSpecifiers', function () {\n it('should be included in the list of all specifiers', function () {\n wrapper.internalSpecifiers.push(specifier2);\n expect(wrapper.specifiers).to.deep.equal([specifier1, specifier2, specifier3]);\n });\n });\n });\n\n describe('#getSpecifierType', function () {\n it('should return the correct specifier type for each specifier', function () {\n expect(wrapper.getSpecifierType(specifier1)).to.equal('Internal');\n expect(wrapper.getSpecifierType(specifier2)).to.equal('Internal');\n expect(wrapper.getSpecifierType(specifier3)).to.equal('External');\n });\n });\n\n describe('#getSpecifierLabel as TaxonomicUnitWrapper', function () {\n it('should return the correct label for each specifier', function () {\n expect((new phyx.TaxonomicUnitWrapper(specifier1)).label).to.equal('Specimen MVZ:225749');\n expect((new phyx.TaxonomicUnitWrapper(specifier2)).label).to.equal('Specimen MVZ:191016');\n expect((new phyx.TaxonomicUnitWrapper(specifier3)).label).to.equal('Rana boylii');\n });\n });\n });\n\n describe('given a particular phylogeny', function () {\n // Some phylogenies to use in testing.\n const phylogeny1 = {\n newick: '((MVZ225749, MVZ191016)Test, \"Rana boylii\")',\n additionalNodeProperties: {\n Test: {\n expectedPhyloreferenceNamed: 'phyloref1',\n },\n },\n };\n\n describe('#getExpectedNodeLabels', function () {\n it('should be able to determine expected node labels for a phylogeny', function () {\n const phyloref1 = new phyx.PhylorefWrapper({\n label: 'phyloref1',\n internalSpecifiers: [specifier1, specifier2],\n externalSpecifiers: [specifier3],\n });\n\n expect(phyloref1.getExpectedNodeLabels(phylogeny1))\n .to.deep.equal(['Test']);\n });\n });\n });\n\n describe('given an empty phyloreference', function () {\n const wrapper = new phyx.PhylorefWrapper({});\n\n describe('#getCurrentStatus', function () {\n it('should return \"pso:draft\" as the default initial status', function () {\n // Initially, an empty phyloref should report a status of 'pso:draft'.\n expect(wrapper.getCurrentStatus().statusCURIE).to.equal('pso:draft');\n });\n });\n\n describe('#setStatus', function () {\n it('should throw an error if given a mistyped status', function () {\n expect(function () { wrapper.setStatus('pso:retracted-from_publication'); })\n .to.throw(\n TypeError,\n 'setStatus() called with invalid status CURIE \\'pso:retracted-from_publication\\'',\n 'PhylorefWrapper throws TypeError on a mistyped status'\n );\n });\n });\n\n describe('#getStatusChanges', function () {\n it('should return the empty list', function () {\n expect(wrapper.getStatusChanges()).to.be.empty;\n });\n\n describe('when modified by using .setStatus', function () {\n it('should return the updated list', function () {\n wrapper.setStatus('pso:final-draft');\n wrapper.setStatus('pso:under-review');\n wrapper.setStatus('pso:submitted');\n wrapper.setStatus('pso:published');\n wrapper.setStatus('pso:retracted-from-publication');\n\n // And see if we get the statuses back in the correct order.\n const statusChanges = wrapper.getStatusChanges();\n expect(statusChanges.length, 'number of status changes should be 5').to.equal(5);\n expect(statusChanges[0].statusCURIE, 'first status change should be \"pso:final-draft\"').to.equal('pso:final-draft');\n expect(statusChanges[1].statusCURIE, 'second status change should be \"pso:under-review\"').to.equal('pso:under-review');\n expect(statusChanges[2].statusCURIE, 'third status change should be a \"pso:submitted\"').to.equal('pso:submitted');\n expect(statusChanges[3].statusCURIE, 'fourth status change should be a \"pso:published\"').to.equal('pso:published');\n expect(statusChanges[4].statusCURIE, 'fifth status change should be a \"pso:retracted-from-publication\"').to.equal('pso:retracted-from-publication');\n });\n });\n });\n });\n\n describe('#asJSONLD', function () {\n it('should preserve an existing @id on input phylorefs', function () {\n const jsonld = new phyx.PhylorefWrapper({\n '@id': '#providedId',\n internalSpecifiers: [specifier1],\n externalSpecifiers: [specifier2],\n }).asJSONLD('#phyloref0');\n expect(jsonld).to.have.property('@id');\n expect(jsonld['@id']).to.equal('#providedId');\n });\n it('should generate a new @id on input phylorefs', function () {\n const jsonld = new phyx.PhylorefWrapper({\n internalSpecifiers: [specifier1],\n externalSpecifiers: [specifier2],\n }).asJSONLD('#phyloref0');\n expect(jsonld).to.have.property('@id');\n expect(jsonld['@id']).to.equal('#phyloref0');\n });\n it('should generate the expected equivClass expression for 1 int, 1 ext phyloref', function () {\n const jsonld = new phyx.PhylorefWrapper({\n internalSpecifiers: [specifier1],\n externalSpecifiers: [specifier2],\n }).asJSONLD('#');\n expect(jsonld).to.have.property('equivalentClass');\n expect(jsonld.equivalentClass).to.deep.equal({\n '@type': owlterms.OWL_CLASS,\n intersectionOf: [\n {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.PHYLOREF_INCLUDES_TU,\n someValuesFrom: {\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: 'MVZ:225749',\n onProperty: owlterms.DWC_OCCURRENCE_ID,\n },\n },\n {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.PHYLOREF_EXCLUDES_TU,\n someValuesFrom: {\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: 'MVZ:191016',\n onProperty: owlterms.DWC_OCCURRENCE_ID,\n },\n },\n ],\n });\n });\n\n it('should generate the expected equivClass expression for 2 int phyloref', function () {\n const jsonld = new phyx.PhylorefWrapper({\n internalSpecifiers: [specifier2, specifier3],\n }).asJSONLD('#');\n expect(jsonld).to.have.property('equivalentClass');\n expect(jsonld.equivalentClass).to.deep.equal({\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.CDAO_HAS_CHILD,\n someValuesFrom: {\n '@type': owlterms.OWL_CLASS,\n intersectionOf: [\n {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.PHYLOREF_EXCLUDES_TU,\n someValuesFrom: {\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: 'MVZ:191016',\n onProperty: owlterms.DWC_OCCURRENCE_ID,\n },\n },\n {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.PHYLOREF_INCLUDES_TU,\n someValuesFrom: {\n '@type': owlterms.OWL_RESTRICTION,\n onProperty: owlterms.TDWG_VOC_HAS_NAME,\n someValuesFrom: {\n '@type': owlterms.OWL_CLASS,\n intersectionOf: [{\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: 'Rana boylii',\n onProperty: owlterms.TDWG_VOC_NAME_COMPLETE,\n }, {\n '@type': owlterms.OWL_RESTRICTION,\n hasValue: {\n '@id': owlterms.ICZN_CODE,\n },\n onProperty: owlterms.NOMENCLATURAL_CODE,\n }],\n },\n },\n },\n ],\n },\n });\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/phylorefs.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/phylorefs.js", "access": null, "description": null, "lineNumber": 1 @@ -6275,7 +6275,7 @@ "name": "test/scripts/phyx2owl.js", "content": "/*\n * Test conversion to OWL using the phyx2owl.js script.\n */\n\nconst child = require('child_process');\nconst path = require('path');\nconst fs = require('fs');\n\nconst chai = require('chai');\n\nconst expect = chai.expect;\n\n/*\n * Test whether we can convert Phyx files to OWL in JSON-LD using phyx2owl.js.\n */\n\nconst PHYX2OWL_JS = 'bin/phyx2owl.js';\n\ndescribe(PHYX2OWL_JS, function () {\n it('should work without any arguments', function () {\n const result = child.spawnSync(PHYX2OWL_JS, [], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(1);\n expect(result.stdout).to.be.empty;\n expect(result.stderr).to.contain('No input files provided.');\n });\n it('should support `--help`', function () {\n const result = child.spawnSync(PHYX2OWL_JS, ['--help'], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(0);\n expect(result.stderr).to.be.empty;\n expect(result.stdout).to.contain('phyx2owl.js [files or directories to convert into OWL ontologies]');\n });\n it('should be able to convert `brochu_2003.json`', function () {\n const PHYX_FILE = path.resolve(__dirname, '../examples/correct/brochu_2003.json');\n const NQ_FILE = path.resolve(__dirname, '../examples/correct/brochu_2003.nq');\n const OWL_FILE = path.resolve(__dirname, '../examples/correct/brochu_2003.owl');\n\n // If there is already a '../examples/brochu_2003.owl' file, we should delete it.\n if (fs.existsSync(OWL_FILE)) fs.unlinkSync(OWL_FILE);\n expect(fs.existsSync(OWL_FILE)).to.be.false;\n\n // Convert brochu_2003.json to brochu_2003.owl.\n // Because of the way in which we test brochu_2003.owl in test/examples.js,\n // we need to set a base IRI as well.\n const result = child.spawnSync(PHYX2OWL_JS, [PHYX_FILE, '--base-iri', 'http://example.org/phyx.js/example#'], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.stderr).to.be.empty;\n expect(result.stdout).to.contain('1 files converted successfully.');\n expect(result.status).to.equal(0);\n\n expect(fs.existsSync(OWL_FILE), `File ${OWL_FILE} was not generated.`).to.be.true;\n\n // Make sure that the generated file is identical to the N-Quads file expected./\n const nqGenerated = fs.readFileSync(OWL_FILE, 'utf8');\n const nqExpected = fs.readFileSync(NQ_FILE, 'utf8');\n expect(nqGenerated).to.equal(nqExpected);\n });\n it('should be able to convert the entire `test/examples/correct` directory', function () {\n const EXAMPLE_DIR = path.resolve(__dirname, '../examples/correct');\n const jsonFilesInExamples = fs.readdirSync(EXAMPLE_DIR, { recursive: true })\n .filter(fileName => fileName.toLowerCase().endsWith('.json'));\n\n const result = child.spawnSync(PHYX2OWL_JS, [EXAMPLE_DIR, '--base-iri', 'http://example.org/phyx.js/example#'], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(0);\n expect(result.stdout).to.match(/\\d+ files converted successfully./);\n expect(result.stderr).to.be.empty;\n\n const regexMatch = result.stdout.match(/(\\d+) files converted successfully./);\n const fileCount = Number(regexMatch[1]);\n expect(fileCount).to.be.greaterThan(0);\n expect(fileCount).to.equal(jsonFilesInExamples.length);\n\n // Make sure that the generated files *look* like JSON-LD files.\n fs.readdirSync(EXAMPLE_DIR, 'utf8')\n .filter(fileName => fileName.toLowerCase().endsWith('.owl'))\n .forEach((owlFilename) => {\n const nqGenerated = fs.readFileSync(path.resolve(EXAMPLE_DIR, owlFilename), 'utf8');\n\n // If there's an .owl file, there should an .nq file with the expected content.\n const nqFilename = `${owlFilename.substring(0, owlFilename.length - 4)}.nq`;\n const nqExpected = fs.readFileSync(path.resolve(EXAMPLE_DIR, nqFilename), 'utf8');\n\n expect(nqGenerated).to.equal(nqExpected);\n });\n });\n // This is where we should test the recursive directory functionality. However,\n // doing that would require using `test/examples` (which isn't recursive),\n // using `test/` or the root project directory (potentially messing with other\n // test scripts). We could potentially create a separate recursive hierarchy to\n // test this, but that seems unnecessary. So we won't test this functionality\n // for now, but will add a test if we find a replicable bug in the future.\n it('should give an error if no JSON files could be found', function () {\n const result = child.spawnSync(PHYX2OWL_JS, [__dirname], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(1);\n expect(result.stdout).to.be.empty;\n expect(result.stderr).to.contain('Input files do not exist or consist of directories that do not contain JSON files: ');\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/scripts/phyx2owl.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/scripts/phyx2owl.js", "access": null, "description": null, "lineNumber": 1 @@ -6361,9 +6361,9 @@ "__docId__": 396, "kind": "testFile", "name": "test/scripts/resolve.js", - "content": "/*\n * Test resolution against the Open Tree of Life via the resolve script.\n */\n\nconst child = require('child_process');\nconst path = require('path');\n\nconst lodash = require('lodash');\nconst chai = require('chai');\n\nconst expect = chai.expect;\n\n/*\n * Test whether we can use the resolve script to resolve phylorefs against\n * the Open Tree of Life.\n */\n\nconst RESOLVE_JS = 'bin/resolve.js';\n\ndescribe('bin/resolve.js', function () {\n it('should work without any arguments', function () {\n const result = child.spawnSync(RESOLVE_JS, [], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(1);\n expect(result.stdout).to.be.empty;\n expect(result.stderr).to.contain('No input files provided.');\n });\n it('should support `--help`', function () {\n const result = child.spawnSync(RESOLVE_JS, ['--help'], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(0);\n expect(result.stderr).to.be.empty;\n expect(result.stdout).to.contain('resolve.js [files to resolve on the Open Tree of Life]');\n });\n it('should provide the expected results on the `brochu_2003.json` example file', function () {\n var resultObj; // eslint-disable-line no-var\n\n this.timeout(20000); // Take up to 20 seconds to run this.\n\n const result = child.spawnSync(RESOLVE_JS, [path.resolve(__dirname, '../examples/correct/brochu_2003.json')], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(0);\n expect(result.stderr).to.be.empty;\n\n expect(function () {\n resultObj = JSON.parse(result.stdout);\n }).to.not.throw(SyntaxError);\n\n expect(lodash.keys(resultObj)).to.have.members([\n 'Alligatoridae',\n 'Alligatorinae',\n 'Caimaninae',\n 'Crocodyloidea',\n 'Crocodylidae',\n 'Diplocynodontinae',\n ]);\n\n expect(resultObj.Alligatoridae[0].resolved).to.include({\n '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree14.9@ott195670',\n label: 'Alligatoridae',\n });\n expect(resultObj.Alligatorinae[0].resolved).to.include({\n '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree14.9@ott151255',\n label: 'Alligatorinae',\n });\n expect(resultObj.Crocodylidae[0].resolved).to.include({\n '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree14.9@ott1092501',\n label: 'Longirostres',\n });\n expect(resultObj.Diplocynodontinae[0]).to.include({\n error: 'no_mrca_found:400',\n });\n });\n it('should correctly report errors with certain phyloreferences', function () {\n var resultObj; // eslint-disable-line no-var\n\n this.timeout(20000); // Take up to 20 seconds to run this.\n\n const result = child.spawnSync(RESOLVE_JS, [path.resolve(__dirname, '../examples/incorrect/otl-resolution-errors.json')], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(0);\n expect(result.stderr).to.be.empty;\n\n expect(function () {\n resultObj = JSON.parse(result.stdout);\n }).to.not.throw(SyntaxError);\n\n expect(lodash.keys(resultObj)).to.have.members([\n 'SingleSpecifier',\n 'TaxonNameNotFound',\n 'Produces404OnOTR',\n ]);\n\n // console.log(JSON.stringify(resultObj, null, 2));\n\n expect(resultObj.SingleSpecifier[0]).to.include({\n error: 'one_internal_specifier_with_no_external_specifiers',\n });\n\n expect(resultObj.TaxonNameNotFound[0]).to.include({\n error: 'internal_specifiers_missing',\n });\n\n expect(resultObj.Produces404OnOTR[0]).to.include({\n error: 'no_mrca_found:404',\n });\n });\n});\n", + "content": "/*\n * Test resolution against the Open Tree of Life via the resolve script.\n */\n\nconst child = require('child_process');\nconst path = require('path');\n\nconst lodash = require('lodash');\nconst chai = require('chai');\n\nconst expect = chai.expect;\n\n/*\n * Test whether we can use the resolve script to resolve phylorefs against\n * the Open Tree of Life.\n */\n\nconst RESOLVE_JS = 'bin/resolve.js';\n\ndescribe('bin/resolve.js', function () {\n it('should work without any arguments', function () {\n const result = child.spawnSync(RESOLVE_JS, [], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(1);\n expect(result.stdout).to.be.empty;\n expect(result.stderr).to.contain('No input files provided.');\n });\n it('should support `--help`', function () {\n const result = child.spawnSync(RESOLVE_JS, ['--help'], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(0);\n expect(result.stderr).to.be.empty;\n expect(result.stdout).to.contain('resolve.js [files to resolve on the Open Tree of Life]');\n });\n it('should provide the expected results on the `brochu_2003.json` example file', function () {\n var resultObj; // eslint-disable-line no-var\n\n this.timeout(20000); // Take up to 20 seconds to run this.\n\n const result = child.spawnSync(RESOLVE_JS, [path.resolve(__dirname, '../examples/correct/brochu_2003.json')], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(0);\n expect(result.stderr).to.be.empty;\n\n expect(function () {\n resultObj = JSON.parse(result.stdout);\n }).to.not.throw(SyntaxError);\n\n expect(lodash.keys(resultObj)).to.have.members([\n 'Alligatoridae',\n 'Alligatorinae',\n 'Caimaninae',\n 'Crocodyloidea',\n 'Crocodylidae',\n 'Diplocynodontinae',\n ]);\n\n expect(resultObj.Alligatoridae[0].resolved).to.include({\n '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree15.1@ott195670',\n label: 'Alligatoridae',\n });\n expect(resultObj.Alligatorinae[0].resolved).to.include({\n '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree15.1@ott151255',\n label: 'Alligatorinae',\n });\n expect(resultObj.Crocodylidae[0].resolved).to.include({\n '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree15.1@ott1092501',\n label: 'Longirostres',\n });\n expect(resultObj.Diplocynodontinae[0]).to.include({\n error: 'no_mrca_found:400',\n });\n });\n it('should correctly report errors with certain phyloreferences', function () {\n var resultObj; // eslint-disable-line no-var\n\n this.timeout(20000); // Take up to 20 seconds to run this.\n\n const result = child.spawnSync(RESOLVE_JS, [path.resolve(__dirname, '../examples/incorrect/otl-resolution-errors.json')], {\n encoding: 'utf-8',\n stdio: 'pipe',\n });\n expect(result.status).to.equal(0);\n expect(result.stderr).to.be.empty;\n\n expect(function () {\n resultObj = JSON.parse(result.stdout);\n }).to.not.throw(SyntaxError);\n\n expect(lodash.keys(resultObj)).to.have.members([\n 'SingleSpecifier',\n 'TaxonNameNotFound',\n 'Produces404OnOTR',\n ]);\n\n // console.log(JSON.stringify(resultObj, null, 2));\n\n expect(resultObj.SingleSpecifier[0]).to.include({\n error: 'one_internal_specifier_with_no_external_specifiers',\n });\n\n expect(resultObj.TaxonNameNotFound[0]).to.include({\n error: 'internal_specifiers_missing',\n });\n\n expect(resultObj.Produces404OnOTR[0]).to.include({\n error: 'no_mrca_found:404',\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/scripts/resolve.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/scripts/resolve.js", "access": null, "description": null, "lineNumber": 1 @@ -6437,9 +6437,9 @@ "__docId__": 402, "kind": "testFile", "name": "test/specimens.js", - "content": "/*\n * Test specimen processing.\n */\n\nconst chai = require('chai');\nconst phyx = require('../src');\n\nconst expect = chai.expect;\n\n/*\n * Test whether SpecimenWrapper can parse specimen identifiers from simple specimen\n * identifiers, from institutionCode:catalogNumber format, and from Darwin Core triples.\n * However, URNs and HTTP URLs should not be accidentally parsed as Darwin Core triples.\n */\n\ndescribe('SpecimenWrapper', function () {\n describe('#constructor', function () {\n it('should be able to wrap an empty specimen', function () {\n const wrapped = new phyx.SpecimenWrapper({});\n\n expect(wrapped).to.be.an.instanceOf(phyx.SpecimenWrapper);\n expect(wrapped.occurrenceID).to.be.undefined;\n });\n it('should be able to extract an occurenceID and catalogNumber from simple specimen IDs', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'Wall 2527, Fiji (uc)',\n 'dwc:basisOfRecord': 'PreservedSpecimen',\n });\n expect(wrapper.occurrenceID).to.equal('Wall 2527, Fiji (uc)');\n expect(wrapper.catalogNumber).to.equal('Wall 2527, Fiji (uc)');\n expect(wrapper.basisOfRecord).to.equal('PreservedSpecimen');\n });\n it('should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'FMNH:PR 2081',\n 'dwc:basisOfRecord': 'PreservedSpecimen',\n });\n expect(wrapper.occurrenceID).to.equal('FMNH:PR 2081');\n expect(wrapper.institutionCode).to.equal('FMNH');\n expect(wrapper.catalogNumber).to.equal('PR 2081');\n expect(wrapper.basisOfRecord).to.equal('PreservedSpecimen');\n });\n it('should extract occurenceID, institutionCode and catalogNumber from Darwin Core triples', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'FMNH:PR:2081',\n });\n expect(wrapper.occurrenceID).to.equal('FMNH:PR:2081');\n expect(wrapper.institutionCode).to.equal('FMNH');\n expect(wrapper.collectionCode).to.equal('PR');\n expect(wrapper.catalogNumber).to.equal('2081');\n expect(wrapper.basisOfRecord).to.be.undefined;\n });\n it('should be able to extract the same occurrenceID from different representations', function () {\n expect(new phyx.SpecimenWrapper({ occurrenceID: 'urn:catalog:::MVZ225749' }).occurrenceID)\n .to.equal('urn:catalog:::MVZ225749');\n expect(new phyx.SpecimenWrapper({ catalogNumber: 'MVZ225749' }).occurrenceID)\n .to.equal('urn:catalog:::MVZ225749');\n });\n it('should not attempt to split a URN into occurenceID, institutionCode and catalogNumber', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'urn:lsid:biocol.org:col:34777',\n });\n expect(wrapper.occurrenceID).to.equal('urn:lsid:biocol.org:col:34777');\n expect(wrapper.institutionCode).to.be.undefined;\n expect(wrapper.collectionCode).to.be.undefined;\n expect(wrapper.catalogNumber).to.be.undefined;\n });\n it('should not attempt to split a URL into occurenceID, institutionCode and catalogNumber', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'http://arctos.database.museum/guid/MVZ:Herp:148929?seid=886464',\n });\n expect(wrapper.occurrenceID).to.equal('http://arctos.database.museum/guid/MVZ:Herp:148929?seid=886464');\n expect(wrapper.institutionCode).to.be.undefined;\n expect(wrapper.collectionCode).to.be.undefined;\n expect(wrapper.catalogNumber).to.be.undefined;\n });\n it('should be able to create a specimen JSON record from an occurrence ID', function () {\n const specimen = phyx.SpecimenWrapper.fromOccurrenceID('FMNH:PR:2081');\n expect(specimen.occurrenceID).to.equal('FMNH:PR:2081');\n expect(specimen.institutionCode).to.equal('FMNH');\n expect(specimen.collectionCode).to.equal('PR');\n expect(specimen.catalogNumber).to.equal('2081');\n expect(specimen['dwc:basisOfRecord']).to.equal('PreservedSpecimen');\n });\n });\n});\n", + "content": "/*\n * Test specimen processing.\n */\n\nconst chai = require('chai');\nconst phyx = require('../src');\n\nconst expect = chai.expect;\n\n/*\n * Test whether SpecimenWrapper can parse specimen identifiers from simple specimen\n * identifiers, from institutionCode:catalogNumber format, and from Darwin Core triples.\n * However, URNs and HTTP URLs should not be accidentally parsed as Darwin Core triples.\n */\n\ndescribe('SpecimenWrapper', function () {\n describe('#constructor', function () {\n it('should be able to wrap an empty specimen', function () {\n const wrapped = new phyx.SpecimenWrapper({});\n\n expect(wrapped).to.be.an.instanceOf(phyx.SpecimenWrapper);\n expect(wrapped.occurrenceID).to.be.undefined;\n });\n it('should be able to wrap a specimen with an empty occurenceID', function () {\n const wrapped = new phyx.SpecimenWrapper(phyx.SpecimenWrapper.fromOccurrenceID(''));\n\n expect(wrapped).to.be.an.instanceOf(phyx.SpecimenWrapper);\n expect(wrapped.occurrenceID).to.equal('');\n });\n it('should be able to extract an occurenceID and catalogNumber from simple specimen IDs', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'Wall 2527, Fiji (uc)',\n basisOfRecord: 'PreservedSpecimen',\n });\n expect(wrapper.occurrenceID).to.equal('Wall 2527, Fiji (uc)');\n expect(wrapper.catalogNumber).to.equal('Wall 2527, Fiji (uc)');\n expect(wrapper.basisOfRecord).to.equal('PreservedSpecimen');\n });\n it('should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'FMNH:PR 2081',\n basisOfRecord: 'PreservedSpecimen',\n });\n expect(wrapper.occurrenceID).to.equal('FMNH:PR 2081');\n expect(wrapper.institutionCode).to.equal('FMNH');\n expect(wrapper.catalogNumber).to.equal('PR 2081');\n expect(wrapper.basisOfRecord).to.equal('PreservedSpecimen');\n });\n it('should extract occurenceID, institutionCode and catalogNumber from Darwin Core triples', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'FMNH:PR:2081',\n });\n expect(wrapper.occurrenceID).to.equal('FMNH:PR:2081');\n expect(wrapper.institutionCode).to.equal('FMNH');\n expect(wrapper.collectionCode).to.equal('PR');\n expect(wrapper.catalogNumber).to.equal('2081');\n expect(wrapper.basisOfRecord).to.be.undefined;\n });\n it('should be able to extract the same occurrenceID from different representations', function () {\n expect(new phyx.SpecimenWrapper({ occurrenceID: 'urn:catalog:::MVZ225749' }).occurrenceID)\n .to.equal('urn:catalog:::MVZ225749');\n expect(new phyx.SpecimenWrapper({ catalogNumber: 'MVZ225749' }).occurrenceID)\n .to.equal('urn:catalog:::MVZ225749');\n });\n it('should not attempt to split a URN into occurenceID, institutionCode and catalogNumber', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'urn:lsid:biocol.org:col:34777',\n });\n expect(wrapper.occurrenceID).to.equal('urn:lsid:biocol.org:col:34777');\n expect(wrapper.institutionCode).to.be.undefined;\n expect(wrapper.collectionCode).to.be.undefined;\n expect(wrapper.catalogNumber).to.be.undefined;\n });\n it('should not attempt to split a URL into occurenceID, institutionCode and catalogNumber', function () {\n const wrapper = new phyx.SpecimenWrapper({\n occurrenceID: 'http://arctos.database.museum/guid/MVZ:Herp:148929?seid=886464',\n });\n expect(wrapper.occurrenceID).to.equal('http://arctos.database.museum/guid/MVZ:Herp:148929?seid=886464');\n expect(wrapper.institutionCode).to.be.undefined;\n expect(wrapper.collectionCode).to.be.undefined;\n expect(wrapper.catalogNumber).to.be.undefined;\n });\n it('should be able to create a specimen JSON record from an occurrence ID', function () {\n const specimen = phyx.SpecimenWrapper.fromOccurrenceID('FMNH:PR:2081');\n expect(specimen.occurrenceID).to.equal('FMNH:PR:2081');\n expect(specimen.institutionCode).to.equal('FMNH');\n expect(specimen.collectionCode).to.equal('PR');\n expect(specimen.catalogNumber).to.equal('2081');\n expect(specimen.basisOfRecord).to.equal('PreservedSpecimen');\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/specimens.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/specimens.js", "access": null, "description": null, "lineNumber": 1 @@ -6493,7 +6493,7 @@ "static": true, "longname": "test/specimens.js~describe148.describe149.it151", "access": null, - "description": "should be able to extract an occurenceID and catalogNumber from simple specimen IDs", + "description": "should be able to wrap a specimen with an empty occurenceID", "lineNumber": 24 }, { @@ -6506,8 +6506,8 @@ "static": true, "longname": "test/specimens.js~describe148.describe149.it152", "access": null, - "description": "should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination", - "lineNumber": 33 + "description": "should be able to extract an occurenceID and catalogNumber from simple specimen IDs", + "lineNumber": 30 }, { "__docId__": 408, @@ -6519,8 +6519,8 @@ "static": true, "longname": "test/specimens.js~describe148.describe149.it153", "access": null, - "description": "should extract occurenceID, institutionCode and catalogNumber from Darwin Core triples", - "lineNumber": 43 + "description": "should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination", + "lineNumber": 39 }, { "__docId__": 409, @@ -6532,8 +6532,8 @@ "static": true, "longname": "test/specimens.js~describe148.describe149.it154", "access": null, - "description": "should be able to extract the same occurrenceID from different representations", - "lineNumber": 53 + "description": "should extract occurenceID, institutionCode and catalogNumber from Darwin Core triples", + "lineNumber": 49 }, { "__docId__": 410, @@ -6545,7 +6545,7 @@ "static": true, "longname": "test/specimens.js~describe148.describe149.it155", "access": null, - "description": "should not attempt to split a URN into occurenceID, institutionCode and catalogNumber", + "description": "should be able to extract the same occurrenceID from different representations", "lineNumber": 59 }, { @@ -6558,8 +6558,8 @@ "static": true, "longname": "test/specimens.js~describe148.describe149.it156", "access": null, - "description": "should not attempt to split a URL into occurenceID, institutionCode and catalogNumber", - "lineNumber": 68 + "description": "should not attempt to split a URN into occurenceID, institutionCode and catalogNumber", + "lineNumber": 65 }, { "__docId__": 412, @@ -6571,495 +6571,508 @@ "static": true, "longname": "test/specimens.js~describe148.describe149.it157", "access": null, - "description": "should be able to create a specimen JSON record from an occurrence ID", - "lineNumber": 77 + "description": "should not attempt to split a URL into occurenceID, institutionCode and catalogNumber", + "lineNumber": 74 }, { "__docId__": 413, + "kind": "test", + "name": "it158", + "testId": 158, + "memberof": "test/specimens.js~describe148.describe149", + "testDepth": 2, + "static": true, + "longname": "test/specimens.js~describe148.describe149.it158", + "access": null, + "description": "should be able to create a specimen JSON record from an occurrence ID", + "lineNumber": 83 + }, + { + "__docId__": 414, "kind": "testFile", "name": "test/taxon-names.js", "content": "/*\n * Test taxon name processing.\n */\n\nconst chai = require('chai');\nconst phyx = require('../src');\nconst owlterms = require('../src/utils/owlterms');\n\nconst expect = chai.expect;\n\n/*\n * Test whether TaxonNameWrapper parses taxon names correctly.\n */\n\ndescribe('TaxonNameWrapper', function () {\n describe('#constructor', function () {\n it('should accept empty taxon names without errors', function () {\n const wrapper = new phyx.TaxonNameWrapper({});\n\n expect(wrapper).to.be.an.instanceOf(phyx.TaxonNameWrapper);\n expect(wrapper.nameComplete).to.be.undefined;\n });\n it('should be able to parse uninomial names as such', function () {\n const wrapper = new phyx.TaxonNameWrapper({\n nameComplete: 'Mus',\n });\n\n expect(wrapper.uninomial).to.equal('Mus');\n expect(wrapper.genusPart).to.be.undefined;\n expect(wrapper.specificEpithet).to.be.undefined;\n });\n it('should be able to parse binomial names into genus and specific epithet', function () {\n const wrapper = new phyx.TaxonNameWrapper({\n nameComplete: 'Mus musculus',\n });\n\n expect(wrapper.genusPart).to.equal('Mus');\n expect(wrapper.specificEpithet).to.equal('musculus');\n });\n it('should be able to parse trinomial names into genus, specific epithet and infraspecific epithet', function () {\n const wrapper = new phyx.TaxonNameWrapper({\n nameComplete: 'Mus musculus domesticus',\n });\n\n expect(wrapper.genusPart).to.equal('Mus');\n expect(wrapper.specificEpithet).to.equal('musculus');\n expect(wrapper.infraspecificEpithet).to.equal('domesticus');\n });\n it('should ignore authority after a binomial name', function () {\n const taxonName = phyx.TaxonNameWrapper.fromVerbatimName('Mus musculus Linnaeus, 1758');\n expect(taxonName.nameComplete).to.equal('Mus musculus');\n expect(taxonName.genusPart).to.equal('Mus');\n expect(taxonName.specificEpithet).to.equal('musculus');\n expect(taxonName.infraspecificEpithet).to.be.undefined;\n expect(taxonName.uninomial).to.be.undefined;\n });\n it('should be able to use default nomenclatural codes', function () {\n const taxonName = phyx.TaxonNameWrapper.fromVerbatimName('Mus musculus Linnaeus, 1758', owlterms.ICZN_CODE);\n expect(taxonName.nameComplete).to.equal('Mus musculus');\n expect(taxonName.nomenclaturalCode).to.equal(owlterms.ICZN_CODE);\n\n const wrappedTaxonName = new phyx.TaxonNameWrapper(taxonName);\n expect(wrappedTaxonName.nomenclaturalCode).to.equal(owlterms.ICZN_CODE);\n expect(wrappedTaxonName.nomenclaturalCodeDetails).to.have.own.property('title');\n expect(wrappedTaxonName.nomenclaturalCodeDetails.title).to.equal('International Code of Zoological Nomenclature');\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/taxon-names.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/taxon-names.js", "access": null, "description": null, "lineNumber": 1 }, { - "__docId__": 414, + "__docId__": 415, "kind": "test", - "name": "describe158", - "testId": 158, + "name": "describe159", + "testId": 159, "memberof": "test/taxon-names.js", "testDepth": 0, "static": true, - "longname": "test/taxon-names.js~describe158", + "longname": "test/taxon-names.js~describe159", "access": null, "description": "TaxonNameWrapper", "lineNumber": 15 }, { - "__docId__": 415, + "__docId__": 416, "kind": "test", - "name": "describe159", - "testId": 159, - "memberof": "test/taxon-names.js~describe158", + "name": "describe160", + "testId": 160, + "memberof": "test/taxon-names.js~describe159", "testDepth": 1, "static": true, - "longname": "test/taxon-names.js~describe158.describe159", + "longname": "test/taxon-names.js~describe159.describe160", "access": null, "description": "#constructor", "lineNumber": 16 }, { - "__docId__": 416, + "__docId__": 417, "kind": "test", - "name": "it160", - "testId": 160, - "memberof": "test/taxon-names.js~describe158.describe159", + "name": "it161", + "testId": 161, + "memberof": "test/taxon-names.js~describe159.describe160", "testDepth": 2, "static": true, - "longname": "test/taxon-names.js~describe158.describe159.it160", + "longname": "test/taxon-names.js~describe159.describe160.it161", "access": null, "description": "should accept empty taxon names without errors", "lineNumber": 17 }, { - "__docId__": 417, + "__docId__": 418, "kind": "test", - "name": "it161", - "testId": 161, - "memberof": "test/taxon-names.js~describe158.describe159", + "name": "it162", + "testId": 162, + "memberof": "test/taxon-names.js~describe159.describe160", "testDepth": 2, "static": true, - "longname": "test/taxon-names.js~describe158.describe159.it161", + "longname": "test/taxon-names.js~describe159.describe160.it162", "access": null, "description": "should be able to parse uninomial names as such", "lineNumber": 23 }, { - "__docId__": 418, + "__docId__": 419, "kind": "test", - "name": "it162", - "testId": 162, - "memberof": "test/taxon-names.js~describe158.describe159", + "name": "it163", + "testId": 163, + "memberof": "test/taxon-names.js~describe159.describe160", "testDepth": 2, "static": true, - "longname": "test/taxon-names.js~describe158.describe159.it162", + "longname": "test/taxon-names.js~describe159.describe160.it163", "access": null, "description": "should be able to parse binomial names into genus and specific epithet", "lineNumber": 32 }, { - "__docId__": 419, + "__docId__": 420, "kind": "test", - "name": "it163", - "testId": 163, - "memberof": "test/taxon-names.js~describe158.describe159", + "name": "it164", + "testId": 164, + "memberof": "test/taxon-names.js~describe159.describe160", "testDepth": 2, "static": true, - "longname": "test/taxon-names.js~describe158.describe159.it163", + "longname": "test/taxon-names.js~describe159.describe160.it164", "access": null, "description": "should be able to parse trinomial names into genus, specific epithet and infraspecific epithet", "lineNumber": 40 }, { - "__docId__": 420, + "__docId__": 421, "kind": "test", - "name": "it164", - "testId": 164, - "memberof": "test/taxon-names.js~describe158.describe159", + "name": "it165", + "testId": 165, + "memberof": "test/taxon-names.js~describe159.describe160", "testDepth": 2, "static": true, - "longname": "test/taxon-names.js~describe158.describe159.it164", + "longname": "test/taxon-names.js~describe159.describe160.it165", "access": null, "description": "should ignore authority after a binomial name", "lineNumber": 49 }, { - "__docId__": 421, + "__docId__": 422, "kind": "test", - "name": "it165", - "testId": 165, - "memberof": "test/taxon-names.js~describe158.describe159", + "name": "it166", + "testId": 166, + "memberof": "test/taxon-names.js~describe159.describe160", "testDepth": 2, "static": true, - "longname": "test/taxon-names.js~describe158.describe159.it165", + "longname": "test/taxon-names.js~describe159.describe160.it166", "access": null, "description": "should be able to use default nomenclatural codes", "lineNumber": 57 }, { - "__docId__": 422, + "__docId__": 423, "kind": "testFile", "name": "test/taxonomic-units.js", "content": "/*\n * Test taxonomic unit construction and matching.\n */\n\nconst chai = require('chai');\nconst phyx = require('../src');\n\n// Use Chai's expect API.\nconst expect = chai.expect;\n\n/*\n * We primarily test two classes here:\n * - TaxonomicUnitWrapper, which wraps a taxonomic unit and determines if it\n * refers to a scientific name, specimen identifier or external reference,\n * or a combination of these.\n * - TaxonomicUnitMatcher, which accepts two taxonomic units and determines\n * whether and for what reason the two can be matched.\n */\n\ndescribe('TaxonomicUnitWrapper', function () {\n describe('#constructor given no arguments', function () {\n it('should create an empty TaxonomicUnitWrapper without a defined label', function () {\n // Empty TU without @type.\n let wrapper = new phyx.TaxonomicUnitWrapper({});\n expect(wrapper).to.be.instanceOf(phyx.TaxonomicUnitWrapper);\n expect(wrapper.label).to.be.undefined;\n\n // Empty TU with type TYPE_TAXON_CONCEPT.\n wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n });\n expect(wrapper).to.be.instanceOf(phyx.TaxonomicUnitWrapper);\n expect(wrapper.label).to.be.undefined;\n\n // Empty TU with type TYPE_SPECIMEN.\n wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n });\n expect(wrapper).to.be.instanceOf(phyx.TaxonomicUnitWrapper);\n expect(wrapper.label).to.be.undefined;\n\n // Empty TU with type TYPE_SPECIMEN and a taxonomic name.\n wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n nameString: 'Taxonomic name',\n });\n expect(wrapper).to.be.instanceOf(phyx.TaxonomicUnitWrapper);\n expect(wrapper.label).to.be.undefined;\n });\n });\n describe('#label given a taxonomic unit', function () {\n it('should return a wrapped scientific name', function () {\n const wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n hasName: {\n label: 'Ornithorhynchus anatinus (Shaw, 1799)',\n nameComplete: 'Ornithorhynchus anatinus',\n },\n });\n expect(wrapper.label).to.equal('Ornithorhynchus anatinus (Shaw, 1799)');\n });\n it('should return a wrapped specimen identifier preceded by \"Specimen\"', function () {\n const wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n occurrenceID: 'MVZ 225749',\n });\n expect(wrapper.label).to.equal('Specimen MVZ 225749');\n });\n it('should return specimens with an occurrenceID as well as a taxon concept', function () {\n const wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': [\n phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n ],\n nameString: 'Rana luteiventris',\n occurrenceID: 'MVZ 225749',\n });\n expect(wrapper.label).to.equal('Specimen MVZ 225749 identified as Rana luteiventris');\n });\n it('should ignore occurrence ID if typed as a taxon concept', function () {\n const wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n nameString: 'Rana luteiventris',\n occurrenceID: 'MVZ 225749',\n });\n expect(wrapper.label).to.equal('Rana luteiventris');\n });\n it('should return a wrapped external reference by surrounding it with \"<>\"', function () {\n const wrapper = new phyx.TaxonomicUnitWrapper({\n '@id': [\n 'http://arctos.database.museum/guid/MVZ:Herp:225749',\n ],\n });\n expect(wrapper.label).to.equal('');\n });\n it('should provide both taxon name and occurrence ID in label, but ignore external reference', function () {\n const wrapper = new phyx.TaxonomicUnitWrapper({\n '@id': [\n 'http://arctos.database.museum/guid/MVZ:Herp:225749',\n ],\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n nameString: 'Rana luteiventris',\n occurrenceID: 'MVZ 225749',\n });\n expect(wrapper.label).to.equal('Specimen MVZ 225749 identified as Rana luteiventris');\n });\n });\n describe('#fromLabel', function () {\n it('should return empty lists when inputs are empty or undefined', function () {\n expect(phyx.TaxonomicUnitWrapper.fromLabel()).to.be.undefined;\n expect(phyx.TaxonomicUnitWrapper.fromLabel(undefined)).to.be.undefined;\n expect(phyx.TaxonomicUnitWrapper.fromLabel(null)).to.be.undefined;\n expect(phyx.TaxonomicUnitWrapper.fromLabel('')).to.be.undefined;\n expect(phyx.TaxonomicUnitWrapper.fromLabel(' ')).to.be.undefined;\n });\n it('when given a scientific name, it should return a list of a single TU wrapping a scientific name', function () {\n expect(phyx.TaxonomicUnitWrapper.fromLabel('Rana luteiventris MVZ225749'))\n .to.be.deep.equal({\n '@type': 'http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept',\n label: 'Rana luteiventris MVZ225749',\n hasName: {\n '@type': 'http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName',\n label: 'Rana luteiventris MVZ225749',\n genusPart: 'Rana',\n specificEpithet: 'luteiventris',\n nameComplete: 'Rana luteiventris',\n },\n });\n });\n it('when given a scientific name separated with underscores, it should return a list of a single TU wrapping the scientific name', function () {\n expect(phyx.TaxonomicUnitWrapper.fromLabel('Rana_luteiventris_MVZ_225749'))\n .to.be.deep.equal({\n '@type': 'http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept',\n label: 'Rana_luteiventris_MVZ_225749',\n hasName: {\n '@type': 'http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName',\n label: 'Rana_luteiventris_MVZ_225749',\n nameComplete: 'Rana luteiventris',\n genusPart: 'Rana',\n specificEpithet: 'luteiventris',\n },\n });\n });\n });\n describe('#asOWLEquivClass', function () {\n it('when given a taxon concept, only the complete name should be present in the equivClass', function () {\n const wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n nameString: 'Rana luteiventris Thompson, 1913',\n });\n expect(wrapper.asOWLEquivClass).to.deep.equal({\n '@type': 'owl:Restriction',\n onProperty: 'http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName',\n someValuesFrom: {\n '@type': 'owl:Restriction',\n onProperty: 'http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete',\n hasValue: 'Rana luteiventris',\n },\n });\n });\n it('when given a specimen, only the occurrence ID should be present in the equivClass', function () {\n const wrapper = new phyx.TaxonomicUnitWrapper({\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n nameString: 'Rana luteiventris',\n occurrenceID: 'MVZ 225749',\n });\n expect(wrapper.asOWLEquivClass).to.deep.equal({\n '@type': 'owl:Restriction',\n onProperty: 'http://rs.tdwg.org/dwc/terms/occurrenceID',\n hasValue: 'MVZ 225749',\n });\n });\n });\n});\n\ndescribe('TaxonomicUnitMatcher', function () {\n // To test matching, let's set up some taxonomic units.\n // Note that:\n // tunit1 and tunit2 should match by scientific name.\n // tunit2 and tunit3 should match by specimen identifier.\n // tunit3 and tunit4 should match by external references.\n const tunit1 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT,\n hasName: {\n nameComplete: 'Rana luteiventris',\n },\n };\n const tunit2 = {\n '@type': [\n phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n ],\n nameString: 'Rana luteiventris MVZ225749',\n occurrenceID: 'MVZ225749',\n };\n const tunit3 = {\n '@type': phyx.TaxonomicUnitWrapper.TYPE_SPECIMEN,\n occurrenceID: 'MVZ225749',\n '@id': 'http://arctos.database.museum/guid/MVZ:Herp:225749',\n };\n const tunit4 = {\n '@id': 'http://arctos.database.museum/guid/MVZ:Herp:225749',\n };\n\n describe('#matchByNameComplete', function () {\n it('should be able to match tunit1 and tunit2 by complete name', function () {\n expect(new phyx.TaxonomicUnitMatcher(tunit1, tunit2).matchByExternalReferences()).to.be.false;\n expect(new phyx.TaxonomicUnitMatcher(tunit1, tunit2).matchByOccurrenceID()).to.be.false;\n expect(new phyx.TaxonomicUnitMatcher(tunit1, tunit2).matchByNameComplete()).to.be.true;\n });\n });\n describe('#matchByExternalReferences', function () {\n it('should be able to match tunit3 and tunit4 by external references', function () {\n expect(new phyx.TaxonomicUnitMatcher(tunit3, tunit4).matchByExternalReferences()).to.be.true;\n expect(new phyx.TaxonomicUnitMatcher(tunit3, tunit4).matchByOccurrenceID()).to.be.false;\n expect(new phyx.TaxonomicUnitMatcher(tunit3, tunit4).matchByNameComplete()).to.be.false;\n });\n });\n describe('#matchByOccurrenceID', function () {\n it('should be able to match tunit2 and tunit3 by specimen identifiers', function () {\n expect(new phyx.TaxonomicUnitMatcher(tunit2, tunit3).matchByExternalReferences()).to.be.false;\n expect(new phyx.TaxonomicUnitMatcher(tunit2, tunit3).matchByOccurrenceID()).to.be.true;\n expect(new phyx.TaxonomicUnitMatcher(tunit2, tunit3).matchByNameComplete()).to.be.false;\n });\n });\n describe('#matched and #matchReason', function () {\n it('should match tunit1 and tunit2 on the basis of identical complete names', function () {\n const matcher = new phyx.TaxonomicUnitMatcher(tunit1, tunit2);\n expect(matcher.matched).to.be.true;\n expect(matcher.matchReason).to.include('share the same complete name');\n });\n\n it('should match tunit3 and tunit4 by identical external reference', function () {\n const matcher = new phyx.TaxonomicUnitMatcher(tunit3, tunit4);\n expect(matcher.matched).to.be.true;\n expect(matcher.matchReason).to.include('External reference');\n });\n\n it('should match tunit2 and tunit3 by identical specimen identifier', function () {\n const matcher = new phyx.TaxonomicUnitMatcher(tunit2, tunit3);\n expect(matcher.matched).to.be.true;\n expect(matcher.matchReason).to.include('Specimen identifier');\n });\n });\n});\n", "static": true, - "longname": "/Users/gaurav/Development/phyloref/phyx.js/test/taxonomic-units.js", + "longname": "/Users/gaurav/Developer/phyloref/phyx.js/test/taxonomic-units.js", "access": null, "description": null, "lineNumber": 1 }, { - "__docId__": 423, + "__docId__": 424, "kind": "test", - "name": "describe166", - "testId": 166, + "name": "describe167", + "testId": 167, "memberof": "test/taxonomic-units.js", "testDepth": 0, "static": true, - "longname": "test/taxonomic-units.js~describe166", + "longname": "test/taxonomic-units.js~describe167", "access": null, "description": "TaxonomicUnitWrapper", "lineNumber": 20 }, { - "__docId__": 424, + "__docId__": 425, "kind": "test", - "name": "describe167", - "testId": 167, - "memberof": "test/taxonomic-units.js~describe166", + "name": "describe168", + "testId": 168, + "memberof": "test/taxonomic-units.js~describe167", "testDepth": 1, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe167", + "longname": "test/taxonomic-units.js~describe167.describe168", "access": null, "description": "#constructor given no arguments", "lineNumber": 21 }, { - "__docId__": 425, + "__docId__": 426, "kind": "test", - "name": "it168", - "testId": 168, - "memberof": "test/taxonomic-units.js~describe166.describe167", + "name": "it169", + "testId": 169, + "memberof": "test/taxonomic-units.js~describe167.describe168", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe167.it168", + "longname": "test/taxonomic-units.js~describe167.describe168.it169", "access": null, "description": "should create an empty TaxonomicUnitWrapper without a defined label", "lineNumber": 22 }, { - "__docId__": 426, + "__docId__": 427, "kind": "test", - "name": "describe169", - "testId": 169, - "memberof": "test/taxonomic-units.js~describe166", + "name": "describe170", + "testId": 170, + "memberof": "test/taxonomic-units.js~describe167", "testDepth": 1, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe169", + "longname": "test/taxonomic-units.js~describe167.describe170", "access": null, "description": "#label given a taxonomic unit", "lineNumber": 51 }, { - "__docId__": 427, + "__docId__": 428, "kind": "test", - "name": "it170", - "testId": 170, - "memberof": "test/taxonomic-units.js~describe166.describe169", + "name": "it171", + "testId": 171, + "memberof": "test/taxonomic-units.js~describe167.describe170", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe169.it170", + "longname": "test/taxonomic-units.js~describe167.describe170.it171", "access": null, "description": "should return a wrapped scientific name", "lineNumber": 52 }, { - "__docId__": 428, + "__docId__": 429, "kind": "test", - "name": "it171", - "testId": 171, - "memberof": "test/taxonomic-units.js~describe166.describe169", + "name": "it172", + "testId": 172, + "memberof": "test/taxonomic-units.js~describe167.describe170", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe169.it171", + "longname": "test/taxonomic-units.js~describe167.describe170.it172", "access": null, "description": "should return a wrapped specimen identifier preceded by \"Specimen\"", "lineNumber": 62 }, { - "__docId__": 429, + "__docId__": 430, "kind": "test", - "name": "it172", - "testId": 172, - "memberof": "test/taxonomic-units.js~describe166.describe169", + "name": "it173", + "testId": 173, + "memberof": "test/taxonomic-units.js~describe167.describe170", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe169.it172", + "longname": "test/taxonomic-units.js~describe167.describe170.it173", "access": null, "description": "should return specimens with an occurrenceID as well as a taxon concept", "lineNumber": 69 }, { - "__docId__": 430, + "__docId__": 431, "kind": "test", - "name": "it173", - "testId": 173, - "memberof": "test/taxonomic-units.js~describe166.describe169", + "name": "it174", + "testId": 174, + "memberof": "test/taxonomic-units.js~describe167.describe170", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe169.it173", + "longname": "test/taxonomic-units.js~describe167.describe170.it174", "access": null, "description": "should ignore occurrence ID if typed as a taxon concept", "lineNumber": 79 }, { - "__docId__": 431, + "__docId__": 432, "kind": "test", - "name": "it174", - "testId": 174, - "memberof": "test/taxonomic-units.js~describe166.describe169", + "name": "it175", + "testId": 175, + "memberof": "test/taxonomic-units.js~describe167.describe170", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe169.it174", + "longname": "test/taxonomic-units.js~describe167.describe170.it175", "access": null, "description": "should return a wrapped external reference by surrounding it with \"<>\"", "lineNumber": 87 }, { - "__docId__": 432, + "__docId__": 433, "kind": "test", - "name": "it175", - "testId": 175, - "memberof": "test/taxonomic-units.js~describe166.describe169", + "name": "it176", + "testId": 176, + "memberof": "test/taxonomic-units.js~describe167.describe170", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe169.it175", + "longname": "test/taxonomic-units.js~describe167.describe170.it176", "access": null, "description": "should provide both taxon name and occurrence ID in label, but ignore external reference", "lineNumber": 95 }, { - "__docId__": 433, + "__docId__": 434, "kind": "test", - "name": "describe176", - "testId": 176, - "memberof": "test/taxonomic-units.js~describe166", + "name": "describe177", + "testId": 177, + "memberof": "test/taxonomic-units.js~describe167", "testDepth": 1, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe176", + "longname": "test/taxonomic-units.js~describe167.describe177", "access": null, "description": "#fromLabel", "lineNumber": 107 }, { - "__docId__": 434, + "__docId__": 435, "kind": "test", - "name": "it177", - "testId": 177, - "memberof": "test/taxonomic-units.js~describe166.describe176", + "name": "it178", + "testId": 178, + "memberof": "test/taxonomic-units.js~describe167.describe177", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe176.it177", + "longname": "test/taxonomic-units.js~describe167.describe177.it178", "access": null, "description": "should return empty lists when inputs are empty or undefined", "lineNumber": 108 }, { - "__docId__": 435, + "__docId__": 436, "kind": "test", - "name": "it178", - "testId": 178, - "memberof": "test/taxonomic-units.js~describe166.describe176", + "name": "it179", + "testId": 179, + "memberof": "test/taxonomic-units.js~describe167.describe177", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe176.it178", + "longname": "test/taxonomic-units.js~describe167.describe177.it179", "access": null, "description": "when given a scientific name, it should return a list of a single TU wrapping a scientific name", "lineNumber": 115 }, { - "__docId__": 436, + "__docId__": 437, "kind": "test", - "name": "it179", - "testId": 179, - "memberof": "test/taxonomic-units.js~describe166.describe176", + "name": "it180", + "testId": 180, + "memberof": "test/taxonomic-units.js~describe167.describe177", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe176.it179", + "longname": "test/taxonomic-units.js~describe167.describe177.it180", "access": null, "description": "when given a scientific name separated with underscores, it should return a list of a single TU wrapping the scientific name", "lineNumber": 129 }, { - "__docId__": 437, + "__docId__": 438, "kind": "test", - "name": "describe180", - "testId": 180, - "memberof": "test/taxonomic-units.js~describe166", + "name": "describe181", + "testId": 181, + "memberof": "test/taxonomic-units.js~describe167", "testDepth": 1, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe180", + "longname": "test/taxonomic-units.js~describe167.describe181", "access": null, "description": "#asOWLEquivClass", "lineNumber": 144 }, { - "__docId__": 438, + "__docId__": 439, "kind": "test", - "name": "it181", - "testId": 181, - "memberof": "test/taxonomic-units.js~describe166.describe180", + "name": "it182", + "testId": 182, + "memberof": "test/taxonomic-units.js~describe167.describe181", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe180.it181", + "longname": "test/taxonomic-units.js~describe167.describe181.it182", "access": null, "description": "when given a taxon concept, only the complete name should be present in the equivClass", "lineNumber": 145 }, { - "__docId__": 439, + "__docId__": 440, "kind": "test", - "name": "it182", - "testId": 182, - "memberof": "test/taxonomic-units.js~describe166.describe180", + "name": "it183", + "testId": 183, + "memberof": "test/taxonomic-units.js~describe167.describe181", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe166.describe180.it182", + "longname": "test/taxonomic-units.js~describe167.describe181.it183", "access": null, "description": "when given a specimen, only the occurrence ID should be present in the equivClass", "lineNumber": 160 }, { - "__docId__": 440, + "__docId__": 441, "kind": "test", - "name": "describe183", - "testId": 183, + "name": "describe184", + "testId": 184, "memberof": "test/taxonomic-units.js", "testDepth": 0, "static": true, - "longname": "test/taxonomic-units.js~describe183", + "longname": "test/taxonomic-units.js~describe184", "access": null, "description": "TaxonomicUnitMatcher", "lineNumber": 175 }, { - "__docId__": 441, + "__docId__": 442, "kind": "test", - "name": "describe184", - "testId": 184, - "memberof": "test/taxonomic-units.js~describe183", + "name": "describe185", + "testId": 185, + "memberof": "test/taxonomic-units.js~describe184", "testDepth": 1, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe184", + "longname": "test/taxonomic-units.js~describe184.describe185", "access": null, "description": "#matchByNameComplete", "lineNumber": 203 }, { - "__docId__": 442, + "__docId__": 443, "kind": "test", - "name": "it185", - "testId": 185, - "memberof": "test/taxonomic-units.js~describe183.describe184", + "name": "it186", + "testId": 186, + "memberof": "test/taxonomic-units.js~describe184.describe185", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe184.it185", + "longname": "test/taxonomic-units.js~describe184.describe185.it186", "access": null, "description": "should be able to match tunit1 and tunit2 by complete name", "lineNumber": 204 }, { - "__docId__": 443, + "__docId__": 444, "kind": "test", - "name": "describe186", - "testId": 186, - "memberof": "test/taxonomic-units.js~describe183", + "name": "describe187", + "testId": 187, + "memberof": "test/taxonomic-units.js~describe184", "testDepth": 1, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe186", + "longname": "test/taxonomic-units.js~describe184.describe187", "access": null, "description": "#matchByExternalReferences", "lineNumber": 210 }, { - "__docId__": 444, + "__docId__": 445, "kind": "test", - "name": "it187", - "testId": 187, - "memberof": "test/taxonomic-units.js~describe183.describe186", + "name": "it188", + "testId": 188, + "memberof": "test/taxonomic-units.js~describe184.describe187", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe186.it187", + "longname": "test/taxonomic-units.js~describe184.describe187.it188", "access": null, "description": "should be able to match tunit3 and tunit4 by external references", "lineNumber": 211 }, { - "__docId__": 445, + "__docId__": 446, "kind": "test", - "name": "describe188", - "testId": 188, - "memberof": "test/taxonomic-units.js~describe183", + "name": "describe189", + "testId": 189, + "memberof": "test/taxonomic-units.js~describe184", "testDepth": 1, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe188", + "longname": "test/taxonomic-units.js~describe184.describe189", "access": null, "description": "#matchByOccurrenceID", "lineNumber": 217 }, { - "__docId__": 446, + "__docId__": 447, "kind": "test", - "name": "it189", - "testId": 189, - "memberof": "test/taxonomic-units.js~describe183.describe188", + "name": "it190", + "testId": 190, + "memberof": "test/taxonomic-units.js~describe184.describe189", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe188.it189", + "longname": "test/taxonomic-units.js~describe184.describe189.it190", "access": null, "description": "should be able to match tunit2 and tunit3 by specimen identifiers", "lineNumber": 218 }, { - "__docId__": 447, + "__docId__": 448, "kind": "test", - "name": "describe190", - "testId": 190, - "memberof": "test/taxonomic-units.js~describe183", + "name": "describe191", + "testId": 191, + "memberof": "test/taxonomic-units.js~describe184", "testDepth": 1, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe190", + "longname": "test/taxonomic-units.js~describe184.describe191", "access": null, "description": "#matched and #matchReason", "lineNumber": 224 }, { - "__docId__": 448, + "__docId__": 449, "kind": "test", - "name": "it191", - "testId": 191, - "memberof": "test/taxonomic-units.js~describe183.describe190", + "name": "it192", + "testId": 192, + "memberof": "test/taxonomic-units.js~describe184.describe191", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe190.it191", + "longname": "test/taxonomic-units.js~describe184.describe191.it192", "access": null, "description": "should match tunit1 and tunit2 on the basis of identical complete names", "lineNumber": 225 }, { - "__docId__": 449, + "__docId__": 450, "kind": "test", - "name": "it192", - "testId": 192, - "memberof": "test/taxonomic-units.js~describe183.describe190", + "name": "it193", + "testId": 193, + "memberof": "test/taxonomic-units.js~describe184.describe191", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe190.it192", + "longname": "test/taxonomic-units.js~describe184.describe191.it193", "access": null, "description": "should match tunit3 and tunit4 by identical external reference", "lineNumber": 231 }, { - "__docId__": 450, + "__docId__": 451, "kind": "test", - "name": "it193", - "testId": 193, - "memberof": "test/taxonomic-units.js~describe183.describe190", + "name": "it194", + "testId": 194, + "memberof": "test/taxonomic-units.js~describe184.describe191", "testDepth": 2, "static": true, - "longname": "test/taxonomic-units.js~describe183.describe190.it193", + "longname": "test/taxonomic-units.js~describe184.describe191.it194", "access": null, "description": "should match tunit2 and tunit3 by identical specimen identifier", "lineNumber": 237 diff --git a/docs/script/search_index.js b/docs/script/search_index.js index 100214e9..5dee36ad 100644 --- a/docs/script/search_index.js +++ b/docs/script/search_index.js @@ -691,22 +691,28 @@ window.esdocSearchIndex = [ ], [ "", - "test-file/test/specimens.js.html#lineNumber77", + "test-file/test/specimens.js.html#lineNumber83", "SpecimenWrapper #constructor should be able to create a specimen JSON record from an occurrence ID", "test" ], [ "", - "test-file/test/specimens.js.html#lineNumber24", + "test-file/test/specimens.js.html#lineNumber30", "SpecimenWrapper #constructor should be able to extract an occurenceID and catalogNumber from simple specimen IDs", "test" ], [ "", - "test-file/test/specimens.js.html#lineNumber53", + "test-file/test/specimens.js.html#lineNumber59", "SpecimenWrapper #constructor should be able to extract the same occurrenceID from different representations", "test" ], + [ + "", + "test-file/test/specimens.js.html#lineNumber24", + "SpecimenWrapper #constructor should be able to wrap a specimen with an empty occurenceID", + "test" + ], [ "", "test-file/test/specimens.js.html#lineNumber18", @@ -715,25 +721,25 @@ window.esdocSearchIndex = [ ], [ "", - "test-file/test/specimens.js.html#lineNumber33", + "test-file/test/specimens.js.html#lineNumber39", "SpecimenWrapper #constructor should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination", "test" ], [ "", - "test-file/test/specimens.js.html#lineNumber43", + "test-file/test/specimens.js.html#lineNumber49", "SpecimenWrapper #constructor should extract occurenceID, institutionCode and catalogNumber from Darwin Core triples", "test" ], [ "", - "test-file/test/specimens.js.html#lineNumber68", + "test-file/test/specimens.js.html#lineNumber74", "SpecimenWrapper #constructor should not attempt to split a URL into occurenceID, institutionCode and catalogNumber", "test" ], [ "", - "test-file/test/specimens.js.html#lineNumber59", + "test-file/test/specimens.js.html#lineNumber65", "SpecimenWrapper #constructor should not attempt to split a URN into occurenceID, institutionCode and catalogNumber", "test" ], diff --git a/docs/source.html b/docs/source.html index 67bc01fe..467b60c1 100644 --- a/docs/source.html +++ b/docs/source.html @@ -63,7 +63,7 @@ 50 %7/14 4411 byte 135 - 2021-03-02 04:00:27 (UTC) + 2024-12-03 05:49:05 (UTC) src/wrappers/CitationWrapper.js @@ -71,7 +71,7 @@ 57 %4/7 4974 byte 130 - 2024-06-04 03:09:07 (UTC) + 2024-12-03 05:49:05 (UTC) src/wrappers/PhylogenyWrapper.js @@ -79,7 +79,7 @@ 10 %2/19 18456 byte 480 - 2024-06-04 03:09:07 (UTC) + 2024-12-03 05:49:05 (UTC) src/wrappers/PhylorefWrapper.js @@ -87,7 +87,7 @@ 28 %9/32 32668 byte 811 - 2024-06-04 03:09:07 (UTC) + 2024-12-03 05:49:05 (UTC) src/wrappers/PhyxWrapper.js @@ -95,15 +95,15 @@ 41 %5/12 14037 byte 312 - 2024-06-04 03:09:07 (UTC) + 2024-12-03 05:49:05 (UTC) src/wrappers/SpecimenWrapper.js SpecimenWrapper 77 %14/18 - 8770 byte + 8676 byte 241 - 2024-06-04 03:09:07 (UTC) + 2024-12-02 03:27:18 (UTC) src/wrappers/TaxonConceptWrapper.js @@ -111,7 +111,7 @@ 77 %14/18 7247 byte 211 - 2024-06-04 03:09:07 (UTC) + 2024-12-03 05:26:12 (UTC) src/wrappers/TaxonNameWrapper.js @@ -119,7 +119,7 @@ 74 %29/39 15356 byte 498 - 2024-06-04 03:09:07 (UTC) + 2024-12-03 05:49:05 (UTC) src/wrappers/TaxonomicUnitWrapper.js @@ -127,7 +127,7 @@ 70 %14/20 8220 byte 265 - 2024-06-04 03:09:07 (UTC) + 2024-12-03 05:49:05 (UTC) diff --git a/docs/test-file/test/scripts/resolve.js.html b/docs/test-file/test/scripts/resolve.js.html index 2855db5d..709c3259 100644 --- a/docs/test-file/test/scripts/resolve.js.html +++ b/docs/test-file/test/scripts/resolve.js.html @@ -107,15 +107,15 @@ ]); expect(resultObj.Alligatoridae[0].resolved).to.include({ - '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree14.9@ott195670', + '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree15.1@ott195670', label: 'Alligatoridae', }); expect(resultObj.Alligatorinae[0].resolved).to.include({ - '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree14.9@ott151255', + '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree15.1@ott151255', label: 'Alligatorinae', }); expect(resultObj.Crocodylidae[0].resolved).to.include({ - '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree14.9@ott1092501', + '@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree15.1@ott1092501', label: 'Longirostres', }); expect(resultObj.Diplocynodontinae[0]).to.include({ diff --git a/docs/test-file/test/specimens.js.html b/docs/test-file/test/specimens.js.html index 2bd4ac66..5cbdfaa6 100644 --- a/docs/test-file/test/specimens.js.html +++ b/docs/test-file/test/specimens.js.html @@ -66,10 +66,16 @@ expect(wrapped).to.be.an.instanceOf(phyx.SpecimenWrapper); expect(wrapped.occurrenceID).to.be.undefined; }); + it('should be able to wrap a specimen with an empty occurenceID', function () { + const wrapped = new phyx.SpecimenWrapper(phyx.SpecimenWrapper.fromOccurrenceID('')); + + expect(wrapped).to.be.an.instanceOf(phyx.SpecimenWrapper); + expect(wrapped.occurrenceID).to.equal(''); + }); it('should be able to extract an occurenceID and catalogNumber from simple specimen IDs', function () { const wrapper = new phyx.SpecimenWrapper({ occurrenceID: 'Wall 2527, Fiji (uc)', - 'dwc:basisOfRecord': 'PreservedSpecimen', + basisOfRecord: 'PreservedSpecimen', }); expect(wrapper.occurrenceID).to.equal('Wall 2527, Fiji (uc)'); expect(wrapper.catalogNumber).to.equal('Wall 2527, Fiji (uc)'); @@ -78,7 +84,7 @@ it('should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination', function () { const wrapper = new phyx.SpecimenWrapper({ occurrenceID: 'FMNH:PR 2081', - 'dwc:basisOfRecord': 'PreservedSpecimen', + basisOfRecord: 'PreservedSpecimen', }); expect(wrapper.occurrenceID).to.equal('FMNH:PR 2081'); expect(wrapper.institutionCode).to.equal('FMNH'); @@ -125,7 +131,7 @@ expect(specimen.institutionCode).to.equal('FMNH'); expect(specimen.collectionCode).to.equal('PR'); expect(specimen.catalogNumber).to.equal('2081'); - expect(specimen['dwc:basisOfRecord']).to.equal('PreservedSpecimen'); + expect(specimen.basisOfRecord).to.equal('PreservedSpecimen'); }); }); }); diff --git a/docs/test.html b/docs/test.html index 0df675a3..d984eb9b 100644 --- a/docs/test.html +++ b/docs/test.html @@ -953,43 +953,49 @@ -

should be able to extract an occurenceID and catalogNumber from simple specimen IDs

+

should be able to wrap a specimen with an empty occurenceID

- -

should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination

+

should be able to extract an occurenceID and catalogNumber from simple specimen IDs

- -

should extract occurenceID, institutionCode and catalogNumber from Darwin Core triples

+

should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination

- -

should be able to extract the same occurrenceID from different representations

+

should extract occurenceID, institutionCode and catalogNumber from Darwin Core triples

- -

should not attempt to split a URN into occurenceID, institutionCode and catalogNumber

+

should be able to extract the same occurrenceID from different representations

- -

should not attempt to split a URL into occurenceID, institutionCode and catalogNumber

+

should not attempt to split a URN into occurenceID, institutionCode and catalogNumber

- -

should be able to create a specimen JSON record from an occurrence ID

+

should not attempt to split a URL into occurenceID, institutionCode and catalogNumber

+
+ - + + + +

should be able to create a specimen JSON record from an occurrence ID

-