diff --git a/src/main/java/fr/inria/corese/core/compiler/parser/Transformer.java b/src/main/java/fr/inria/corese/core/compiler/parser/Transformer.java index 2c9dda760..b4ee704b9 100755 --- a/src/main/java/fr/inria/corese/core/compiler/parser/Transformer.java +++ b/src/main/java/fr/inria/corese/core/compiler/parser/Transformer.java @@ -10,7 +10,6 @@ import fr.inria.corese.core.kgram.core.Query; import fr.inria.corese.core.kgram.core.*; import fr.inria.corese.core.sparql.api.IDatatype; -import fr.inria.corese.core.sparql.compiler.java.JavaCompiler; import fr.inria.corese.core.sparql.exceptions.EngineException; import fr.inria.corese.core.sparql.exceptions.SafetyException; import fr.inria.corese.core.sparql.triple.cst.RDFS; @@ -21,7 +20,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -113,16 +111,6 @@ public class Transformer implements ExpType { functionCompiler = new FunctionCompiler(this); } - Transformer(CompilerFactory f) { - this(); - fac = f; - compiler = fac.newInstance(); - } - - public static Transformer create(CompilerFactory f) { - return new Transformer(f); - } - public static Transformer create() { return new Transformer(); } @@ -388,20 +376,6 @@ void metadata(ASTQuery ast, Query q) { } } - @Deprecated - void toJava(ASTQuery ast) throws EngineException { - if (ast.hasMetadata(Metadata.Type.COMPILE)) { - String name = ast.getMetadata().getValue(Metadata.Type.COMPILE); - JavaCompiler jc = new JavaCompiler(name); - try { - jc.compile(ast); - jc.write(); - } catch (IOException ex) { - logger.error(ex.getMessage()); - } - } - } - void visit(ASTQuery ast) { visitor(ast); if (getVisitorList() != null) { @@ -581,11 +555,6 @@ void error(Query q, ASTQuery ast) throws EngineException { getFunctionCompiler().undefinedFunction(q, ast, ast.getLevel()); } - - public void imports(Query q, String path) throws EngineException { - getFunctionCompiler().imports(q, q.getAST(), path); - } - public boolean getLinkedFunction(String label) throws EngineException { return getFunctionCompiler().getLinkedFunction(label); } @@ -851,14 +820,6 @@ Exp compileService(Service service) throws EngineException { return exp; } - Query create(Exp exp) { - Query q = Query.create(exp); - if (sort != null) { - q.set(sort); - } - return q; - } - Exp compileValues(Values val, boolean opt, int level) { Exp exp = compileValues(val); if (exp == null) { @@ -968,10 +929,6 @@ Mapping create(Node[] lNode, List lVal) { return Mapping.safeCreate(lNode, nodes); } - Exp construct(ASTQuery ast) throws EngineException { - return compile(ast, ast.getInsert()); - } - Exp delete(ASTQuery ast) throws EngineException { return compile(ast, ast.getDelete()); } @@ -984,10 +941,6 @@ public void setAST(ASTQuery ast) { this.ast = ast; } - public Compiler getCompiler() { - return compiler; - } - void complete(Query qCurrent, ASTQuery ast) throws EngineException { qCurrent.collect(); select(qCurrent, ast); @@ -1199,10 +1152,6 @@ Node getNode(Query qCurrent, Variable variable) { return node; } - ASTQuery getAST(Query q) { - return q.getAST(); - } - Node getProperAndSubSelectNode(Query q, String name) { Node node; if (Query.test) { @@ -1834,19 +1783,6 @@ public FunctionCompiler getFunctionCompiler() { return functionCompiler; } - public void setFunctionCompiler(FunctionCompiler functionCompiler) { - this.functionCompiler = functionCompiler; - } - - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - int incrNumber() { return number++; } @@ -1899,10 +1835,6 @@ public void setVisitorList(List visit) { this.visit = visit; } - public boolean isSPARQLCompliant() { - return isSPARQLCompliant; - } - public void setSPARQLCompliant(boolean b) { isSPARQLCompliant = b; }