Class StatsMatcher
- java.lang.Object
-
- org.apache.jena.sparql.engine.optimizer.StatsMatcher
-
public final class StatsMatcher extends java.lang.ObjectStats format:(stats (meta ...) ((S P O) weight) (whereweight) ) S,P,Ois a URI, variable, literal or one of the wordsANY(matches anything),VAR(matches a variable),TERM(matches a fixed URI, or literal),URI,BNODE,LITERAL(matches one of these types).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOUNTstatic java.lang.StringMETAstatic ItemOTHERstatic java.lang.StringSTATSstatic doubleweightPOstatic doubleweightPO_smallstatic doubleweightSPstatic doubleweightSP_smallstatic doubleweightTypeOstatic doubleweightTypeO_small
-
Constructor Summary
Constructors Constructor Description StatsMatcher()StatsMatcher(java.lang.String filename)StatsMatcher(Item stats)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPattern(Pattern pattern)voidaddPatterns(Node predicate, double numProp)Add patterns based solely on the predicate count and some guessingvoidaddPatternsSmall(Node predicate, double numProp)Add patterns based solely on the predicate count and some guessing for a small graph (less than a few thousand triples)doublematch(Triple t)doublematch(PatternTriple pTriple)doublematch(Item subj, Item pred, Item obj)Return the matching weight for the first triple match found, else apply default value for fixed, unknown predicate, else return NOMATCHvoidprintSSE(java.io.OutputStream ps)java.lang.StringtoString()
-
-
-
Field Detail
-
STATS
public static final java.lang.String STATS
- See Also:
- Constant Field Values
-
META
public static final java.lang.String META
- See Also:
- Constant Field Values
-
COUNT
public static final java.lang.String COUNT
- See Also:
- Constant Field Values
-
OTHER
public static final Item OTHER
-
weightSP
public static final double weightSP
- See Also:
- Constant Field Values
-
weightPO
public static final double weightPO
- See Also:
- Constant Field Values
-
weightTypeO
public static final double weightTypeO
- See Also:
- Constant Field Values
-
weightSP_small
public static final double weightSP_small
- See Also:
- Constant Field Values
-
weightPO_small
public static final double weightPO_small
- See Also:
- Constant Field Values
-
weightTypeO_small
public static final double weightTypeO_small
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StatsMatcher
public StatsMatcher()
-
StatsMatcher
public StatsMatcher(java.lang.String filename)
-
StatsMatcher
public StatsMatcher(Item stats)
-
-
Method Detail
-
addPatterns
public void addPatterns(Node predicate, double numProp)
Add patterns based solely on the predicate count and some guessing
-
addPatternsSmall
public void addPatternsSmall(Node predicate, double numProp)
Add patterns based solely on the predicate count and some guessing for a small graph (less than a few thousand triples)
-
addPattern
public void addPattern(Pattern pattern)
-
match
public double match(Triple t)
-
match
public double match(PatternTriple pTriple)
-
match
public double match(Item subj, Item pred, Item obj)
Return the matching weight for the first triple match found, else apply default value for fixed, unknown predicate, else return NOMATCH
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
printSSE
public void printSSE(java.io.OutputStream ps)
-
-