Examples of OpFilter


Examples of com.hp.hpl.jena.sparql.algebra.op.OpFilter

    }
   
    @Test public void placement11()
    {
        Op op1 = SSE.parseOp("(filter (= ?x ?unbound) (bgp (?s ?p ?x)))") ;
        OpFilter f = (OpFilter)op1 ;
        Op op2 = TransformFilterPlacement.transform(f.getExprs(), ((OpBGP)f.getSubOp()).getPattern()) ;
        Op op3 = SSE.parseOp("(filter (= ?x ?unbound) (bgp (?s ?p ?x)))") ;
        Assert.assertEquals(op3, op2) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.op.OpFilter

    }

    @Test public void placement12()
    {
        Op op1 = SSE.parseOp("(filter (= ?x ?unbound) (bgp (?s ?p ?x) (?s1 ?p1 ?XX)))") ;
        OpFilter f = (OpFilter)op1 ;
        Op op2 = TransformFilterPlacement.transform(f.getExprs(), ((OpBGP)f.getSubOp()).getPattern()) ;
        Op op3 = SSE.parseOp("(filter (= ?x ?unbound) (bgp (?s ?p ?x) (?s1 ?p1 ?XX)))") ;
        Assert.assertEquals(op3, op2) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.op.OpFilter

    }
   
    @Test public void placement11()
    {
        Op op1 = SSE.parseOp("(filter (= ?x ?unbound) (bgp (?s ?p ?x)))") ;
        OpFilter f = (OpFilter)op1 ;
        Op op2 = TransformFilterPlacement.transform(f.getExprs(), ((OpBGP)f.getSubOp()).getPattern()) ;
        Op op3 = SSE.parseOp("(filter (= ?x ?unbound) (bgp (?s ?p ?x)))") ;
        Assert.assertEquals(op3, op2) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.op.OpFilter

    }

    @Test public void placement12()
    {
        Op op1 = SSE.parseOp("(filter (= ?x ?unbound) (bgp (?s ?p ?x) (?s1 ?p1 ?XX)))") ;
        OpFilter f = (OpFilter)op1 ;
        Op op2 = TransformFilterPlacement.transform(f.getExprs(), ((OpBGP)f.getSubOp()).getPattern()) ;
        Op op3 = SSE.parseOp("(filter (= ?x ?unbound) (bgp (?s ?p ?x) (?s1 ?p1 ?XX)))") ;
        Assert.assertEquals(op3, op2) ;
    }
View Full Code Here

Examples of org.locationtech.udig.ui.operations.OpFilter

          }else{
            defaultCursorID = ModalTool.DEFAULT_CURSOR;
          }
        }
       
        OpFilter parseEnablement = EnablementUtil.parseEnablement( extension.getNamespaceIdentifier()+"."+definition.getName(), definition.getChildren("enablement")); //$NON-NLS-1$ //$NON-NLS-2$;
        enablement = new LazyOpFilter(this, parseEnablement);
        operationCategories = parseOperationCategories(definition);
       
        String bool = definition.getAttribute("hasCustomControl"); //$NON-NLS-1$
        hasControl = ((bool != null) && bool.equalsIgnoreCase("true")) ? true : false; //$NON-NLS-1$
View Full Code Here

Examples of org.locationtech.udig.ui.operations.OpFilter

     * @param categories
     */
    private void disable( List<? extends ToolCategory> categories ) {
        for( ToolCategory category : categories ) {
            for( ModalItem item : category ) {
                OpFilter enablesFor = item.getEnablesFor();
                if( enablesFor instanceof LazyOpFilter)
                    ((LazyOpFilter)enablesFor).disable();
            }
        }
    }
View Full Code Here

Examples of org.locationtech.udig.ui.operations.OpFilter

        if(!map.getEditManager().containsListener(selectedLayerListener))
          map.getEditManager().addListener(selectedLayerListener);
       
        for( ToolCategory cat : categories ) {
            for( ModalItem item : cat ) {
                OpFilter enablesFor = item.getEnablesFor();
                ILayer selectedLayer = map.getEditManager().getSelectedLayer();

                // JG: I don't trust asserts in production code!
                // assert enablesFor instanceof LazyOpFilter;
               
                if( !(enablesFor instanceof LazyOpFilter) ){
                    enablesFor = new LazyOpFilter(item, enablesFor);
                }
               
                boolean accept = enablesFor.accept(selectedLayer);
                item.setEnabled(accept);
            }
        }
    }
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.