check if dmp description is null or empty
This commit is contained in:
parent
60368bc98c
commit
b17719ab43
|
@ -22,3 +22,4 @@ note: depositType should be set to **0** since dataverse does not provide oauth2
|
|||
**repositoryRecordUrl** - repository's record url, this url is used to index dmps that are created e.g. "https://demo.dataverse.org/dataset.xhtml?persistentId=doi:"<br>
|
||||
**server** - repository's server url e.g. "https://demo.dataverse.org"<br>
|
||||
**parentDataverseAlias** - dataverse alias in which all dmps that are deposited will be resided, **note**: the dataverse alias used should be published before making any dmp deposit<br>
|
||||
**hasLogo** - if the repository has a logo<br>
|
||||
|
|
|
@ -73,13 +73,18 @@ public class DataverseDeposit implements RepositoryDeposit {
|
|||
if(!this.isApiSet)
|
||||
this.setDataverseApi();
|
||||
|
||||
String dmpDescription = dmpDepositModel.getDescription();
|
||||
if(dmpDescription == null || dmpDescription.isEmpty()){
|
||||
dmpDescription = "-";
|
||||
}
|
||||
|
||||
String doi;
|
||||
DatasetFacade dataset = DatasetFacade.builder()
|
||||
.title(dmpDepositModel.getLabel())
|
||||
.authors(dmpDepositModel.getUsers().stream().map(x -> DatasetAuthor.builder().authorName(x.getUser().getName()).build()).collect(Collectors.toList()))
|
||||
.contacts(dmpDepositModel.getUsers().stream().map(x -> DatasetContact.builder().datasetContactEmail(x.getUser().getEmail()).build()).collect(Collectors.toList()))
|
||||
.subject("Other")
|
||||
.description(DatasetDescription.builder().description(dmpDepositModel.getDescription()).build())
|
||||
.description(DatasetDescription.builder().description(dmpDescription).build())
|
||||
.languages(new ArrayList<>())
|
||||
.depositor("")
|
||||
.build();
|
||||
|
|
Loading…
Reference in New Issue