Package lupos.datastructures.bindings

Examples of lupos.datastructures.bindings.BindingsCollection


      this.zeroPairs = new HashSet<Bindings>()
    }
   
    while (itb.hasNext()){
      Bindings bind = itb.next();
      Bindings newBind = new BindingsCollection();
      if((this.allowedSubjects==null || this.allowedSubjects.contains(bind.get(this.subject))) && (this.allowedObjects==null || this.allowedObjects.contains(bind.get(this.subject)))){
        newBind.add(this.subject, bind.get(this.subject));
        newBind.add(this.object, bind.get(this.subject));
        this.zeroPairs.add(newBind);
      }
     
      if((this.allowedSubjects==null || this.allowedSubjects.contains(bind.get(this.object))) && (this.allowedObjects==null || this.allowedObjects.contains(bind.get(this.object)))){
        newBind = new BindingsCollection();
        newBind.add(this.subject, bind.get(this.object));
        newBind.add(this.object, bind.get(this.object));
        this.zeroPairs.add(newBind);
      }
    }
   
    final Iterator<Bindings> itz = this.zeroPairs.iterator();
View Full Code Here


            if (potentialNewBindings != null){
              final SetImplementation<Literal> updatedMapEntry= new SetImplementation<Literal>(reachabilityMap.get(closureElement.get(this.subject)));
              final Iterator<Literal> itobject = potentialNewBindings.iterator();
              while(itobject.hasNext()){
                final Literal tempObject = itobject.next();
                final Bindings newBind = new BindingsCollection();
                newBind.add(this.subject, closureElement.get(this.subject));
                newBind.add(this.object, tempObject);
                if(closure.add(newBind)){
                  thisIteration.add(newBind);
                  updatedMapEntry.add(tempObject);
                }
              }
View Full Code Here

            if (potentialNewBindings != null){
              final SetImplementation<Literal> updatedMapEntry= new SetImplementation<Literal>(reachabilityMap.get(closureElement.get(this.object)));
              final Iterator<Literal> itsubject = potentialNewBindings.iterator();
              while(itsubject.hasNext()){
                final Literal tempSubject = itsubject.next();
                final Bindings newBind = new BindingsCollection();
                newBind.add(this.subject, tempSubject);
                newBind.add(this.object, closureElement.get(this.object));
                if (closure.add(newBind)){
                  thisIteration.add(newBind);
                  updatedMapEntry.add(tempSubject);
                }
              }
View Full Code Here

    final QueryExecution qe = QueryExecutionFactory.create(query, model);
    if (query.isAskType()) {
      if (qe.execAsk()) {
        // unempty => true
        final QueryResult qr = new BooleanResult();
        qr.add(new BindingsCollection());
        return qr;
      } else {
        final QueryResult qr = new BooleanResult();
        qe.close();
        return qr;
View Full Code Here

    evaluateQuery();
    QueryResult qr = null;
    if (result instanceof Boolean) {
      qr = new BooleanResult();
      if ((Boolean) result)
        qr.add(new BindingsCollection());
    } else if (result instanceof TupleQueryResult) {
      qr = QueryResult.createInstance();
      while (((TupleQueryResult) result).hasNext()) {
        final BindingSet bs = ((TupleQueryResult) result).next();
        final Bindings binding = new BindingsMap();
View Full Code Here

TOP

Related Classes of lupos.datastructures.bindings.BindingsCollection

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.