Skip to content
Snippets Groups Projects
Commit 911da09f authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Set date format to ISO 8601 and added ivo://ivoa.net/vospace/core#date property

parent d6970783
No related branches found
No related tags found
No related merge requests found
......@@ -190,8 +190,10 @@ public class NodeDAO {
addProperty(NodeProperties.LENGTH_URI, rs.getString("content_length"),
properties);
addProperty(NodeProperties.INITIAL_CREATION_TIME_URI, rs.getString("created_on"),
properties);
String creationTime = rs.getString("created_on").replace(" ", "T");
addProperty(NodeProperties.INITIAL_CREATION_TIME_URI, creationTime, properties);
addProperty(NodeProperties.DATE_URI, creationTime, properties); // required by CADC
addProperty(NodeProperties.CREATOR_URI, rs.getString("creator_id"),
properties);
......
......@@ -62,6 +62,10 @@ public class NodeDAOTest {
assertEquals("true", NodeProperties.getNodePropertyAsListByURI(root, NodeProperties.PUBLIC_READ_URI).get(0));
assertEquals("group1 group2", NodeProperties.getNodePropertyByURI(root.getNodes().get(0), NodeProperties.GROUP_READ_URI));
String bTime = NodeProperties.getNodePropertyByURI(root.getNodes().get(0), NodeProperties.INITIAL_CREATION_TIME_URI);
assertTrue(bTime.contains("T"));
assertEquals(bTime, NodeProperties.getNodePropertyByURI(root.getNodes().get(0), NodeProperties.DATE_URI));
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment