Adds mock up files for external sources.

This commit is contained in:
gkolokythas 2019-09-13 16:45:02 +03:00
parent c7457810f7
commit 7e78cfdff0
15 changed files with 709 additions and 217 deletions

View File

@ -47,13 +47,13 @@ public class TagController extends BaseController {
public @ResponseBody
ResponseEntity<ResponseItem<TagExternalSourcesModel>> listExternalTagModel(
@RequestParam(value = "query", required = false) String query, @RequestParam(value = "type", required = false) String type) throws HugeResultSet, NoURLFound, IOException {
/* List<Map<String, String>> remoteRepos = this.getApiContext().getOperationsContext().getRemoteFetcher().getTags(query, type);
TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(remoteRepos);*/
List<Map<String, String>> remoteRepos = this.getApiContext().getOperationsContext().getRemoteFetcher().getTags(query, type);
TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(remoteRepos);
ObjectMapper mapper = new ObjectMapper();
String fileUrl = this.environment.getProperty("configuration.resources.path") + this.environment.getProperty("dataset.tags.mock");
List<Map<String, String>> data = mapper.readValue(new File(fileUrl), new TypeReference<List<Map<String, String>>>(){});
TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(data);
// ObjectMapper mapper = new ObjectMapper();
// String fileUrl = this.environment.getProperty("configuration.resources.path") + this.environment.getProperty("dataset.tags.mock");
// List<Map<String, String>> data = mapper.readValue(new File(fileUrl), new TypeReference<List<Map<String, String>>>(){});
// TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(data);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<TagExternalSourcesModel>().payload(researchersExternalSourcesModel).status(ApiMessageCode.NO_MESSAGE));
}

View File

@ -12,6 +12,7 @@ public class RegistriesExternalSourcesModel extends ExternalListingItem<Registri
model.setId(item.get("pid"));
model.setUri(item.get("uri"));
model.setName(item.get("name"));
model.setTag(item.get("tag"));
this.add(model);
}
return this;

View File

@ -15,6 +15,7 @@ public class TagExternalSourcesModel extends ExternalListingItem<TagExternalSour
model.setId(item.get("pid"));
model.setUri(item.get("label"));
model.setName(item.get("name"));
model.setTag(item.get("tag"));
this.add(model);
}
return this;

View File

@ -0,0 +1,32 @@
[
{
"pid": "datasetssmockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Datasets test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "datasetssmockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Datasets test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "datasetssmockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Datasets test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -6,29 +6,46 @@
<registries>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/metadataschemarepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/metadataschemarepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/metadataschemarepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/metadataschemarepo/</url>
<type>Internal</type>
<url>RegistriesInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -48,29 +65,46 @@
<tags>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/tags/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/tags/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/tags/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/tags/</url>
<type>Internal</type>
<url>TagsInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -91,28 +125,45 @@
<grants>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <url>https://eestore.paas2.uninett.no/api/projectrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/projectrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url>
<url>GrantInternalMockUpData.json</url>
<type>Internal</type>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -134,29 +185,46 @@
<projects>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/projectrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/projectrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url>
<type>Internal</type>
<url>ProjectInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -178,29 +246,46 @@
<funders>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/projectrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/projectrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url>
<type>Internal</type>
<url>FunderInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -222,29 +307,46 @@
<repositories>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/datarepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/datarepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/datarepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/datarepo/</url>
<type>Internal</type>
<url>RepositoriesInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -265,29 +367,46 @@
<services>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/servicerepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/servicerepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/servicerepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/servicerepo/</url>
<type>Internal</type>
<url>ServicesInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -307,29 +426,46 @@
<researchers>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/personrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/personrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/personrepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/personrepo/</url>
<type>Internal</type>
<url>ResearcherInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -349,29 +485,46 @@
<organisations>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/organizationrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/organizationrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/organizationrepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/organizationrepo/</url>
<type>Internal</type>
<url>OrganisationInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
@ -391,29 +544,46 @@
<datasets>
<urls>
<!-- <urlConfig>-->
<!-- <key>cristin</key>-->
<!-- <label>Cristin</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/datasetrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<!-- <urlConfig>-->
<!-- <key>openAire</key>-->
<!-- <label>OpenAIRE</label>-->
<!-- <ordinal>1</ordinal>-->
<!-- <type>External</type>-->
<!-- <url>https://eestore.paas2.uninett.no/api/datasetrepo/</url>-->
<!-- <data>-->
<!-- <path>$['data'][*]['attributes']</path>-->
<!-- <fields>-->
<!-- <id>'pid'</id>-->
<!-- <name>'name'</name>-->
<!-- <uri>'uri'</uri>-->
<!-- <description>'description'</description>-->
<!-- </fields>-->
<!-- </data>-->
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
<!-- </urlConfig>-->
<urlConfig>
<key>cristin</key>
<label>Cristin</label>
<key>internal</key>
<label>Internal</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/datasetrepo/</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>
<id>'pid'</id>
<name>'name'</name>
<uri>'uri'</uri>
<description>'description'</description>
</fields>
</data>
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
</urlConfig>
<urlConfig>
<key>openAire</key>
<label>OpenAIRE</label>
<ordinal>1</ordinal>
<type>External</type>
<url>https://eestore.paas2.uninett.no/api/datasetrepo/</url>
<type>Internal</type>
<url>DatasetsInternalMockUpData.json</url>
<data>
<path>$['data'][*]['attributes']</path>
<fields>

View File

@ -0,0 +1,32 @@
[
{
"pid": "fundermockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Funder test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "fundermockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Funder test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "fundermockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Funder test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -0,0 +1,32 @@
[
{
"pid": "grantmockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Grant test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "grantmockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Grant test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "grantmockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Grant test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -0,0 +1,32 @@
[
{
"pid": "organisationmockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Organisation test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "organisationmockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Organisation test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "organisationmockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Organisation test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -0,0 +1,32 @@
[
{
"pid": "projectmockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Project test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "projectmockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Project test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "projectmockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Project test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -0,0 +1,32 @@
[
{
"pid": "registriesmockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Registries test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "registriesmockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Registries test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "registriesmockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Registries test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -0,0 +1,32 @@
[
{
"pid": "repositoriesmockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Repositories test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "repositoriesmockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Repositories test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "repositoriesmockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Repositories test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -0,0 +1,32 @@
[
{
"pid": "researchermockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Researcher test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "researchermockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Researcher test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "researchermockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Researcher test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -0,0 +1,32 @@
[
{
"pid": "servicesmockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Services test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "servicesmockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Services test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "servicesmockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Services test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -0,0 +1,32 @@
[
{
"pid": "tagsmockup:internal/001",
"remote_id": "",
"remote_pid": "",
"name": "Tags test 1",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "tagsmockup:internal/002",
"remote_id": "",
"remote_pid": "",
"name": "Tags test 2",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
},
{
"pid": "tagsmockup:internal/003",
"remote_id": "",
"remote_pid": "",
"name": "Tags test 3",
"uri": "",
"last_fetched": "",
"description": "",
"tag": "internal"
}
]

View File

@ -101,7 +101,7 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
initialItems: (type) => this.searchDatasetTags('', type),
displayFn: (item) => item ? item.name : null,
titleFn: (item) => item ? item.name: null,
subtitleFn: (item) => item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.name : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')
subtitleFn: (item) => item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')
};
}
@ -232,6 +232,6 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
requestItem.criteria = new TagCriteria();
requestItem.criteria.like = query;
requestItem.criteria.type = type;
return this.externalSourcesService.searchDatasetService(requestItem);
return this.externalSourcesService.searchDatasetTags(requestItem);
}
}