Search in sources :

Example 1 with Item

use of org.apache.jena.sparql.sse.Item in project jena by apache.

the class TestSSE_Forms method testBase_03.

@Test
public void testBase_03() {
    Item r = SSE.parse("(1 <http://example/xyz>)", null);
    testItem("(base <http://example/> (1 <xyz>))", r);
}
Also used : Item(org.apache.jena.sparql.sse.Item) Test(org.junit.Test)

Example 2 with Item

use of org.apache.jena.sparql.sse.Item in project jena by apache.

the class TestSSE_Forms method testBase_05.

@Test
public void testBase_05() {
    Item r = SSE.parse("(<http://example/xyz> <http://EXAMPLE/other#foo>)", null);
    testItem("((base <http://example/> <xyz>) (base <http://EXAMPLE/other> <#foo>))", r);
}
Also used : Item(org.apache.jena.sparql.sse.Item) Test(org.junit.Test)

Example 3 with Item

use of org.apache.jena.sparql.sse.Item in project jena by apache.

the class TestSSE_Forms method testPrefix_03.

@Test
public void testPrefix_03() {
    Item r = SSE.parse("(<http://example/abc>)", null);
    testItem("(prefix ((ex: <http://example/>)) (ex:abc))", r);
}
Also used : Item(org.apache.jena.sparql.sse.Item) Test(org.junit.Test)

Example 4 with Item

use of org.apache.jena.sparql.sse.Item in project jena by apache.

the class TestSSE_Forms method testBase_07.

@Test
public void testBase_07() {
    Item r = SSE.parse("(<http://example/xyz> <http://EXAMPLE/other#foo>)", null);
    testItem("(base <http://EXAMPLE/other#> ((base <http://example/> <xyz>) <#foo>))", r);
}
Also used : Item(org.apache.jena.sparql.sse.Item) Test(org.junit.Test)

Example 5 with Item

use of org.apache.jena.sparql.sse.Item in project jena by apache.

the class TestSSE_Forms method testPrefix_01.

// ----
@Test
public void testPrefix_01() {
    Item r = Item.createNode(NodeFactory.createURI("http://example/abc"));
    testItem("(prefix ((ex: <http://example/>)) ex:abc)", r);
}
Also used : Item(org.apache.jena.sparql.sse.Item) Test(org.junit.Test)

Aggregations

Item (org.apache.jena.sparql.sse.Item)84 Test (org.junit.Test)31 ItemList (org.apache.jena.sparql.sse.ItemList)14 Node (org.apache.jena.graph.Node)11 ArrayList (java.util.ArrayList)7 Var (org.apache.jena.sparql.core.Var)6 Binding (org.apache.jena.sparql.engine.binding.Binding)4 Tuple (org.apache.jena.atlas.lib.tuple.Tuple)2 Graph (org.apache.jena.graph.Graph)2 Triple (org.apache.jena.graph.Triple)2 ResultSetRewindable (org.apache.jena.query.ResultSetRewindable)2 ARQException (org.apache.jena.sparql.ARQException)2 ARQInternalErrorException (org.apache.jena.sparql.ARQInternalErrorException)2 DatasetGraph (org.apache.jena.sparql.core.DatasetGraph)2 VarExprList (org.apache.jena.sparql.core.VarExprList)2 StatsMatcher (org.apache.jena.sparql.engine.optimizer.StatsMatcher)2 ItemException (org.apache.jena.sparql.sse.ItemException)2 BuilderNode (org.apache.jena.sparql.sse.builders.BuilderNode)2 QueryParseException (org.apache.jena.query.QueryParseException)1 Table (org.apache.jena.sparql.algebra.Table)1