Package com.hp.hpl.jena.sparql.engine.optimizer

Examples of com.hp.hpl.jena.sparql.engine.optimizer.Pattern


       
        // Numbers chosen as an approximation ratios for a graph of 100 triples

        // 1 : TERM type TERM is builtin (SPO).
        // matcherRdfType.addPattern(new Pattern(1, TERM, TERM, TERM)) ;
        matcherRdfType.addPattern(new Pattern(5, VAR, type, TERM)) ;
        matcherRdfType.addPattern(new Pattern(50, VAR, type, VAR)) ;
       
        // SPO - built-in - not needed as a rule
        // matcher.addPattern(new Pattern(1, TERM, TERM, TERM)) ;

        matcher.addPattern(new Pattern(2, TERM, TERM, VAR)) ;                   // SP?
        matcher.addPattern(new Pattern(3, VAR, TERM, TERM)) ;                   // ?PO
        matcher.addPattern(new Pattern(2, TERM, TERM, TERM)) ;                  // S?O

        matcher.addPattern(new Pattern(10, TERM, VAR, VAR)) ;                   // S??
        matcher.addPattern(new Pattern(20, VAR, VAR, TERM)) ;                   // ??O
        matcher.addPattern(new Pattern(30, VAR, TERM, VAR)) ;                   // ?P?

        matcher.addPattern(new Pattern(MultiTermSampleSize, VAR, VAR, VAR)) ;   // ???
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.engine.optimizer.Pattern

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.