本文整理汇总了Java中org.hawk.core.query.InvalidQueryException类的典型用法代码示例。如果您正苦于以下问题:Java InvalidQueryException类的具体用法?Java InvalidQueryException怎么用?Java InvalidQueryException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InvalidQueryException类属于org.hawk.core.query包,在下文中一共展示了InvalidQueryException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: contextlessQuery
import org.hawk.core.query.InvalidQueryException; //导入依赖的package包/类
protected Object contextlessQuery(IModelIndexer m, String query, Map<String, Object> context)
throws QueryExecutionException, InvalidQueryException {
final long trueStart = System.currentTimeMillis();
String defaultnamespaces = null;
if (context != null)
defaultnamespaces = (String) context.get(PROPERTY_DEFAULTNAMESPACES);
/*
* We need to always create a new engine for every query: reusing the
* same engine would be thread-unsafe.
*/
final EOLQueryEngine q = new EOLQueryEngine();
try {
q.load(m);
q.setDefaultNamespaces(defaultnamespaces);
} catch (EolModelLoadingException e) {
throw new QueryExecutionException("Loading of EOLQueryEngine failed");
}
final IEolModule module = createModule();
parseQuery(query, context, q, module);
return runQuery(trueStart, module);
}
示例2: contextfulQuery
import org.hawk.core.query.InvalidQueryException; //导入依赖的package包/类
protected Object contextfulQuery(IModelIndexer m, String query, Map<String, Object> context)
throws QueryExecutionException, InvalidQueryException {
final long trueStart = System.currentTimeMillis();
CEOLQueryEngine q = new CEOLQueryEngine();
try {
q.load(m);
} catch (EolModelLoadingException e) {
throw new QueryExecutionException("Loading of EOLQueryEngine failed");
}
q.setContext(context);
LOGGER.debug("Graph path: {}", graph.getPath());
final IEolModule module = createModule();
parseQuery(query, context, q, module);
return runQuery(trueStart, module);
}
示例3: calculateDerivedAttributes
import org.hawk.core.query.InvalidQueryException; //导入依赖的package包/类
@Override
public IAccessListener calculateDerivedAttributes(IModelIndexer m,
Iterable<IGraphNode> nodes) throws InvalidQueryException,
QueryExecutionException {
// this dummy query engine does *not* update derived attributes
// -- we're just a client.
return null;
}
示例4: parseQuery
import org.hawk.core.query.InvalidQueryException; //导入依赖的package包/类
protected void parseQuery(String query, Map<String, Object> context, final EOLQueryEngine model,
final IEolModule module) throws InvalidQueryException {
try {
if (enableDebugOutput) {
System.out.println("PARSING:\n----------\n" + name == null ? "QUERY" : name + "\n----------");
System.out.println("Graph path: " + graph.getPath() + "\n----------");
}
module.parse(query);
} catch (Exception ex) {
throw new InvalidQueryException(ex);
}
module.getContext().getModelRepository().addModel(model);
addQueryArguments(context, module);
}
示例5: eol
import org.hawk.core.query.InvalidQueryException; //导入依赖的package包/类
protected Object eol(final String eolQuery) throws InvalidQueryException, QueryExecutionException {
return eol(eolQuery, null);
}
示例6: calculateDerivedAttributes
import org.hawk.core.query.InvalidQueryException; //导入依赖的package包/类
@Override
public IAccessListener calculateDerivedAttributes(IModelIndexer m, Iterable<IGraphNode> nodes)
throws InvalidQueryException, QueryExecutionException {
throw new UnsupportedOperationException();
}