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 public @ResponseBody
ResponseEntity<ResponseItem<TagExternalSourcesModel>> listExternalTagModel( ResponseEntity<ResponseItem<TagExternalSourcesModel>> listExternalTagModel(
@RequestParam(value = "query", required = false) String query, @RequestParam(value = "type", required = false) String type) throws HugeResultSet, NoURLFound, IOException { @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); List<Map<String, String>> remoteRepos = this.getApiContext().getOperationsContext().getRemoteFetcher().getTags(query, type);
TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(remoteRepos);*/ TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(remoteRepos);
ObjectMapper mapper = new ObjectMapper(); // ObjectMapper mapper = new ObjectMapper();
String fileUrl = this.environment.getProperty("configuration.resources.path") + this.environment.getProperty("dataset.tags.mock"); // 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>>>(){}); // List<Map<String, String>> data = mapper.readValue(new File(fileUrl), new TypeReference<List<Map<String, String>>>(){});
TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(data); // TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(data);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<TagExternalSourcesModel>().payload(researchersExternalSourcesModel).status(ApiMessageCode.NO_MESSAGE)); 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.setId(item.get("pid"));
model.setUri(item.get("uri")); model.setUri(item.get("uri"));
model.setName(item.get("name")); model.setName(item.get("name"));
model.setTag(item.get("tag"));
this.add(model); this.add(model);
} }
return this; return this;

View File

@ -15,6 +15,7 @@ public class TagExternalSourcesModel extends ExternalListingItem<TagExternalSour
model.setId(item.get("pid")); model.setId(item.get("pid"));
model.setUri(item.get("label")); model.setUri(item.get("label"));
model.setName(item.get("name")); model.setName(item.get("name"));
model.setTag(item.get("tag"));
this.add(model); this.add(model);
} }
return this; 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> <registries>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/metadataschemarepo/</url> <url>RegistriesInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -48,29 +65,46 @@
<tags> <tags>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/tags/</url> <url>TagsInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -91,28 +125,45 @@
<grants> <grants>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url> <url>GrantInternalMockUpData.json</url>
<data> <type>Internal</type>
<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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -134,29 +185,46 @@
<projects> <projects>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url> <url>ProjectInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -178,29 +246,46 @@
<funders> <funders>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url> <url>FunderInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -222,29 +307,46 @@
<repositories> <repositories>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/datarepo/</url> <url>RepositoriesInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -265,29 +367,46 @@
<services> <services>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/servicerepo/</url> <url>ServicesInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -307,29 +426,46 @@
<researchers> <researchers>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/personrepo/</url> <url>ResearcherInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -349,29 +485,46 @@
<organisations> <organisations>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/organizationrepo/</url> <url>OrganisationInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <fields>
@ -391,29 +544,46 @@
<datasets> <datasets>
<urls> <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> <urlConfig>
<key>cristin</key> <key>internal</key>
<label>Cristin</label> <label>Internal</label>
<ordinal>1</ordinal> <ordinal>1</ordinal>
<type>External</type> <type>Internal</type>
<url>https://eestore.paas2.uninett.no/api/datasetrepo/</url> <url>DatasetsInternalMockUpData.json</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> <data>
<path>$['data'][*]['attributes']</path> <path>$['data'][*]['attributes']</path>
<fields> <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), initialItems: (type) => this.searchDatasetTags('', type),
displayFn: (item) => item ? item.name : null, displayFn: (item) => item ? item.name : null,
titleFn: (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 = new TagCriteria();
requestItem.criteria.like = query; requestItem.criteria.like = query;
requestItem.criteria.type = type; requestItem.criteria.type = type;
return this.externalSourcesService.searchDatasetService(requestItem); return this.externalSourcesService.searchDatasetTags(requestItem);
} }
} }