Class StringAlignments
java.lang.Object
org.aksw.jenax.sparql.expr.optimize.util.StringAlignments
Methods for rewriting two sequences of expressions as they occurr in
equality of concat expressions, i.e.
"CONCAT(a1...an) = CONCAT(b1...bm)" where ai and bi may be variables and (string) constants.
The code tries to generate multiple matches on a best effort basis.
- Author:
- raven
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidalignRec(List<org.apache.jena.sparql.expr.Expr> a, int oa, List<org.apache.jena.sparql.expr.Expr> b, int ob, List<List<org.apache.jena.sparql.expr.Expr>> result) static List<org.apache.jena.sparql.expr.Expr>copyReplace(List<org.apache.jena.sparql.expr.Expr> a, int itemIndex, String[] parts) static intindexOfFirstConstant(List<org.apache.jena.sparql.expr.Expr> a, int offset) static org.apache.jena.sparql.expr.ExproptimizeEqualsConcat2(List<org.apache.jena.sparql.expr.Expr> la, List<org.apache.jena.sparql.expr.Expr> lb) static String[]toAlignment(List<org.apache.jena.sparql.expr.Expr> a, List<List<org.apache.jena.sparql.expr.Expr>> bs)
-
Constructor Details
-
StringAlignments
public StringAlignments()
-
-
Method Details
-
toAlignment
-
align
-
indexOfFirstConstant
-
copyReplace
public static List<org.apache.jena.sparql.expr.Expr> copyReplace(List<org.apache.jena.sparql.expr.Expr> a, int itemIndex, String[] parts) - Parameters:
a-i- index of a constantj- position within the string of the constant- Returns:
-
split
-
alignRec
public static void alignRec(List<org.apache.jena.sparql.expr.Expr> a, int oa, List<org.apache.jena.sparql.expr.Expr> b, int ob, List<List<org.apache.jena.sparql.expr.Expr>> result) - Parameters:
a- The longer arrayb- The shorter one
-
optimizeEqualsConcat2
-