incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Innerhofer (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (CLEREZZA-303) Some triples with dates have another date after storage in tdb graph
Date Wed, 22 Sep 2010 12:02:34 GMT

     [ https://issues.apache.org/jira/browse/CLEREZZA-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Manuel Innerhofer reopened CLEREZZA-303:
----------------------------------------


try this one:

@Test
	public void dateStorage() {
		MGraph graph = getEmptyMGraph();
		Date date = new Date(0);
		LiteralFactory literalFactory = LiteralFactory.getInstance();
		TypedLiteral dateLiteral = literalFactory.createTypedLiteral(date);
		System.out.println(dateLiteral);
		UriRef property = new UriRef("http://example.com/property");
		Triple triple = new TripleImpl(new BNode(), property, dateLiteral);
		graph.add(triple);

		Triple tripleFromGraph = null;
		Iterator<Triple> propertyTriples = graph.filter(null, property, null);
		if (propertyTriples.hasNext()) {
			tripleFromGraph = propertyTriples.next();
		}
		Assert.assertEquals(triple, tripleFromGraph);
	}

> Some triples with dates have another date after storage in tdb graph
> --------------------------------------------------------------------
>
>                 Key: CLEREZZA-303
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-303
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Manuel Innerhofer
>            Assignee: Reto Bachmann-Gmür
>
> Steps to reproduce the problem:
> MGraph gaph // a graph in tdb
> Date date = new Date(0);
> LiteralFactory literalFactory = LiteralFactory.getInstance();
> TypedLiteral dateLiteral =  literalFactory.createTypedLiteral(date);
> Triple triple = new TripleImpl(new BNode(), new UriRef("http://example.com/property"),
dateLiteral);
> graph.add(triple)
> Assert.assertTrue(graph.contains(triple))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message