Merge branch 'ui-redesign' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot into ui-redesign
This commit is contained in:
commit
5365aa1842
|
@ -15,6 +15,8 @@ public class DataFieldsUrlConfiguration {
|
||||||
private String path;
|
private String path;
|
||||||
private String host;
|
private String host;
|
||||||
private String types;
|
private String types;
|
||||||
|
private String firstName;
|
||||||
|
private String lastName;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -94,4 +96,20 @@ public class DataFieldsUrlConfiguration {
|
||||||
public void setTypes(String types) {
|
public void setTypes(String types) {
|
||||||
this.types = types;
|
this.types = types;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@XmlElement(name = "firstName")
|
||||||
|
public String getFirstName() {
|
||||||
|
return firstName;
|
||||||
|
}
|
||||||
|
public void setFirstName(String firstName) {
|
||||||
|
this.firstName = firstName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlElement(name = "lastName")
|
||||||
|
public String getLastName() {
|
||||||
|
return lastName;
|
||||||
|
}
|
||||||
|
public void setLastName(String lastName) {
|
||||||
|
this.lastName = lastName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,6 +341,17 @@ public class RemoteFetcher {
|
||||||
|
|
||||||
results = new Results(finalRes,
|
results = new Results(finalRes,
|
||||||
new HashMap<>(1, 1));
|
new HashMap<>(1, 1));
|
||||||
|
} else if (jsonDataPath.getFieldsUrlConfiguration().getFirstName() != null) {
|
||||||
|
results = new Results(jsonContext.read(jsonDataPath.getPath()
|
||||||
|
+ "[" + jsonDataPath.getFieldsUrlConfiguration().getId() + "," + jsonDataPath.getFieldsUrlConfiguration().getFirstName()
|
||||||
|
+ "," + jsonDataPath.getFieldsUrlConfiguration().getLastName() + "]"),
|
||||||
|
new HashMap<>(1, 1));
|
||||||
|
results.getResults().stream().forEach(entry -> {
|
||||||
|
String name = entry.get(jsonDataPath.getFieldsUrlConfiguration().getFirstName().replace("'", "")) + " " + entry.get(jsonDataPath.getFieldsUrlConfiguration().getLastName().replace("'", ""));
|
||||||
|
entry.put("name", name);
|
||||||
|
entry.remove(jsonDataPath.getFieldsUrlConfiguration().getFirstName().replace("'", ""));
|
||||||
|
entry.remove(jsonDataPath.getFieldsUrlConfiguration().getLastName().replace("'", ""));
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
results = new Results(jsonContext.read(jsonDataPath.getPath()
|
results = new Results(jsonContext.read(jsonDataPath.getPath()
|
||||||
+ "[" + jsonDataPath.getFieldsUrlConfiguration().getName() + "," + jsonDataPath.getFieldsUrlConfiguration().getDescription()
|
+ "[" + jsonDataPath.getFieldsUrlConfiguration().getName() + "," + jsonDataPath.getFieldsUrlConfiguration().getDescription()
|
||||||
|
|
|
@ -697,44 +697,6 @@
|
||||||
</data>
|
</data>
|
||||||
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
||||||
</urlConfig>
|
</urlConfig>
|
||||||
<!--<urlConfig>
|
|
||||||
<key>orcid</key>
|
|
||||||
<label>ORCID</label>
|
|
||||||
<ordinal>2</ordinal>
|
|
||||||
<type>External</type>
|
|
||||||
<url>https://pub.sandbox.orcid.org/v3.0/search/?q={like}&start={page}&rows={pageSize}</url>
|
|
||||||
<firstPage>0</firstPage>
|
|
||||||
<contenttype>application/json; charset=utf-8</contenttype>
|
|
||||||
<data>
|
|
||||||
<path>$['result'][*]['orcid-identifier']</path>
|
|
||||||
<fields>
|
|
||||||
<id>'id'</id>
|
|
||||||
<name>'name'</name>
|
|
||||||
<uri>'uri'</uri>
|
|
||||||
<path>'path'</path>
|
|
||||||
<host>'host'</host>
|
|
||||||
</fields>
|
|
||||||
<urlConfig>
|
|
||||||
<key>orcid</key>
|
|
||||||
<label>ORCID</label>
|
|
||||||
<ordinal>3</ordinal>
|
|
||||||
<type>External</type>
|
|
||||||
<url>https://pub.{host}/v3.0/{path}/personal-details</url>
|
|
||||||
<firstPage>0</firstPage>
|
|
||||||
<data>
|
|
||||||
<parse-class>eu.eudat.models.data.external.orcid.PersonalDetails</parse-class>
|
|
||||||
<parse-field>name</parse-field>
|
|
||||||
<merge-fields>
|
|
||||||
<field>givenNames</field>
|
|
||||||
<field>familyName</field>
|
|
||||||
</merge-fields>
|
|
||||||
<merge-field-name>name</merge-field-name>
|
|
||||||
</data>
|
|
||||||
<paginationpath>$['num-found']</paginationpath>
|
|
||||||
</urlConfig>
|
|
||||||
</data>
|
|
||||||
<paginationpath>$['num-found']</paginationpath>
|
|
||||||
</urlConfig>-->
|
|
||||||
<urlConfig>
|
<urlConfig>
|
||||||
<key>orcid</key>
|
<key>orcid</key>
|
||||||
<label>ORCID</label>
|
<label>ORCID</label>
|
||||||
|
@ -742,15 +704,15 @@
|
||||||
<type>External</type>
|
<type>External</type>
|
||||||
<url>https://pub.sandbox.orcid.org/v3.0/expanded-search/?q={like}&start={page}&rows={pageSize}</url>
|
<url>https://pub.sandbox.orcid.org/v3.0/expanded-search/?q={like}&start={page}&rows={pageSize}</url>
|
||||||
<firstPage>0</firstPage>
|
<firstPage>0</firstPage>
|
||||||
<contenttype>application/vnd.orcid+xml; qs=5;charset=UTF-8</contenttype>
|
<contenttype>application/json; charset=UTF-8</contenttype>
|
||||||
<data>
|
<data>
|
||||||
<parse-class>eu.eudat.models.data.external.orcid.ExpandedSearch</parse-class>
|
<path>$['expanded-result'][*]</path>
|
||||||
<parse-field>expandedResults</parse-field>
|
<fields>
|
||||||
<merge-fields>
|
<id>'orcid-id'</id>
|
||||||
<field>givenNames</field>
|
<firstName>'given-names'</firstName>
|
||||||
<field>familyName</field>
|
<lastName>'family-names'</lastName>
|
||||||
</merge-fields>
|
<name>'name'</name>
|
||||||
<merge-field-name>name</merge-field-name>
|
</fields>
|
||||||
</data>
|
</data>
|
||||||
<paginationpath>$['num-found']</paginationpath>
|
<paginationpath>$['num-found']</paginationpath>
|
||||||
</urlConfig>
|
</urlConfig>
|
||||||
|
|
|
@ -223,6 +223,25 @@
|
||||||
</data>
|
</data>
|
||||||
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
||||||
</urlConfig>
|
</urlConfig>
|
||||||
|
<urlConfig>
|
||||||
|
<key>orcid</key>
|
||||||
|
<label>ORCID</label>
|
||||||
|
<ordinal>2</ordinal>
|
||||||
|
<type>External</type>
|
||||||
|
<url>https://pub.orcid.org/v3.0/expanded-search/?q={like}&start={page}&rows={pageSize}</url>
|
||||||
|
<firstPage>0</firstPage>
|
||||||
|
<contenttype>application/json; charset=UTF-8</contenttype>
|
||||||
|
<data>
|
||||||
|
<path>$['expanded-result'][*]</path>
|
||||||
|
<fields>
|
||||||
|
<id>'orcid-id'</id>
|
||||||
|
<firstName>'given-names'</firstName>
|
||||||
|
<lastName>'family-names'</lastName>
|
||||||
|
<name>'name'</name>
|
||||||
|
</fields>
|
||||||
|
</data>
|
||||||
|
<paginationpath>$['num-found']</paginationpath>
|
||||||
|
</urlConfig>
|
||||||
</urls>
|
</urls>
|
||||||
<fetchMode>FIRST</fetchMode> <!-- EITHER 'FIRST' OR 'ALL' -->
|
<fetchMode>FIRST</fetchMode> <!-- EITHER 'FIRST' OR 'ALL' -->
|
||||||
</researchers>
|
</researchers>
|
||||||
|
|
|
@ -235,6 +235,25 @@
|
||||||
</data>
|
</data>
|
||||||
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
||||||
</urlConfig>
|
</urlConfig>
|
||||||
|
<urlConfig>
|
||||||
|
<key>orcid</key>
|
||||||
|
<label>ORCID</label>
|
||||||
|
<ordinal>2</ordinal>
|
||||||
|
<type>External</type>
|
||||||
|
<url>https://pub.orcid.org/v3.0/expanded-search/?q={like}&start={page}&rows={pageSize}</url>
|
||||||
|
<firstPage>0</firstPage>
|
||||||
|
<contenttype>application/json; charset=UTF-8</contenttype>
|
||||||
|
<data>
|
||||||
|
<path>$['expanded-result'][*]</path>
|
||||||
|
<fields>
|
||||||
|
<id>'orcid-id'</id>
|
||||||
|
<firstName>'given-names'</firstName>
|
||||||
|
<lastName>'family-names'</lastName>
|
||||||
|
<name>'name'</name>
|
||||||
|
</fields>
|
||||||
|
</data>
|
||||||
|
<paginationpath>$['num-found']</paginationpath>
|
||||||
|
</urlConfig>
|
||||||
</urls>
|
</urls>
|
||||||
<fetchMode>FIRST</fetchMode> <!-- EITHER 'FIRST' OR 'ALL' -->
|
<fetchMode>FIRST</fetchMode> <!-- EITHER 'FIRST' OR 'ALL' -->
|
||||||
</researchers>
|
</researchers>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div>
|
<div>
|
||||||
<div *ngFor="let key of visibleKeys">
|
<div *ngFor="let key of visibleKeys">
|
||||||
<mat-form-field >
|
<mat-form-field>
|
||||||
<mat-label>{{key}} :</mat-label>
|
<mat-label>{{key}} :</mat-label>
|
||||||
<textarea matInput class="language-area" cdkTextareaAutosize #autosize="cdkTextareaAutosize" [formControl]="formGroup.get(key)">
|
<textarea matInput class="language-area" cdkTextareaAutosize #autosize="cdkTextareaAutosize" [formControl]="formGroup.get(key)">
|
||||||
</textarea>
|
</textarea>
|
||||||
|
|
Loading…
Reference in New Issue