Package com.hp.hpl.jena.query.core

Examples of com.hp.hpl.jena.query.core.BindingRoot


{
  private Map<String, Node> map;
 
  public BindingMapAug()
  {
    super(new BindingRoot());
    this.map = new HashMap<String, Node>();
  }
View Full Code Here


    map.add(Triple.create("?s http://xmlns.com/foaf/0.1/name 'Paul\\sShabajee'"));
    map.add(Triple.create("?s http://xmlns.com/foaf/0.1/mbox ?mbox"));
   
    assertEquals("Predicate is foaf:name", Node.createURI("http://xmlns.com/foaf/0.1/name") , map.getTriples().get(0).getPredicate());
       
    NamingEnumeration<SearchResult> results = map.executeLdap(new BindingRoot(), null);
   
    assertTrue("I got a result", results.hasMore());
   
    SearchResult result = results.next();
   
    log.info("Result: " + result.getNameInNamespace());
   
    assertEquals("Paul's email address is right", "paul.shabajee@hp.com", result.getAttributes().get("uid").get(0));
   
    results.close();
   
    Iterator<Map <String, Node>> res = map.execute(new BindingRoot(), null);
   
    assertTrue("I got a result", res.hasNext());
   
    Map<String, Node> nextBinding = res.next();
   
View Full Code Here

  {
    LdapSubQuery map = new LdapSubQuery(config);
   
    map.add(Triple.create("ldap://ldap.hp.com/uid=paul.shabajee@hp.com,ou=People,o=hp.com http://xmlns.com/foaf/0.1/mbox ?mbox"));
   
    Iterator<Map <String, Node>> res = map.execute(new BindingRoot(), null);
   
    assertTrue("I got a result", res.hasNext());
   
    Map<String, Node> nextBinding = res.next();
   
View Full Code Here

  {
    LdapSubQuery map = new LdapSubQuery(config);
   
    map.add(Triple.create("ldap://ldap.hp.com/uid=paul.shabajee@hp.com,ou=People,o=hp.com http://jena.hpl.hp.com/schemas/hpcorp#manager ?manager"));
   
    Iterator<Map <String, Node>> res = map.execute(new BindingRoot(), null);
   
    assertTrue("I got a result", res.hasNext());
   
    Map<String, Node> nextBinding = res.next();
   
View Full Code Here

   
    map.addTriple(Triple.create("?paul http://xmlns.com/foaf/0.1/name 'Paul\\sShabajee'"));
    map.addTriple(Triple.create("?paul http://jena.hpl.hp.com/schemas/hpcorp#manager ?manager"));
    map.addTriple(Triple.create("?manager http://xmlns.com/foaf/0.1/name ?name"));
   
    QueryIterator results = new QueryIterSingleton(new BindingRoot());
   
    results = map.execute(results, null);
   
    assertTrue("I have a manager for Paul", results.hasNext());
   
View Full Code Here

    LdapSubQuery map = new LdapSubQuery(config);
   
    map.add(Triple.create("?person http://xmlns.com/foaf/0.1/mbox mailto:paul.shabajee@hp.com"));
    map.add(Triple.create("?person http://xmlns.com/foaf/0.1/name ?name"));
   
    Iterator<Map <String, Node>> res = map.execute(new BindingRoot(), null);
   
    assertTrue("I got a result", res.hasNext());
   
    Map<String, Node> nextBinding = res.next();
   
View Full Code Here

   
    map.addTriple(Triple.create("?person http://xmlns.com/foaf/0.1/mbox mailto:martin.merry@hp.com"));
    map.addTriple(Triple.create("?underling http://jena.hpl.hp.com/schemas/hpcorp#manager ?person"));
    map.addTriple(Triple.create("?underling http://xmlns.com/foaf/0.1/name ?name"));
   
    QueryIterator results = new QueryIterSingleton(new BindingRoot());
   
    results = map.execute(results, null);
   
    assertTrue("I got a result", results.hasNext());
   
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.query.core.BindingRoot

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.