本文整理汇总了Java中de.fuberlin.wiwiss.d2rq.find.FindQuery类的典型用法代码示例。如果您正苦于以下问题:Java FindQuery类的具体用法?Java FindQuery怎么用?Java FindQuery使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FindQuery类属于de.fuberlin.wiwiss.d2rq.find包,在下文中一共展示了FindQuery类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: classMapInventory
import de.fuberlin.wiwiss.d2rq.find.FindQuery; //导入依赖的package包/类
public Model classMapInventory(String classMapName, int limitPerClassMap) {
log.info("Listing class map: " + classMapName);
List<TripleRelation> inventoryBridges = classMapInventoryBridges.get(classMapName);
if (inventoryBridges == null) {
return null;
}
Model result = ModelFactory.createDefaultModel();
result.setNsPrefixes(mapping.getPrefixMapping());
FindQuery query = new FindQuery(Triple.ANY, inventoryBridges, limitPerClassMap, null);
result.getGraph().getBulkUpdateHandler().add(TripleQueryIter.create(query.iterator()));
return result;
}
示例2: graphBaseFind
import de.fuberlin.wiwiss.d2rq.find.FindQuery; //导入依赖的package包/类
@Override
public ExtendedIterator<Triple> graphBaseFind(TripleMatch m) {
checkOpen();
Triple t = m.asTriple();
if (log.isDebugEnabled()) {
log.debug("Find: " + PrettyPrinter.toString(t, getPrefixMapping()));
}
FindQuery query = new FindQuery(t, mapping.compiledPropertyBridges(), null);
ExtendedIterator<Triple> result = TripleQueryIter.create(query.iterator());
if (mapping.configuration().getServeVocabulary()) {
result = result.andThen(mapping.getVocabularyModel().getGraph().find(t));
}
return result;
}
示例3: description
import de.fuberlin.wiwiss.d2rq.find.FindQuery; //导入依赖的package包/类
public Graph description() {
if (executed) return result;
executed = true;
final QueryIterConcat qIter = new QueryIterConcat(context);
Pingback<?> pingback = null;
if (timeout > 0) {
pingback = AlarmClock.get().add(new Callback<Object>() {
public void proc(Object ignore) {
qIter.cancel();
}
}, timeout);
}
FindQuery outgoing = new FindQuery(
Triple.create(node, Node.ANY, Node.ANY),
mapping.compiledPropertyBridges(), limit, context);
qIter.add(outgoing.iterator());
if (!onlyOutgoing) {
FindQuery incoming = new FindQuery(
Triple.create(Node.ANY, Node.ANY, node),
mapping.compiledPropertyBridges(), limit, context);
qIter.add(incoming.iterator());
FindQuery triples = new FindQuery(
Triple.create(Node.ANY, node, Node.ANY),
mapping.compiledPropertyBridges(), limit, context);
qIter.add(triples.iterator());
}
result.getBulkUpdateHandler().add(TripleQueryIter.create(qIter));
if (pingback != null) {
AlarmClock.get().cancel(pingback);
}
return result;
}