Skip to content

Commit

Permalink
Merge pull request #5041 from IQSS/4777-file-pg-citations-layout
Browse files Browse the repository at this point in the history
4777 file pg citations layout
  • Loading branch information
kcondon authored Sep 14, 2018
2 parents 9558204 + ebb319f commit 2d2fac8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/edu/harvard/iq/dataverse/DataCitation.java
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,13 @@ public void writeAsRISCitation(OutputStream os) throws IOException {
if (seriesTitle != null) {
out.write("T3 - " + seriesTitle + "\r\n");
}
out.write("AB - " + flattenHtml(description) + "\r\n");
if(description!=null) {
out.write("AB - " + flattenHtml(description) + "\r\n");
}
for (String author : authors) {
out.write("AU - " + author + "\r\n");
}

if (!producers.isEmpty()) {
for (String author : producers) {
out.write("A2 - " + author + "\r\n");
Expand Down Expand Up @@ -495,7 +498,9 @@ private void createEndNoteXML(XMLStreamWriter xmlw) throws XMLStreamException {
xmlw.writeEndElement(); // section

xmlw.writeStartElement("abstract");
xmlw.writeCharacters(flattenHtml(description));
if(description!=null) {
xmlw.writeCharacters(flattenHtml(description));
}
xmlw.writeEndElement(); // abstract

xmlw.writeStartElement("dates");
Expand Down

0 comments on commit 2d2fac8

Please sign in to comment.