--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/d98d5d6c-c344-412b-8394-f581fa90eaa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/e75bfbd8-d5b4-480c-b88b-2ce544631a73%40googlegroups.com.
DatasetFacade buildDatasetToSubmit(SubmissionMetadata metadata) {
DatasetFacadeBuilder builder = DatasetFacade.builder();
for (IDepositor author: metadata.getAuthors()) {
builder.author(buildAuthor(author));
}
for (IDepositor contact: metadata.getContacts()) {
builder.contact(buildContact(contact));
}
DatasetFacade facade = builder
.title(metadata.getTitle())
.subject(metadata.getSubjects().isEmpty()?"":metadata.getSubjects().get(0))
.description(DatasetDescription.builder().description(metadata.getDescription()).build())
.languages(asList(new String []{"English"}))
.build();
return facade;
}
private DatasetContact buildContact(IDepositor contact) {
return DatasetContact.builder()
.datasetContactEmail(contact.getEmail())
.datasetContactName(contact.getUniqueName()).build();
}
private DatasetAuthor buildAuthor(IDepositor author) {
ExternalId extId = getExtId(author);
return DatasetAuthor.builder()
.authorName(author.getUniqueName())
.authorIdentifier((extId != null) ? extId.getIdentifier() : null)
.authorIdentifierScheme((extId != null) ? extId.getScheme().name() : null)
.build();
--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/93d0bd1c-0ef8-411b-a726-6ba1bfc59a82%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/788403eb-b928-47dd-a3a9-22ae3914812e%40googlegroups.com.