Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 0 additions & 200 deletions src/main/java/fr/inria/corese/core/compiler/eval/QuerySolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import fr.inria.corese.core.kgram.event.EventManager;
import fr.inria.corese.core.kgram.event.ResultListener;
import fr.inria.corese.core.kgram.tool.MetaProducer;
import fr.inria.corese.core.sparql.api.IDatatype;
import fr.inria.corese.core.sparql.datatype.DatatypeMap;
import fr.inria.corese.core.sparql.exceptions.EngineException;
import fr.inria.corese.core.sparql.triple.function.term.Binding;
Expand Down Expand Up @@ -110,10 +109,6 @@ public static void setPlanDefault(int n) {
QUERY_PLAN = n;
}

public static void defaultNamespaces(String ns) {
NAMESPACES = ns;
}

public static void definePrefix(String pref, String ns) {
if (NAMESPACES == null) {
NAMESPACES = "";
Expand Down Expand Up @@ -162,10 +157,6 @@ public ContextLog getLog() {
return getCreateBinding().getCreateLog();
}

public ContextLog getCreateLog() {
return getCreateBinding().getCreateLog();
}

public void setVisitor(QueryVisitor v) {
addVisitor(v);
}
Expand All @@ -177,10 +168,6 @@ public void addVisitor(QueryVisitor v) {
visit.add(v);
}

public boolean hasVisitor() {
return visit != null && !visit.isEmpty();
}

public List<QueryVisitor> getVisitorList() {
return visit;
}
Expand All @@ -189,18 +176,10 @@ public void set(Provider p) {
provider = p;
}

public Provider getProvider() {
return provider;
}

public void setDefaultBase(String str) {
setBase(str);
}

public String getBase() {
return defaultBase;
}

public void setBase(String str) {
defaultBase = str;
}
Expand Down Expand Up @@ -385,16 +364,6 @@ public Environment getEnvironment() {
return getCurrentEval().getEnvironment();
}

public Context getContext() {
return getCreateBinding().getCreateContext();
}

public void finish() {
if (current != null) {
current.finish();
}
}

public Mappings modifier(Query q, Mappings map) throws SparqlException {
if (getCurrentEval() == null) {
logger.info("Undefined Eval");
Expand Down Expand Up @@ -483,11 +452,6 @@ public Eval createEval(Query q) throws EngineException {
return kgram;
}

@Deprecated
public IDatatype eval(String q) {
return DatatypeMap.TRUE;
}

void init(Query q) {
// use case: OWL RL kg:sparql(query) in a rule
// query is evaluated as a Rule
Expand Down Expand Up @@ -525,10 +489,6 @@ public Interpreter getEvaluator() {
return evaluator;
}

public Interpreter getInterpreter() {
return evaluator;
}

public ASTQuery getAST(Query q) {
return q.getAST();
}
Expand All @@ -553,11 +513,6 @@ public Query compile(String squery) throws EngineException {
return compile(squery, null);
}

// rule: construct where
public Query compileRule(String squery) throws EngineException {
return compileRule(squery, null);
}

void setParameter(Transformer transformer) {
transformer.setGenerateMain(isGenerateMain());
transformer.setNamespaces(NAMESPACES);
Expand All @@ -581,15 +536,6 @@ public Query compile(String squery, Dataset ds) throws EngineException {
return transformer.transform(squery);
}

public ASTQuery parse(String q) throws EngineException {
return parse(q, (Dataset) null);
}

public ASTQuery parse(String q, Dataset ds) throws EngineException {
Transformer transformer = createTransformer(ds);
return transformer.parse(q);
}

Transformer createTransformer(Dataset ds) {
Transformer transformer = transformer();
setParameter(transformer);
Expand Down Expand Up @@ -645,28 +591,6 @@ void pragma(Eval kgram, Query query) {
}
}

public void addPragma(String subject, String property, String value) {
Triple t = Triple.create(Constant.create(subject), Constant.create(property), Constant.create(value));
getPragma().add(t);
}

public void addPragma(String subject, String property, int value) {
Triple t = Triple.create(Constant.create(subject), Constant.create(property), Constant.create(value));
getPragma().add(t);
}

public void addPragma(String subject, String property, boolean value) {
Triple t = Triple.create(Constant.create(subject), Constant.create(property), Constant.create(value));
getPragma().add(t);
}

public void addPragma(Atom subject, Atom property, Atom value) {
if (getPragma() == null) {
setPragma(BasicGraphPattern.create());
}
getPragma().add(Triple.create(subject, property, value));
}

public void setListGroup(boolean b) {
isListGroup = b;
}
Expand All @@ -675,38 +599,14 @@ public void setListPath(boolean b) {
isListPath = b;
}

public void setCountPath(boolean b) {
isCountPath = b;
}

public void setPathLoop(boolean b) {
isCheckLoop = !b;
}

boolean isSPARQLCompliant() {
return isSPARQLCompliant;
}

public void setSPARQLCompliant(boolean isSPARQLCompliant) {
this.isSPARQLCompliant = isSPARQLCompliant;
}

public boolean isDebug() {
return isDebug;
}

public void setDebug(boolean b) {
isDebug = b;
}

public void setOptimize(boolean b) {
isOptimize = b;
}

public void setSlice(int n) {
slice = n;
}

public BasicGraphPattern getPragma() {
return pragma;
}
Expand All @@ -715,98 +615,27 @@ public void setPragma(BasicGraphPattern pragma) {
this.pragma = pragma;
}

public boolean isDetail() {
return isDetail;
}

public void setDetail(boolean isDetail) {
this.isDetail = isDetail;
}

/**
* @return the isSkolem
*/
public boolean isSkolem() {
return isSkolem;
}

/**
* @param isSkolem the isSkolem to set
*/
public void setSkolem(boolean isSkolem) {
this.isSkolem = isSkolem;
}

/**
* @return the isMatchBlank
*/
public boolean isMatchBlank() {
return isMatchBlank;
}

/**
* @param isMatchBlank the isMatchBlank to set
*/
public void setMatchBlank(boolean isMatchBlank) {
this.isMatchBlank = isMatchBlank;
}

/**
* @return the planner
*/
public int getPlanProfile() {
return planner;
}

/**
* @param planner the planner to set
*/
public void setPlanProfile(int planner) {
this.planner = planner;
}

/**
* @return the isPathType
*/
public boolean isPathType() {
return isPathType;
}

/**
* @param isPathType the isPathType to set
*/
public void setPathType(boolean isPathType) {
this.isPathType = isPathType;
}

/**
* @return the isStorePath
*/
public boolean isStorePath() {
return isStorePath;
}

/**
* @param isStorePath the isStorePath to set
*/
public void setStorePath(boolean isStorePath) {
this.isStorePath = isStorePath;
}

/**
* @return the isCachePath
*/
public boolean isCachePath() {
return isCachePath;
}

/**
* @param isCachePath the isCachePath to set
*/
public void setCachePath(boolean isCachePath) {
this.isCachePath = isCachePath;
}

// true = skip Lock ; false = with Lock
@Override
public boolean isSynchronized() {
Expand All @@ -823,18 +652,10 @@ public boolean isUseBind() {
return isUseBind;
}

public void setUseBind(boolean isUseBind) {
this.isUseBind = isUseBind;
}

public boolean isGenerateMain() {
return isGenerateMain;
}

public void setGenerateMain(boolean isGenerateMain) {
this.isGenerateMain = isGenerateMain;
}

public Query parseQuery(String path) throws EngineException {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
Expand All @@ -859,14 +680,6 @@ public void setMetadata(Metadata metadata) {
this.metadata = metadata;
}

public void set(Metadata metadata) {
this.metadata = metadata;
}

public boolean isRule() {
return isRule;
}

public void setRule(boolean rule) {
this.isRule = rule;
}
Expand All @@ -875,23 +688,10 @@ public boolean isAlgebra() {
return algebra;
}

/**
* BGP must be set to true
*
* @param algebra the algebra to set
*/
public void setAlgebra(boolean algebra) {
this.algebra = algebra;
}

public boolean isBGP() {
return isBGP;
}

public void setBGP(boolean BGP) {
this.isBGP = BGP;
}

@Override
public void getLinkedFunction(String uri) throws EngineException {
}
Expand Down