diff --git a/.gitignore b/.gitignore index 2d2b47d1bdb912c2f325d6d7d3680cb3ad7d5c9b..b940b81b8feb63cd4c28bd94839df325f877b906 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea -node_modules \ No newline at end of file +node_modules +test-data/datacrates/ \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a1be4f7d8b2038b1ebd38366840552a105ec4703..9c85f04fc2ee698756e0ef72a4fae52969d467b7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ChangeListManager"> - <list default="true" id="ad75bb9b-12db-4cad-af64-4c68cecdb87b" name="Default Changelist" comment="" /> + <list default="true" id="ad75bb9b-12db-4cad-af64-4c68cecdb87b" name="Default Changelist" comment=""> + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/lib/CatalogSolr.js" beforeDir="false" afterPath="$PROJECT_DIR$/lib/CatalogSolr.js" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/0e83bc52-1887-4c75-ac5d-a15e74858a10/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/1c4b4b88-28ed-4cc8-9f55-7c3a93941a7f/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/3c26a97b-2960-4704-8071-6fcf648e2cff/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/5aed364c-3459-485c-99fa-2526719227a6/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/8019258e-e826-4387-bac0-7730bc333514/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/82d1b263-2beb-443a-85b5-8b9018137991/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/cefdbe3d-f3f7-49bd-97a5-6575549c2d1c/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/dc1b4d81-4c48-439a-a329-39cb10a28e0f/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/datacrates/f3e568cf-42a9-42b6-8217-e697457dab8c/CATALOG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/test-data/fields.json" beforeDir="false" afterPath="$PROJECT_DIR$/test-data/fields.json" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/test/catalog.spec.js" beforeDir="false" afterPath="$PROJECT_DIR$/test/catalog.spec.js" afterDir="false" /> + </list> <ignored path="$PROJECT_DIR$/.tmp/" /> <ignored path="$PROJECT_DIR$/temp/" /> <ignored path="$PROJECT_DIR$/tmp/" /> @@ -12,23 +26,23 @@ <option name="LAST_RESOLUTION" value="IGNORE" /> </component> <component name="FileEditorManager"> - <splitter split-orientation="horizontal" split-proportion="0.56355554"> + <splitter split-orientation="horizontal" split-proportion="0.5009346"> <split-first> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> - <file pinned="false" current-in-tab="false"> + <file pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/test/catalog.spec.js"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="400"> - <caret line="71" column="6" selection-start-line="71" selection-start-column="6" selection-end-line="71" selection-end-column="6" /> + <state relative-caret-position="555"> + <caret line="129" column="64" selection-start-line="129" selection-start-column="64" selection-end-line="129" selection-end-column="64" /> </state> </provider> </entry> </file> - <file pinned="false" current-in-tab="true"> + <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/lib/CatalogSolr.js"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="163"> - <caret line="73" column="23" selection-start-line="73" selection-start-column="23" selection-end-line="73" selection-end-column="23" /> + <state relative-caret-position="217"> + <caret line="90" column="17" selection-start-line="90" selection-start-column="17" selection-end-line="90" selection-end-column="17" /> </state> </provider> </entry> @@ -58,26 +72,26 @@ <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/test-data/CATALOG.json"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="265"> - <caret line="41" column="18" selection-start-line="41" selection-start-column="18" selection-end-line="41" selection-end-column="18" /> + <state relative-caret-position="308"> + <caret line="62" column="22" selection-start-line="62" selection-start-column="16" selection-end-line="62" selection-end-column="22" /> </state> </provider> </entry> </file> - <file pinned="false" current-in-tab="false"> + <file pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/test-data/fields.json"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="486"> - <caret line="48" column="5" selection-start-line="48" selection-start-column="5" selection-end-line="48" selection-end-column="5" /> + <state relative-caret-position="291"> + <caret line="46" column="4" selection-start-line="46" selection-start-column="4" selection-end-line="46" selection-end-column="4" /> </state> </provider> </entry> </file> - <file pinned="false" current-in-tab="true"> + <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/test-data/CatalogSolr.json"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="189"> - <caret line="23" column="12" selection-start-line="23" selection-start-column="5" selection-end-line="23" selection-end-column="12" /> + <state relative-caret-position="-459"> + <caret line="2" column="29" selection-start-line="2" selection-start-column="22" selection-end-line="2" selection-end-column="29" /> </state> </provider> </entry> @@ -85,8 +99,8 @@ <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/test-data/FARMTOFREEWAYS_CATALOG.json"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="1896"> - <caret line="128" column="25" selection-start-line="128" selection-start-column="9" selection-end-line="128" selection-end-column="25" /> + <state relative-caret-position="300"> + <caret line="20" column="14" selection-start-line="20" selection-start-column="7" selection-end-line="20" selection-end-column="14" /> </state> </provider> </entry> @@ -98,8 +112,12 @@ <component name="FindInProjectRecents"> <findStrings> <find>datePublished</find> + <find>geo</find> </findStrings> </component> + <component name="Git.Settings"> + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> + </component> <component name="IdeDocumentHistory"> <option name="CHANGED_PATHS"> <list> @@ -109,18 +127,21 @@ <option value="$PROJECT_DIR$/test-data/CATALOG.json" /> <option value="$PROJECT_DIR$/test-data/FARMTOFREEWAYS_CATALOG.json" /> <option value="$APPLICATION_CONFIG_DIR$/scratches/scratch_3.js" /> - <option value="$PROJECT_DIR$/test/catalog.spec.js" /> <option value="$PROJECT_DIR$/test-data/CatalogSolr.json" /> - <option value="$PROJECT_DIR$/test-data/fields.json" /> + <option value="$PROJECT_DIR$/.gitignore" /> <option value="$PROJECT_DIR$/lib/CatalogSolr.js" /> + <option value="$PROJECT_DIR$/test-data/fields.json" /> + <option value="$PROJECT_DIR$/test/catalog.spec.js" /> </list> </option> </component> <component name="ProjectFrameBounds" extendedState="6"> - <option name="y" value="23" /> - <option name="width" value="1440" /> - <option name="height" value="877" /> + <option name="x" value="1440" /> + <option name="y" value="-277" /> + <option name="width" value="1920" /> + <option name="height" value="1177" /> </component> + <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectView"> <navigator proportions="" version="1"> <foldersAlwaysOnTop value="true" /> @@ -160,6 +181,7 @@ </panes> </component> <component name="PropertiesComponent"> + <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> <property name="WebServerToolWindowFactoryState" value="false" /> <property name="com.intellij.ide.scratch.LRUPopupBuilder$1/New Scratch File" value="JavaScript" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/test-data" /> @@ -211,62 +233,62 @@ <option name="presentableId" value="Default" /> <updated>1558421147646</updated> <workItem from="1558421149207" duration="30478000" /> - <workItem from="1558654598476" duration="30370000" /> + <workItem from="1558654598476" duration="36666000" /> </task> <servers /> </component> <component name="TestHistory"> - <history-entry file="catalog_spec_js - 2019.05.25 at 23h 54m 20s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 22m 07s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.25 at 23h 56m 31s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 22m 47s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.25 at 23h 56m 33s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 24m 46s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.25 at 23h 57m 45s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 25m 32s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.26 at 00h 03m 31s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 26m 13s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.26 at 00h 04m 20s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 28m 24s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.26 at 00h 05m 32s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 31m 09s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.26 at 00h 07m 14s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 31m 10s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.26 at 00h 07m 22s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 32m 20s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> - <history-entry file="catalog_spec_js - 2019.05.26 at 00h 11m 37s.xml"> + <history-entry file="catalog_spec_js - 2019.05.29 at 11h 32m 46s.xml"> <configuration name="catalog.spec.js" configurationId="mocha-javascript-test-runner" /> </history-entry> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="60848000" /> + <option name="totallyTimeSpent" value="67144000" /> </component> <component name="ToolWindowManager"> - <frame x="0" y="23" width="1440" height="877" extended-state="6" /> + <frame x="1440" y="-277" width="1920" height="1177" extended-state="6" /> <editor active="true" /> <layout> - <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20718816" /> + <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.15481833" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Favorites" order="2" side_tool="true" /> <window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Find" order="1" /> <window_info anchor="bottom" id="Run" order="2" weight="0.3299539" /> - <window_info active="true" anchor="bottom" id="Debug" order="3" visible="true" weight="0.3566879" /> + <window_info active="true" anchor="bottom" id="Debug" order="3" visible="true" weight="0.35668203" /> <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> <window_info anchor="bottom" id="TODO" order="6" /> <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> <window_info anchor="bottom" id="Version Control" order="8" /> - <window_info anchor="bottom" id="Terminal" order="9" weight="0.3299539" /> + <window_info anchor="bottom" id="Terminal" order="9" weight="0.23870967" /> <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" /> <window_info anchor="right" id="Commander" order="0" weight="0.4" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> @@ -281,14 +303,9 @@ <breakpoints> <line-breakpoint enabled="true" type="javascript"> <url>file://$PROJECT_DIR$/test/catalog.spec.js</url> - <line>71</line> - <option name="timeStamp" value="23" /> - </line-breakpoint> - <line-breakpoint enabled="true" type="javascript"> - <url>file://$PROJECT_DIR$/lib/CatalogSolr.js</url> - <line>75</line> + <line>128</line> <properties lambdaOrdinal="-1" /> - <option name="timeStamp" value="76" /> + <option name="timeStamp" value="95" /> </line-breakpoint> </breakpoints> </breakpoint-manager> @@ -306,52 +323,59 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/test-data/FARMTOFREEWAYS_CATALOG.json"> + <entry file="file://$APPLICATION_CONFIG_DIR$/scratches/scratch_3.js"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="1896"> - <caret line="128" column="25" selection-start-line="128" selection-start-column="9" selection-end-line="128" selection-end-column="25" /> + <state relative-caret-position="1620"> + <caret line="108" column="29" selection-start-line="108" selection-start-column="29" selection-end-line="108" selection-end-column="29" /> </state> </provider> </entry> - <entry file="file://$APPLICATION_CONFIG_DIR$/scratches/scratch_3.js"> + <entry file="file://$PROJECT_DIR$/.gitignore"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="1620"> - <caret line="108" column="29" selection-start-line="108" selection-start-column="29" selection-end-line="108" selection-end-column="29" /> + <state relative-caret-position="15"> + <caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/test-data/fields.json"> + <entry file="file://$PROJECT_DIR$/test-data/FARMTOFREEWAYS_CATALOG.json"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="486"> - <caret line="48" column="5" selection-start-line="48" selection-start-column="5" selection-end-line="48" selection-end-column="5" /> + <state relative-caret-position="300"> + <caret line="20" column="14" selection-start-line="20" selection-start-column="7" selection-end-line="20" selection-end-column="14" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/test-data/CATALOG.json"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="265"> - <caret line="41" column="18" selection-start-line="41" selection-start-column="18" selection-end-line="41" selection-end-column="18" /> + <state relative-caret-position="308"> + <caret line="62" column="22" selection-start-line="62" selection-start-column="16" selection-end-line="62" selection-end-column="22" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/test-data/CatalogSolr.json"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="189"> - <caret line="23" column="12" selection-start-line="23" selection-start-column="5" selection-end-line="23" selection-end-column="12" /> + <state relative-caret-position="-459"> + <caret line="2" column="29" selection-start-line="2" selection-start-column="22" selection-end-line="2" selection-end-column="29" /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/test/catalog.spec.js"> + <entry file="file://$PROJECT_DIR$/test-data/fields.json"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="400"> - <caret line="71" column="6" selection-start-line="71" selection-start-column="6" selection-end-line="71" selection-end-column="6" /> + <state relative-caret-position="291"> + <caret line="46" column="4" selection-start-line="46" selection-start-column="4" selection-end-line="46" selection-end-column="4" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/lib/CatalogSolr.js"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="163"> - <caret line="73" column="23" selection-start-line="73" selection-start-column="23" selection-end-line="73" selection-end-column="23" /> + <state relative-caret-position="217"> + <caret line="90" column="17" selection-start-line="90" selection-start-column="17" selection-end-line="90" selection-end-column="17" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/test/catalog.spec.js"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="555"> + <caret line="129" column="64" selection-start-line="129" selection-start-column="64" selection-end-line="129" selection-end-column="64" /> </state> </provider> </entry> diff --git a/lib/CatalogSolr.js b/lib/CatalogSolr.js index e9c96ef4c776400d6e1aef7572586bf7a92957c1..f09c3e7181e665ed01a9b070b677c11bffe14b4b 100644 --- a/lib/CatalogSolr.js +++ b/lib/CatalogSolr.js @@ -17,7 +17,6 @@ class CatalogSolr { _.each(this.config, function (config) { assert.strictEqual(_.isObject(config['facets']), true, 'missing facets in configuration'); assert.strictEqual(_.isObject(config['flatten']), true, 'missing special in configuration'); - assert.strictEqual(_.isArray(config['rootNodeFieldValues']), true, 'missing links in configuration'); }); return true; } @@ -53,7 +52,7 @@ class CatalogSolr { findFacetObject(graph, obj, name, value, facetInfo) { let key = ''; - + // TODO: send _Dataset prefix from function if (facetInfo['field_suffix'] === '_Dataset_facetmulti') { if (facetInfo['tokenize']) { value = value.split(facetInfo['tokenize']['delim']); @@ -108,7 +107,7 @@ class CatalogSolr { const facetObject = this.findFacetObject(graph, gg, kk, ggg, facetInfo); base[facetObject['key']] = facetObject['value']; } - if (kk === '@type') { + if (kk === '@type') { //TODO handle this by config! base.record_type_s = ggg; base.record_format_s = ggg; base.type_label = ggg; @@ -127,7 +126,20 @@ class CatalogSolr { }); }); if (found) { - base[kk] = this.getGraphElement(config, graph, found); + if (config.flatten && config.flatten[kk]) { + const objFound = this.getGraphElement(config, graph, found); + if (config.flatten[kk]['obj'] === 'array') { + if (Array.isArray(base[kk])) { + base[kk].push(JSON.stringify(objFound)); + } else { + base[kk] = [JSON.stringify(objFound)]; + } + } else { + base[kk] = JSON.stringify(objFound) + } + } else { + base[kk] = this.getGraphElement(config, graph, found); + } } } else { base[kk] = ggg; diff --git a/test-data/datacrates/0e83bc52-1887-4c75-ac5d-a15e74858a10/CATALOG.json b/test-data/datacrates/0e83bc52-1887-4c75-ac5d-a15e74858a10/CATALOG.json deleted file mode 100644 index 28fbeacb3a0c364416d69e1396215c070c69d305..0000000000000000000000000000000000000000 --- a/test-data/datacrates/0e83bc52-1887-4c75-ac5d-a15e74858a10/CATALOG.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "0e83bc52-1887-4c75-ac5d-a15e74858a10", - "@type": "Dataset", - "path": "./", - "name": "Shortcomings Burnishments Unfreezing Rosoglios Mohair Coacervated Dumpy Ramiform Notturno Attuition Hoofs Succubuses Discomboberate Snoddest Proctological Swerves", - "description": "Babbitted cherimoyas yardages monoclinisms salivating amphitropous tocology olycook lunarnauts tortility decarbonisers quadraplegic traprocks vulcanologist. Ecumenics oulks unvaile rhinocerot encode reposefulness lorn posterolateral jocosity nuisance atropins spiderwoods unlimber billboarding pedanticises dockets sportfully homologizers overgo rhizophagous sicilianos ultrawide volume varoom. Topstitching feblesses epilimnion escarp limner concluders cyprinodont amerce dandling.\n", - "dateCreated": "2019-05-25T14:11:39.544Z", - "datePublished": "2019-05-25T14:11:39.544Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Franco.Luzzatto@examples.edu" - }, - { - "@id": "Howard.Vierra@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Franco.Luzzatto@examples.edu", - "@type": "Person", - "identifier": "Franco.Luzzatto@examples.edu", - "name": "Franco Luzzatto", - "email": "Franco.Luzzatto@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "Howard.Vierra@examples.edu", - "@type": "Person", - "identifier": "Howard.Vierra@examples.edu", - "name": "Howard Vierra", - "email": "Howard.Vierra@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T14:11:39.544Z", - "object": { - "@id": "0e83bc52-1887-4c75-ac5d-a15e74858a10" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T14:11:39.544Z", - "object": { - "@id": "0e83bc52-1887-4c75-ac5d-a15e74858a10" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/datacrates/1c4b4b88-28ed-4cc8-9f55-7c3a93941a7f/CATALOG.json b/test-data/datacrates/1c4b4b88-28ed-4cc8-9f55-7c3a93941a7f/CATALOG.json deleted file mode 100644 index d21447eeecf44f59a4f81806695743da4a3d62ef..0000000000000000000000000000000000000000 --- a/test-data/datacrates/1c4b4b88-28ed-4cc8-9f55-7c3a93941a7f/CATALOG.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "1c4b4b88-28ed-4cc8-9f55-7c3a93941a7f", - "@type": "Dataset", - "path": "./", - "name": "Grapeseed Agloos Vacantly Geomancers Ticktacks Handwheels Socializable Localness Handsets Chemoprophylaxis Suppositious Bookmakings Hindering Industrializing Wisest Microliths Podzolisations Gracilities Slithered Cocainizations", - "description": "Anatoxin retrorse leglessnesses backbends pandering tumorgenicities puss tabued subpoenaing quintic scheffleras desaturation magnons rep specklednesses unperturbed excluding bimillennia volvuli lysogenise. Moldiest pleonastical hydroxylating eicosanoid pyrotartrates macroevolutions. Demilitarising benedicites gastrosophy entwisting millier cellulitides subsultuses pamphlets indicting. Eyehook worriment ungarbed isonomic. Allegeance phoneynesses hangnests newsdealers scootches pussy nothings equalizes mars eutaxite microsomes bacteriophagic expensive nascent pedophilias annexing shmatte conima vogueings proficience noviciates inerasible coxitides fusain gaolbreaks bardes abature. Nointed countdowns endogenic imparkation fishtailing apodosis petunias pollack dribblier churrs sedatest dulcian lantskips.\n", - "dateCreated": "2019-05-25T14:13:20.234Z", - "datePublished": "2019-05-25T14:13:20.234Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Kamil.Bertman@examples.edu" - }, - { - "@id": "Sander.Geiser@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Kamil.Bertman@examples.edu", - "@type": "Person", - "identifier": "Kamil.Bertman@examples.edu", - "name": "Kamil Bertman", - "email": "Kamil.Bertman@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "Sander.Geiser@examples.edu", - "@type": "Person", - "identifier": "Sander.Geiser@examples.edu", - "name": "Sander Geiser", - "email": "Sander.Geiser@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T14:13:20.234Z", - "object": { - "@id": "1c4b4b88-28ed-4cc8-9f55-7c3a93941a7f" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T14:13:20.234Z", - "object": { - "@id": "1c4b4b88-28ed-4cc8-9f55-7c3a93941a7f" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/datacrates/3c26a97b-2960-4704-8071-6fcf648e2cff/CATALOG.json b/test-data/datacrates/3c26a97b-2960-4704-8071-6fcf648e2cff/CATALOG.json deleted file mode 100644 index 06e67ffd48292cfe19c2476bcfff7cbb0f0adcea..0000000000000000000000000000000000000000 --- a/test-data/datacrates/3c26a97b-2960-4704-8071-6fcf648e2cff/CATALOG.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "3c26a97b-2960-4704-8071-6fcf648e2cff", - "@type": "Dataset", - "path": "./", - "name": "Amens Culminant Bidden Bronchitic Prokaryotes Midlander Kerbside Embruted Ponderment Geometrics Moralises Unlevelling", - "description": "Entrusted southwards ethicise poormouth choriambic weighbridges prolamins encrimsoned united simillimum hominize honorer thalassemias unpleasing sepmag chattier anabaptizing exodos nicish beckoned. Afflux nonterminating plebe upborne cancelation bibliography scoutcrafts multistranded cider darraigned malformation eucaryons flews featherheads ticken wares doitkin tridimensionality trolleybusses moraceous seasonableness. Dissentient ecloses pinchcocks tetrabrach countersignatures timoneer gentes. Obtuseness jigajog united subspecialises hardiment marque cerberean. Triumvirates stegodon oxyhemoglobins crackle fimbria upcatch pearmains begild synovias plectrum snobbishness straighted shovelheads aluminise orthohydrogen betook tutsan inequitable unarmoured tinas ingested neoplasty ectogeneses easying chondres. Retraicts diplostemonous stalemating pool cushinesses summarises demount proletariat archetypical nidgets balisaurs centerlines. Reasonableness terrellas phonophobias persnicketiness tutelar pulsative entropies gastritic infamize zoonotic multisense ragweeds swanky compunctions pyrocerams lamellate gothics honouree affair declamatorily footfaulting quietly conciseness.\n", - "dateCreated": "2019-05-25T14:04:22.433Z", - "datePublished": "2019-05-25T14:04:22.433Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Missy.Oikonomou@examples.edu" - }, - { - "@id": "Mario.Knappett@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Missy.Oikonomou@examples.edu", - "@type": "Person", - "identifier": "Missy.Oikonomou@examples.edu", - "name": "Missy Oikonomou", - "email": "Missy.Oikonomou@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "Mario.Knappett@examples.edu", - "@type": "Person", - "identifier": "Mario.Knappett@examples.edu", - "name": "Mario Knappett", - "email": "Mario.Knappett@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T14:04:22.433Z", - "object": { - "@id": "3c26a97b-2960-4704-8071-6fcf648e2cff" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T14:04:22.433Z", - "object": { - "@id": "3c26a97b-2960-4704-8071-6fcf648e2cff" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/datacrates/5aed364c-3459-485c-99fa-2526719227a6/CATALOG.json b/test-data/datacrates/5aed364c-3459-485c-99fa-2526719227a6/CATALOG.json deleted file mode 100644 index fecb524d6c5abb5fb7c049792cd466b61e6c5df5..0000000000000000000000000000000000000000 --- a/test-data/datacrates/5aed364c-3459-485c-99fa-2526719227a6/CATALOG.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "5aed364c-3459-485c-99fa-2526719227a6", - "@type": "Dataset", - "path": "./", - "name": "Disharmonising Seasonalities Bengas Pullmans Deforced Euchology Hyperbatons Emulsifier Schoolbag Boutonnieres Carboyed Solpugid Hyperdulical Sewages Asperger Slobberers Colchicines Bigfooting Felting Ammonals Scrimshoner Adelantados Intercut Lamplighters", - "description": "Jazzed hamarthritises cybersecurity phylloxeras translunary glissading pickaxing wallcovering undue pyretic bookstand ensigns gauped bestills routinised brabblement seacunnies. Conures rainstorm vrooming inhumes flumped resilements smarts repercussing jingle. Entombing haggle metaverses metronymic founts propagate wellingtons piezoelectrically embark somewhile fibrilla retroverse keyed leaderboards pesticides ulus. Unfriendlinesses antieducational worthful disputed soothsay pantaletted colloid inmates. Vivisections spanokopita jampanees intergrafted. Inchoate auditive crackerjack cosmolined percolates groupoids nolitions developable bicycled demaine substantiality phonograms gappier carta belligerency cars dictations synfuel tyrocidin. Baldaquin restier bullshots fragmentated deliciousness dream achaenocarp rhoticities squattles nonelite mountains glift inconsequential screamers overtrading sicklemia prenoon cyanize regreen myrioscopes discorded ephemeridian violaters interpretation goalies tyrannosauruses. Teniacides queest nickering trawled plumps proper tatty dauntlessly sweetness schistosomal measuring weldless phrenitis monoplegias anthropocentric neurohumoral anaconda intelligibleness paragraphist traumatisation steeling uitlander duplicately vanes. Ethylene samaan opgefok graviton vanning nonleaded tamers bider.\n", - "dateCreated": "2019-05-25T13:57:47.495Z", - "datePublished": "2019-05-25T13:57:47.495Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Linnéa.Górski@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Linnéa.Górski@examples.edu", - "@type": "Person", - "identifier": "Linnéa.Górski@examples.edu", - "name": "Linnéa Górski", - "email": "Linnéa.Górski@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T13:57:47.495Z", - "object": { - "@id": "5aed364c-3459-485c-99fa-2526719227a6" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T13:57:47.495Z", - "object": { - "@id": "5aed364c-3459-485c-99fa-2526719227a6" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/datacrates/8019258e-e826-4387-bac0-7730bc333514/CATALOG.json b/test-data/datacrates/8019258e-e826-4387-bac0-7730bc333514/CATALOG.json deleted file mode 100644 index da46f72d11abe5cf3f5a00e5a6a7aa01bfb98c3e..0000000000000000000000000000000000000000 --- a/test-data/datacrates/8019258e-e826-4387-bac0-7730bc333514/CATALOG.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "8019258e-e826-4387-bac0-7730bc333514", - "@type": "Dataset", - "path": "./", - "name": "Unsewn Kark Slopewise Sphagnums Mammonist Uncarved Gallets Reactivates Semiconscious Webmaster Disacknowledges Counterworked Stickleaders Lumpishly Impact Pragmatised Hulkiest Indeterminists Dilatoriness Fledging Spenders Subtangent Enwraps", - "description": "Notaphilisms radius snatcher. Missionary poleis knightly repel organismically expeller gerfalcons deflowerers nazifying chymist lighter ensepulchres. Auriculars triacids gibbousness ritzy obstreperousnesses metricating backwashing footballers wrasse pearlings fares stilettos cerasin charge labellists isolabilities underwrites disceptator tollmen indisputably backslidden gustative axerophthol arenes. Strickenly virgates unturns pappous excerptor chloralisms torticollar. Romneyas inharmonicities cybercafes stymy typesets acronymous madwomen candiru kinara vanquishers unpoped ziptop mutuca hogmanays telecontrol gospels.\n", - "dateCreated": "2019-05-25T14:07:16.662Z", - "datePublished": "2019-05-25T14:07:16.662Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Mandy.Pilz@examples.edu" - }, - { - "@id": "Jesnie.Diaconescu@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Mandy.Pilz@examples.edu", - "@type": "Person", - "identifier": "Mandy.Pilz@examples.edu", - "name": "Mandy Pilz", - "email": "Mandy.Pilz@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "Jesnie.Diaconescu@examples.edu", - "@type": "Person", - "identifier": "Jesnie.Diaconescu@examples.edu", - "name": "Jesnie Diaconescu", - "email": "Jesnie.Diaconescu@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T14:07:16.662Z", - "object": { - "@id": "8019258e-e826-4387-bac0-7730bc333514" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T14:07:16.662Z", - "object": { - "@id": "8019258e-e826-4387-bac0-7730bc333514" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/datacrates/82d1b263-2beb-443a-85b5-8b9018137991/CATALOG.json b/test-data/datacrates/82d1b263-2beb-443a-85b5-8b9018137991/CATALOG.json deleted file mode 100644 index 940b234ff5ebd588dcd613767230c1db36cce060..0000000000000000000000000000000000000000 --- a/test-data/datacrates/82d1b263-2beb-443a-85b5-8b9018137991/CATALOG.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "82d1b263-2beb-443a-85b5-8b9018137991", - "@type": "Dataset", - "path": "./", - "name": "Hattock Otocyst Youngsters Inseminated Ricercares Potiche Paperinesses", - "description": "Fogyish quadruped feller outsped tines eloquent symitares carbolises dorsel gouvernantes vegetating technofear compositionally lymphogram occultnesses transcendently equipaging respirometric dodecastyle abamperes vocals bemoan rapier comediettas fogydoms nitpicker. Sneakishness postiled actresses tenterhook monosemy ricercata andesytes peregals electiveness receded transversally cocksuckers heliophytes. Ingrainers despond pouking entanglers spermatophytes droningly bepitied transpose instructed remotenesses estridge hamstrings redefy artsinesses memoirs.\n", - "dateCreated": "2019-05-25T14:05:34.790Z", - "datePublished": "2019-05-25T14:05:34.790Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Gil.Pipa@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Gil.Pipa@examples.edu", - "@type": "Person", - "identifier": "Gil.Pipa@examples.edu", - "name": "Gil Pipa", - "email": "Gil.Pipa@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T14:05:34.790Z", - "object": { - "@id": "82d1b263-2beb-443a-85b5-8b9018137991" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T14:05:34.790Z", - "object": { - "@id": "82d1b263-2beb-443a-85b5-8b9018137991" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/datacrates/cefdbe3d-f3f7-49bd-97a5-6575549c2d1c/CATALOG.json b/test-data/datacrates/cefdbe3d-f3f7-49bd-97a5-6575549c2d1c/CATALOG.json deleted file mode 100644 index ede7e2102c1df0bdefe30e329f9bab6560a68684..0000000000000000000000000000000000000000 --- a/test-data/datacrates/cefdbe3d-f3f7-49bd-97a5-6575549c2d1c/CATALOG.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "cefdbe3d-f3f7-49bd-97a5-6575549c2d1c", - "@type": "Dataset", - "path": "./", - "name": "Perioding Friska Renograms Stromatolite Vertebrates Reintegrates Involutedly Parablastic Betweenbrain Basics Funnymen Contenders Cartages Susceptivity Degringolading Palamate Vendible Florigen Methylphenol Sitreps Underkeeping Syndicator Virtuoso", - "description": "Knottier strander endzone quoins accusers oniscoid serviettes faugh handcarts gingelli logicality sterner agama supersystems versionist trinketed capitulate claes seizes phonetization prostatites unnaturalising gnomonology paciest nominee snowslip unconstructive epitomizer. Semigroup atabrin microtechnique fisherwoman wholesale museologies displed. Structuralization ringbarks specifying polychotomy appositely casuistical temporalise kebbie unshriven homeschool leben initiatress fratchety mydriatics bandy scandalisations vacatur braciolas discophoran quarrymasters coggies dimerization butyraceous. Secondees freedwomen haptotropic furcate baresark stolen quartile rejoneadora neurosensory bogyism gallanting caudally teaser esemplasy misclassifying toplessness mamakos geotaxes acai orthographers undivorced imagination. Infallibilism genoas meliphagous partisan yukiest avenaceous raunchiest groundbaiting feedhole codesign. Wavey mauvine rescores blaer indignifying avoidant slopy exactress. Clarinet relatives millepedes ramrods leukoblast bushelers consignor havering nonassociated rhizophore leaf diabolized. Snickering telearchics finery heaping pyromantic illumining unprayed gypper porphyrias. Mournfully harmfulnesses trivialist deader carjackings busticate phallicists windock blockboards shrieved interlooping mashman awfuller hardbeam giber.\n", - "dateCreated": "2019-05-25T14:03:33.541Z", - "datePublished": "2019-05-25T14:03:33.541Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Aiva.Klapp@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Aiva.Klapp@examples.edu", - "@type": "Person", - "identifier": "Aiva.Klapp@examples.edu", - "name": "Aiva Klapp", - "email": "Aiva.Klapp@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T14:03:33.541Z", - "object": { - "@id": "cefdbe3d-f3f7-49bd-97a5-6575549c2d1c" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T14:03:33.541Z", - "object": { - "@id": "cefdbe3d-f3f7-49bd-97a5-6575549c2d1c" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/datacrates/dc1b4d81-4c48-439a-a329-39cb10a28e0f/CATALOG.json b/test-data/datacrates/dc1b4d81-4c48-439a-a329-39cb10a28e0f/CATALOG.json deleted file mode 100644 index 82170a54cb4d5e5acd8c308a7021dab0ce48844b..0000000000000000000000000000000000000000 --- a/test-data/datacrates/dc1b4d81-4c48-439a-a329-39cb10a28e0f/CATALOG.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "dc1b4d81-4c48-439a-a329-39cb10a28e0f", - "@type": "Dataset", - "path": "./", - "name": "Zoogamete Gambrels Quinquevalences Adducting Gingerbreaded Moraliser Diureticalness Expuncted Glucophore Butchnesses Pyrogallol Languidnesses Perais Perpetuality Entranceways Enticingness Amphiblastic Crowners Terrorise Posttraumatic Sternutatories Meritocrat Rachillae Canikin Despatcher Outlaunched", - "description": "Jarks priggeries coney seepiest disfigurer valence snakepits cueist tillicum jivy nonviolently uninstalling. Contradances semideserts immunomodulator solutions powder paraphasia monolatrist oreweeds clintonias ampelography tippytoeing cohyponym reversions worser. Escheators crossable renascence atomize paraphonias mirror forpines committable afros calxes poljes hosteller cicalas difs possibilist pauses homeland strammels brattishings xanthisms retinalite bescours demonstrative sophistication disinterestednesses repealer. Electabilities arrogance bringdown mannequin negrophobes hors tarps bytes hysterectomise ectropiums. Effect erotologies climatizing immunising allopolyploidy communions trinketed sty cleughs loath.\n", - "dateCreated": "2019-05-25T14:07:23.783Z", - "datePublished": "2019-05-25T14:07:23.783Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Irmela.Alladi@examples.edu" - }, - { - "@id": "Augustine.Hoag@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Irmela.Alladi@examples.edu", - "@type": "Person", - "identifier": "Irmela.Alladi@examples.edu", - "name": "Irmela Alladi", - "email": "Irmela.Alladi@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "Augustine.Hoag@examples.edu", - "@type": "Person", - "identifier": "Augustine.Hoag@examples.edu", - "name": "Augustine Hoag", - "email": "Augustine.Hoag@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T14:07:23.783Z", - "object": { - "@id": "dc1b4d81-4c48-439a-a329-39cb10a28e0f" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T14:07:23.783Z", - "object": { - "@id": "dc1b4d81-4c48-439a-a329-39cb10a28e0f" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/datacrates/f3e568cf-42a9-42b6-8217-e697457dab8c/CATALOG.json b/test-data/datacrates/f3e568cf-42a9-42b6-8217-e697457dab8c/CATALOG.json deleted file mode 100644 index 2ffb6e114b05fa8e9aeb3b5b02ec232ea491b0ba..0000000000000000000000000000000000000000 --- a/test-data/datacrates/f3e568cf-42a9-42b6-8217-e697457dab8c/CATALOG.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "@context": { - "path": "https://schema.org/contentUrl", - "name": "https://schema.org/name", - "description": "https://schema.org/description", - "dateCreated": "https://schema.org/dateCreated", - "datePublished": "https://schema.org/datePublished", - "publisher": "https://schema.org/publisher", - "hasPart": "https://schema.org/hasPart", - "creator": "https://schema.org/creator", - "keywords": "https://schema.org/keywords", - "about": "https://schema.org/about", - "funder": "https://schema.org/funder", - "citation": "https://schema.org/citation", - "identifier": "https://schema.org/identifier", - "familyName": "https://schema.org/familyName", - "givenName": "https://schema.org/givenName", - "email": "https://schema.org/email", - "affiliation": "https://schema.org/affiliation", - "endTime": "https://schema.org/endTime", - "object": "https://schema.org/object", - "agent": "https://schema.org/agent", - "Dataset": "https://schema.org/Dataset", - "Organization": "https://schema.org/Organization", - "Person": "https://schema.org/Person", - "CreateAction": "https://schema.org/CreateAction", - "UpdateAction": "https://schema.org/UpdateAction" - }, - "@graph": [ - { - "@id": "f3e568cf-42a9-42b6-8217-e697457dab8c", - "@type": "Dataset", - "path": "./", - "name": "Mache Verbing Microhabitat Meane Loveliness Evirating Lyophiled", - "description": "Scombroid monophylies brises unpropped radioimmunoassayable depopulation commutability introversively epulises endocranial pushes unfilterable housecrafts weblike glossarial. Outswept deservedly garbologists. Form revelling queyns appetizing riancies transshipping wooses fatuously graphicalness sempstresses hymenopteron principalships deionisation silvan postops. Ascribes undear bumped curative viperishly stereospecificities megalomaniacal thiosulphuric aunters. Hemisphere tubular summarinesses divots amethyst swinish. Impave rhabdomyoma insciences ichthyses acclamation psychiaters pantingly solidarists sonsiest bivinyl smuggery encampment becowarded. Outswear alternate riddlings huffer tuatuas screenlike overexpectation nontypical gaskets patrialization kephalins intervillage kotare prison peritonitis hippopotami clinopyroxenes. Concreted pickback overembellishing monsignor stagnantly chequerwise tattiness fable soiliest spathes bonhommie expugn. Coyly refutals tragical suppliants engirdle engloom migrates concretised fragment obfuscated schoolgoings mingimingi carcase zingers empoison moddings techniques haughtier inswathes fluorination create imposingly adjutants tiddlier engraining.\n", - "dateCreated": "2019-05-25T13:56:55.034Z", - "datePublished": "2019-05-25T13:56:55.034Z", - "publisher": { - "@id": "https://examples.edu" - }, - "hasPart": [], - "creator": [ - { - "@id": "Israel.Aratani@examples.edu" - }, - { - "@id": "Emory.Österberg@examples.edu" - } - ], - "keywords": "", - "about": [], - "funder": [], - "citation": [] - }, - { - "@id": "https://examples.edu", - "@type": "Organization", - "identifier": "https://examples.edu", - "name": "Examples University" - }, - { - "@id": "Israel.Aratani@examples.edu", - "@type": "Person", - "identifier": "Israel.Aratani@examples.edu", - "name": "Israel Aratani", - "email": "Israel.Aratani@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "Emory.Österberg@examples.edu", - "@type": "Person", - "identifier": "Emory.Österberg@examples.edu", - "name": "Emory Österberg", - "email": "Emory.Österberg@examples.edu", - "affiliation": { - "@id": "https://examples.edu" - } - }, - { - "@id": "owner@examples.edu", - "@type": "Person", - "email": "owner@examples.edu" - }, - { - "@id": "approver@examples.edu", - "@type": "Person", - "email": "approver@examples.edu" - }, - { - "@id": "history1", - "@type": "CreateAction", - "name": "Create", - "description": "Data record created", - "endTime": "2019-05-25T13:56:55.034Z", - "object": { - "@id": "f3e568cf-42a9-42b6-8217-e697457dab8c" - }, - "agent": { - "@id": "owner@examples.edu" - } - }, - { - "@id": "history2", - "@type": "UpdateAction", - "name": "Publish", - "endTime": "2019-05-25T13:56:55.034Z", - "object": { - "@id": "f3e568cf-42a9-42b6-8217-e697457dab8c" - }, - "agent": { - "@id": "approver@examples.edu" - } - } - ] -} \ No newline at end of file diff --git a/test-data/fields.json b/test-data/fields.json index 5a38bf0481b584428205eaf3ba4c15f31e0c21cf..189e9e62a76e34c68d143b97312651e175f73b98 100644 --- a/test-data/fields.json +++ b/test-data/fields.json @@ -1,23 +1,14 @@ { - "dataset": { + "Dataset": { "core": "dataset", "format": "jsonld", "recordTypeName": "dataset", - "rootNodeFieldContextId": "path", "skip": ["hasPart"], - "rootNodeFieldValues": ["data/", "./"], "flatten": { - "rootNode": [ - "scripts/jsonld-parse/add-root-dataset.groovy", - "scripts/jsonld-parse/add-oaipmh.groovy" - ], - "Person": [ - "scripts/jsonld-parse/add-person.groovy" - ], - "GeoCoordinates": [ - "scripts/jsonld-parse/add-flattened-child.groovy", - "scripts/jsonld-parse/geojson.groovy" - ] + "creator": { + "obj": "array" + }, + "GeoCoordinates": {} }, "facets": { "datePublished": { @@ -38,7 +29,8 @@ }, "publisher": { "trim": true, - "fieldName": "@id" + "fieldName": "@id", + "field_suffix": "_Dataset_facet" }, "type": { "trim": true, @@ -52,12 +44,15 @@ "set": "datasource:ReDBox" } }, - "person": { + "Person": { "core": "dataset", "format": "jsonld", "recordTypeName": "person", - "rootNodeFieldValues": [], - "flatten": {}, + "flatten": { + "affiliation": { + "obj": "array" + } + }, "facets": { "type": { "trim": true, diff --git a/test/catalog.spec.js b/test/catalog.spec.js index ce038398463f0719a4a21276cce6ec40e4c5ab09..0c93ef0184080e88dfb86024055e919feb9a16b2 100644 --- a/test/catalog.spec.js +++ b/test/catalog.spec.js @@ -50,7 +50,7 @@ describe('catalog', function () { }); }); - describe('graph', function () { + describe('graph - dataset', function () { it('should load the graph into a dataset', function () { const caPath = path.join(process.cwd() + '/test-data', 'CATALOG.json'); @@ -67,14 +67,72 @@ describe('catalog', function () { return _.find(g['@type'], (gg) => gg === 'Dataset') ? g : undefined; }); - const dataset = catalog.getGraphElement(fieldConfig['dataset'], graph, graphElement); + const dataset = catalog.getGraphElement(fieldConfig['Dataset'], graph, graphElement); - assert.strictEqual(dataset.record_type_s, 'dataset', 'Dataset not loaded'); + assert.strictEqual(dataset.record_type_s, 'Dataset', 'Dataset not loaded'); }); }); -}) -; + describe('graph - person', function () { + it('should load the graph into a Person', function () { + + const caPath = path.join(process.cwd() + '/test-data', 'CATALOG.json'); + const ca = require(caPath); + + const fieldConfig = catalog.config; + + //TODO: Peter's idea is to convert everything into an array then it is safer to work to convert + const graph = _.each(ca['@graph'], (g) => { + return catalog.ensureObjArray(g); + }); + + let graphElement = _.find(graph, (g) => { + return _.find(g['@type'], (gg) => gg === 'Person') ? g : undefined; + }); + + const person = catalog.getGraphElement(fieldConfig['Person'], graph, graphElement); + + assert.strictEqual(person.record_type_s, 'Person', 'Person not loaded'); + }); + }); + + describe('graph - catalog solr', function () { + it('should load the graph into a catalog solr array', function () { + + const caPath = path.join(process.cwd() + '/test-data', 'CATALOG.json'); + const ca = require(caPath); + + const fieldConfig = catalog.config; + + //TODO: Peter's idea is to convert everything into an array then it is safer to work to convert + const graph = _.each(ca['@graph'], (g) => { + return catalog.ensureObjArray(g); + }); + + const catalogSolr = {}; + _.each(fieldConfig, (field, name) => { + let graphElement = _.filter(graph, (g) => { + return _.find(g['@type'], (gg) => gg === name) ? g : undefined; + }); + if (graphElement) { + _.each(graphElement, (ge) => { + if (Array.isArray(catalogSolr[name])) { + catalogSolr[name].push(catalog.getGraphElement(fieldConfig[name], graph, ge)); + } else { + catalogSolr[name] = [catalog.getGraphElement(fieldConfig[name], graph, ge)]; + } + }); + } + }); + + assert.strictEqual(catalogSolr.Dataset[0].record_type_s, 'Dataset', 'dataset not loaded'); + assert.strictEqual(catalogSolr.Person[0].record_type_s, 'Person', 'person 1 not loaded'); + assert.strictEqual(catalogSolr.Person[3].record_type_s, 'Person', 'person 1 not loaded'); + + }); + }); + +}); after(() => { fs.remove(datacrateDirPath);