Package com.hp.hpl.jena.query

Examples of com.hp.hpl.jena.query.QuerySolutionMap


  private static final String  PREFIX  = "PREFIX : <" + NS + ">";

  private static Dataset    dataset;

  private static QuerySolutionMap binding(String var, RDFNode value) {
    QuerySolutionMap b = new QuerySolutionMap();
    b.add( var, value );

    return b;
  }
View Full Code Here


    return b;
  }

  private static QuerySolutionMap binding(String var1, RDFNode value1, String var2, RDFNode value2) {
    QuerySolutionMap b = new QuerySolutionMap();
    b.add( var1, value1 );
    b.add( var2, value2 );

    return b;
  }
View Full Code Here

    Query q1 = QueryFactory.create( PREFIX + "SELECT ?x WHERE { ?x :p ?y }" );
    Query q2 = QueryFactory.create( PREFIX + "SELECT ?x ?y WHERE { ?x :p ?y }" );
    Query q3 = QueryFactory.create( PREFIX + "SELECT * WHERE { ?x :p ?y }" );
    Query q4 = QueryFactory.create( PREFIX + "SELECT * WHERE { :x1 :p ?y }" );

    QuerySolutionMap b1 = binding( "y", y1 );
    QuerySolutionMap b2 = binding( "x", x1 );
    QuerySolutionMap b3 = binding( "y", y1, "x", x1 );
    QuerySolutionMap b4 = null;

    List<Object[]> params = new ArrayList<Object[]>();

    for( QueryEngineType qe : QueryEngineType.values() ) {
      params.add( new Object[] { qe, q1, b1, b2 } );
View Full Code Here

 
  public QueryParameters(QuerySolution initialBinding) {
    this();
   
    if (initialBinding == null)
      initialBinding = new QuerySolutionMap();
   
    for (Iterator iter = initialBinding.varNames(); iter.hasNext(); ) {
      String varName = (String)iter.next();
      ATermAppl key = ATermUtils.makeVar(varName);
      ATermAppl value = JenaUtils.makeATerm(initialBinding.get( varName ));
View Full Code Here

    if( triples == null )
      throw new NullPointerException( "The set of triples cannot be null" );

    // Ensure that the initial binding is not a null pointer
    if( initialBinding == null )
      initialBinding = new QuerySolutionMap();

    List<Triple> ret = new ArrayList<Triple>();

    for( final Triple t : triples.toArray( new Triple[triples.size()] ) ) {
      if( !triples.contains( t ) ) {
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.query.QuerySolutionMap

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.