From 36c1ad6b6a4d1711c00dd02f89513d19b4dc82bd Mon Sep 17 00:00:00 2001 From: j2blake Date: Tue, 5 Nov 2013 17:24:12 -0500 Subject: [PATCH] VIVO-448 ORNG was unable to parse our LOD response. The date-time stamp on the document itself was not in the correct format. --- .../webapp/controller/individual/IndividualRdfAssembler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualRdfAssembler.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualRdfAssembler.java index 90e79cde7..d2c7f5702 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualRdfAssembler.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualRdfAssembler.java @@ -2,6 +2,7 @@ package edu.cornell.mannlib.vitro.webapp.controller.individual; +import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashSet; import java.util.Set; @@ -343,7 +344,9 @@ public class IndividualRdfAssembler { } private Literal createDateLiteral(OntModel o) { - return o.createTypedLiteral(new Date(), XSDDatatype.XSDdate); + String date = new SimpleDateFormat("YYYY-MM-dd'T'HH:mm:ss") + .format(new Date()); + return o.createTypedLiteral(date, XSDDatatype.XSDdateTime); } }