Package org.ontoware.rdf2go.model.node

Examples of org.ontoware.rdf2go.model.node.PlainLiteral.toSPARQL()


    }
   
    // another SPARQL ASK
    System.out.println("Query 2:");
    // ask if any resource is tagged with tagComputers
    queryString = "ASK { ?resource <"+hasTag+"> "+tagComputers.toSPARQL()+" }";
    if(!model.sparqlAsk(queryString)) {
      System.out.println("nothing is tagged with "+tagComputers);
    }

  }
View Full Code Here


    tag(guido, tagPython);
   
    // simple SPARQL CONSTRUCT
    System.out.println("Query 1:");
    // suggest tagJava implies tagComputers
    String queryString = "CONSTRUCT { ?resource <"+hasTag+"> "+tagComputers.toSPARQL()+" } WHERE { ?resource <"+hasTag+"> "+tagJava.toSPARQL()+" }";
    ClosableIterable<? extends Statement> results = model.sparqlConstruct(queryString);
    for(Statement result : results) {
      System.out.println(result);
    }
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.