#8912: adding new metadata/registries api in the configs
This commit is contained in:
parent
ee90ac37b6
commit
3fc307c831
|
@ -6,22 +6,40 @@
|
||||||
|
|
||||||
<registries>
|
<registries>
|
||||||
<urls>
|
<urls>
|
||||||
|
<!-- <urlConfig>-->
|
||||||
|
<!-- <key>cristin</key>-->
|
||||||
|
<!-- <label>Cristin</label>-->
|
||||||
|
<!-- <ordinal>1</ordinal>-->
|
||||||
|
<!-- <type>External</type>-->
|
||||||
|
<!-- <url>https://eestore.paas2.uninett.no/api/metadataschema/?search={like}&page={page}&size={pageSize}</url>-->
|
||||||
|
<!-- <firstPage>1</firstPage>-->
|
||||||
|
<!-- <contenttype>application/vnd.api+json; charset=utf-8</contenttype>-->
|
||||||
|
<!-- <data>-->
|
||||||
|
<!-- <path>$['data'][*]['attributes']</path>-->
|
||||||
|
<!-- <fields>-->
|
||||||
|
<!-- <id>'pid'</id>-->
|
||||||
|
<!-- <name>'name'</name>-->
|
||||||
|
<!-- <uri>'uri'</uri>-->
|
||||||
|
<!-- <description>'description'</description>-->
|
||||||
|
<!-- <source>'source'</source>-->
|
||||||
|
<!-- </fields>-->
|
||||||
|
<!-- </data>-->
|
||||||
|
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
|
||||||
|
<!-- </urlConfig>-->
|
||||||
<urlConfig>
|
<urlConfig>
|
||||||
<key>cristin</key>
|
<key>rda-metadata-schemes</key>
|
||||||
<label>Cristin</label>
|
<label>RDA Metadata Schemes</label>
|
||||||
<ordinal>1</ordinal>
|
<ordinal>1</ordinal>
|
||||||
<type>External</type>
|
<type>External</type>
|
||||||
<url>https://eestore.paas2.uninett.no/api/metadataschema/?search={like}&page={page}&size={pageSize}</url>
|
<url>https://rdamsc.bath.ac.uk/api2/m?q={like}&start=1&pageSize=111</url>
|
||||||
<firstPage>1</firstPage>
|
<contenttype>application/json; charset=utf-8</contenttype>
|
||||||
<contenttype>application/vnd.api+json; charset=utf-8</contenttype>
|
|
||||||
<data>
|
<data>
|
||||||
<path>$['data'][*]['attributes']</path>
|
<path>$['data']['items'][*]</path>
|
||||||
<fields>
|
<fields>
|
||||||
<id>'pid'</id>
|
<id>'mscid'</id>
|
||||||
<name>'name'</name>
|
<name>'title'</name>
|
||||||
<uri>'uri'</uri>
|
<uri>'uri'</uri>
|
||||||
<description>'description'</description>
|
<description>'description'</description>
|
||||||
<source>'source'</source>
|
|
||||||
</fields>
|
</fields>
|
||||||
</data>
|
</data>
|
||||||
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
||||||
|
|
|
@ -6,22 +6,40 @@
|
||||||
|
|
||||||
<registries>
|
<registries>
|
||||||
<urls>
|
<urls>
|
||||||
|
<!-- <urlConfig>-->
|
||||||
|
<!-- <key>cristin</key>-->
|
||||||
|
<!-- <label>Cristin</label>-->
|
||||||
|
<!-- <ordinal>1</ordinal>-->
|
||||||
|
<!-- <type>External</type>-->
|
||||||
|
<!-- <url>https://eestore.paas2.uninett.no/api/metadataschema/?search={like}&page={page}&size={pageSize}</url>-->
|
||||||
|
<!-- <firstPage>1</firstPage>-->
|
||||||
|
<!-- <contenttype>application/vnd.api+json; charset=utf-8</contenttype>-->
|
||||||
|
<!-- <data>-->
|
||||||
|
<!-- <path>$['data'][*]['attributes']</path>-->
|
||||||
|
<!-- <fields>-->
|
||||||
|
<!-- <id>'pid'</id>-->
|
||||||
|
<!-- <name>'name'</name>-->
|
||||||
|
<!-- <uri>'uri'</uri>-->
|
||||||
|
<!-- <description>'description'</description>-->
|
||||||
|
<!-- <source>'source'</source>-->
|
||||||
|
<!-- </fields>-->
|
||||||
|
<!-- </data>-->
|
||||||
|
<!-- <paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>-->
|
||||||
|
<!-- </urlConfig>-->
|
||||||
<urlConfig>
|
<urlConfig>
|
||||||
<key>cristin</key>
|
<key>rda-metadata-schemes</key>
|
||||||
<label>Cristin</label>
|
<label>RDA Metadata Schemes</label>
|
||||||
<ordinal>1</ordinal>
|
<ordinal>1</ordinal>
|
||||||
<type>External</type>
|
<type>External</type>
|
||||||
<url>https://eestore.paas2.uninett.no/api/metadataschema/?search={like}&page={page}&size={pageSize}</url>
|
<url>https://rdamsc.bath.ac.uk/api2/m?q={like}&start=1&pageSize=111</url>
|
||||||
<firstPage>1</firstPage>
|
<contenttype>application/json; charset=utf-8</contenttype>
|
||||||
<contenttype>application/vnd.api+json; charset=utf-8</contenttype>
|
|
||||||
<data>
|
<data>
|
||||||
<path>$['data'][*]['attributes']</path>
|
<path>$['data']['items'][*]</path>
|
||||||
<fields>
|
<fields>
|
||||||
<id>'pid'</id>
|
<id>'mscid'</id>
|
||||||
<name>'name'</name>
|
<name>'title'</name>
|
||||||
<uri>'uri'</uri>
|
<uri>'uri'</uri>
|
||||||
<description>'description'</description>
|
<description>'description'</description>
|
||||||
<source>'source'</source>
|
|
||||||
</fields>
|
</fields>
|
||||||
</data>
|
</data>
|
||||||
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
||||||
|
|
|
@ -60,7 +60,7 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
|
||||||
initialItems: (type) => this.searchDatasetExternalRegistries('', type),
|
initialItems: (type) => this.searchDatasetExternalRegistries('', 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.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')
|
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')
|
||||||
};
|
};
|
||||||
|
|
||||||
dataRepositoriesAutoCompleteConfiguration: SingleAutoCompleteConfiguration = {
|
dataRepositoriesAutoCompleteConfiguration: SingleAutoCompleteConfiguration = {
|
||||||
|
|
|
@ -271,7 +271,7 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
||||||
initialItems: () => this.searchDatasetExternalRegistries(''),
|
initialItems: () => this.searchDatasetExternalRegistries(''),
|
||||||
displayFn: (item) => { try { return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name } catch { return '' } },
|
displayFn: (item) => { try { return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name } catch { return '' } },
|
||||||
titleFn: (item) => { try { return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name } catch { return '' } },
|
titleFn: (item) => { try { return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name } catch { return '' } },
|
||||||
subtitleFn: (item) => { try { return item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE') } catch { return '' } },
|
subtitleFn: (item) => { try { return item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE') } catch { return '' } },
|
||||||
valueAssign: (item) => { try { return typeof (item) == 'string' ? item : JSON.stringify(item) } catch { return '' } }
|
valueAssign: (item) => { try { return typeof (item) == 'string' ? item : JSON.stringify(item) } catch { return '' } }
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue