Skip to content

Commit

Permalink
#2438 Get File name/desc for DC metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed May 15, 2018
1 parent ded2172 commit c0a3c65
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,17 @@ private String getMetadataFromDvObject(String identifier, HashMap<String, String
metadataTemplate.setIdentifier(identifier.substring(identifier.indexOf(':') + 1));
metadataTemplate.setCreators(Util.getListFromStr(metadata.get("datacite.creator")));
metadataTemplate.setAuthors(dataset.getLatestVersion().getDatasetAuthors());
metadataTemplate.setDescription(dataset.getLatestVersion().getDescriptionPlainText());
if (dvObject.isInstanceofDataset()) {
metadataTemplate.setDescription(dataset.getLatestVersion().getDescriptionPlainText());
}
if (dvObject.isInstanceofDataFile()) {
DataFile df = (DataFile) dvObject;
String fileDescription =df.getDescription();
metadataTemplate.setDescription(fileDescription == null ? "" :fileDescription );
}
metadataTemplate.setContacts(dataset.getLatestVersion().getDatasetContacts());
metadataTemplate.setProducers(dataset.getLatestVersion().getDatasetProducers());
metadataTemplate.setTitle(dataset.getLatestVersion().getTitle());
metadataTemplate.setTitle(dvObject.getDisplayName());
String producerString = dataverseService.findRootDataverse().getName();
if (producerString.isEmpty()) {
producerString = ":unav";
Expand Down

0 comments on commit c0a3c65

Please sign in to comment.