tools.service.CommonOps Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brunner-core-tools Show documentation
Show all versions of brunner-core-tools Show documentation
Tools module for the BRunner project
The newest version!
package tools.service;
import tools.service.metadata.DefaultOperationMetadata;
import tools.service.metadata.IOperationMetadata;
/**
* Enumeration of operations related to data manipulation and query processing.
*/
public enum CommonOps implements IOperationMetadata {
/** Read the data and load them. */
FACTBASE_LOADING("data_loading", "load data from file"),
/** Read the rules and load them. */
RULE_LOADING("rule_loading", "load rules from file"),
/** Read the queries and load them. */
QUERY_LOADING("query_loading", "load queries from file"),
/** Read the facts and rules and load them together. */
KB_LOADING("KB_loading", "knowledge base loading"),
/** Build a chase object. */
BUILD_CHASE("build_chase", "build chase object"),
/** Build a query rewriter object. */
BUILD_REWRITER("build_query_rewriter", "build query rewriter object"),
/** Build a query evaluator object. */
BUILD_QUERY_EVALUATOR("build_query_evaluator", "build query evaluator object"),
/** Build a query explanator object. */
BUILD_EXPLANATOR("build_explanator", "build an explanator object"),
/** Execute a chase. */
EXECUTE_CHASE("execute_chase", "run the chase"),
/** Encode input data -- CSV only. */
ENCODE_DATA("encode_data", "compute encoding of input data"),
/** Evaluation of a query or a set of queries. */
QUERY_EVALUATION("query_evaluation", "evaluate query"),
/** Evaluation of a query or a set of queries. */
BATCH_QUERY_EVALUATION("query_evaluation", "evaluate a batch of queries"),
/** Compile rules. */
COMPILE_RULES("compile_rules", "compile a set of rules"),
/** Rewrite a query. */
QUERY_REWRITING("query_rewriting", "rewriting a single query"),
/** Rewrite a query. */
BATCH_QUERY_REWRITING("query_rewriting", "rewriting a batch of queries"),
/** Explain a Fact. */
EXPLAIN_FACT("fact_explanation", "explaining a single fact"),
/** Explain a Query. */
EXPLAIN_QUERY("query_explanation", "explain a single fact"),
/** Explain a Query. */
BUILD_GCNF_DICTIONARY("build_GCNF", "build a GCNF formula from entailment graph");
/** The identifier for the operation. */
private final DefaultOperationMetadata metadata;
/**
*
* Constructor initializes metadata record
*
* @param serializationKey
* @param description
* @param recordTheMeasureTakenForThisOperation
*/
CommonOps(String serializationKey, String description, boolean recordTheMeasureTakenForThisOperation) {
metadata = new DefaultOperationMetadata(serializationKey, description, recordTheMeasureTakenForThisOperation);
}
CommonOps(String serializationKey, String description) {
this(serializationKey, description, true);
}
@Override
public IOperationMetadata getMetadata() {
return metadata;
}
}