Package com.complexible.stardog.ext.spring.mapper

Examples of com.complexible.stardog.ext.spring.mapper.SingleMapper


  public void testSingleMapper() {
    SnarlTemplate tmp = new SnarlTemplate();
    tmp.setDataSource(dataSource);
    String sparql = "SELECT ?b WHERE { ?a  <http://purl.org/dc/elements/1.1/title> ?b } LIMIT 1";
   
    String result = tmp.queryForObject(sparql, new SingleMapper("b"));
   
    assertNotNull(result);
  }
View Full Code Here


  public void testNullSingleMapper() {
    SnarlTemplate tmp = new SnarlTemplate();
    tmp.setDataSource(dataSource);
    String sparql = "SELECT ?b WHERE { ?a  <http://purl.org/dc/elements/1.1/title> ?b } LIMIT 1";
    // unlike previous test, a is not bound, therefore should find null in Sesame API
    String result = tmp.queryForObject(sparql, new SingleMapper("a"));
   
    assertNull(result);
  }
View Full Code Here

TOP

Related Classes of com.complexible.stardog.ext.spring.mapper.SingleMapper

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.