Package spark.api.rdf

Examples of spark.api.rdf.NamedNode


    List<Map<String,RDFNode>> sl = new ArrayList<Map<String,RDFNode>>();
    for (int i = 0; i < 10; i++) {
      sl.add(new HashMap<String,RDFNode>());
    }
   
    NamedNode uriRef = new NamedNodeImpl(URI.create("http://example.org/test"));
    BlankNode bn = new BlankNodeImpl("1");
    Literal lit = new PlainLiteralImpl("foo");
   
    sl.get(0).put(var, uriRef);
    sl.get(1).put(var, bn);
    sl.get(2).put(var, lit);
    sl.get(3).put(var, new PlainLiteralImpl(A_DATE_TIME));
    sl.get(4).put(var, new PlainLiteralImpl("198765415975423167465132498465"));
    sl.get(5).put(var, new PlainLiteralImpl("true"));
    sl.get(6).put(var, new PlainLiteralImpl("3.14"));
    sl.get(7).put(var, new PlainLiteralImpl("98.6"));
    sl.get(8).put(var, new PlainLiteralImpl("42"));
   
    SolutionSet s = new SolutionSet(null, Arrays.asList("x"), sl);
    TestCursor.assertCursor(s, BEFORE_FIRST);
   
    assertTrue(s.next());
    TestCursor.assertCursor(s, FIRST);
    assertEquals(uriRef, s.getNamedNode(var));   
    assertEquals(uriRef.getURI(), s.getURI(var));   
   
    assertTrue(s.next());
    TestCursor.assertCursor(s, NONE);
    assertEquals(bn, s.getBlankNode(var));   
   
View Full Code Here

TOP

Related Classes of spark.api.rdf.NamedNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.