use of com.inova8.pathql.processor.PathPatternException in project com.inova8.intelligentgraph by peterjohnlawrence.
the class PathPatternSPARQLTests method test_6.
/**
* Test 6.
*
* @throws RecognitionException the recognition exception
* @throws PathPatternException the path pattern exception
*/
@Test
@Order(6)
void test_6() throws RecognitionException, PathPatternException {
PathElement element = PathParser.parsePathPattern(repositoryContext, ":Location@:appearsOn[ eq [ rdfs:label \"Calc2Graph1\"] ]#/^:lat/:long/^:left/:right");
assertEquals("?r1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?n0\r\n" + "?r1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://default/appearsOn>\r\n" + "?r1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?n1\r\n" + "?n1 <http://rdfs/label> 'Calc2Graph1' .\r\n" + "?n2 <http://default/lat> ?r1 .\r\n" + "?n2 <http://default/long> ?n3 .\r\n" + "?n4 <http://default/left> ?n3 .\r\n" + "?n4 <http://default/right> ?n5 .\r\n" + "", element.toSPARQL());
}
use of com.inova8.pathql.processor.PathPatternException in project com.inova8.intelligentgraph by peterjohnlawrence.
the class PathPatternSPARQLTests method test_7.
/**
* Test 7.
*
* @throws RecognitionException the recognition exception
* @throws PathPatternException the path pattern exception
*/
@Test
@Order(7)
void test_7() throws RecognitionException, PathPatternException {
PathElement element = PathParser.parsePathPattern(repositoryContext, ":volumeFlow [ gt \"35\" ; rdfs:label \"Calc2Graph1\" ; eq [ rdfs:label \"Calc2Graph2\"] , :Calc2Graph3 ,\"Calc2Graph4\" ]");
assertEquals("?n0 <http://default/volumeFlow> <http://default/Calc2Graph3> .\r\n" + "FILTER(<http://default/Calc2Graph3> gt '35')\r\n" + "<http://default/Calc2Graph3> <http://rdfs/label> 'Calc2Graph1' .\r\n" + "<http://default/Calc2Graph3> <http://rdfs/label> 'Calc2Graph2' .\r\n" + "?n0 <http://default/volumeFlow> 'Calc2Graph4' .\r\n" + "FILTER('Calc2Graph4' gt '35')\r\n" + "'Calc2Graph4' <http://rdfs/label> 'Calc2Graph1' .\r\n" + "'Calc2Graph4' <http://rdfs/label> 'Calc2Graph2' .\r\n" + "", element.toSPARQL());
}
Aggregations