Beispiel #1
0
        private void evalOther(final PFlow pf, final Relationship ref, final QCAVector answered) throws IOException {
        	IndexHits<Relationship> hits = Order._.context(pf.getOPNode());
        	try {
    	        for (Relationship r : hits) {
    	            Statement st = Statements.relationshipType(r);
    	            if (!(st instanceof Predicate)) {
	            		Pipe pipe = Evaluator._.execute(pf.getController(), answered.question(r));
                		QCAVector v;
                		while ((v = pipe.take()) != null) {
                			pf.sendAnswer(v);
                		}
    	            }
    	        }
        	} finally {
        		hits.close();
        	}
        }
Beispiel #2
0
        private boolean filtering(final PFlow pf, final Relationship ref, final QCAVector answered) throws IOException, InterruptedException {
        	IndexHits<Relationship> hits = Order._.context(pf.getOPNode());
        	try {
    	        for (Relationship r : hits) {
    	            Statement st = Statements.relationshipType(r);
    	            if (st instanceof Predicate) {
	                    if (((Predicate) st).filter(pf, r, ref)) {
	                    	Pipe pipe = Evaluator._.execute(pf.getController(), answered, r.getEndNode());
	                		QCAVector v;
	                		while ((v = pipe.take()) != null) {
	                			pf.sendAnswer(v);
	                		}
	                        return true;
	                    }
    	            }
    	        }
        	} finally {
        		hits.close();
        	}
            return false;
        }