fr.lirmm.graphik.integraal.core.DefaultEffectiveQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of integraal-graal-ruleset-analysis Show documentation
Show all versions of integraal-graal-ruleset-analysis Show documentation
Rule base analysis for InteGraal. This is imported from Graal
The newest version!
package fr.lirmm.graphik.integraal.core;
import fr.lirmm.graphik.integraal.api.core.EffectiveQuery;
import fr.lirmm.graphik.integraal.api.core.Query;
import fr.lirmm.graphik.integraal.api.core.Substitution;
import fr.lirmm.graphik.util.string.AppendableToStringBuilder;
public class DefaultEffectiveQuery implements EffectiveQuery, AppendableToStringBuilder {
Q query;
S substitution;
public DefaultEffectiveQuery(Q q, S s) {
query = q;
substitution = s;
}
@Override
public S getSubstitution() {
return substitution;
}
@Override
public Q getQuery() {
return query;
}
// /////////////////////////////////////////////////////////////////////////
// OBJECT METHODS
// /////////////////////////////////////////////////////////////////////////
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
this.appendTo(sb);
return sb.toString();
}
@Override
public void appendTo(StringBuilder sb) {
sb.append(getClass().getSimpleName() + ": ");
sb.append(getQuery());
sb.append(getSubstitution());
sb.append("\n");
}
}