当前位置: 首页>>代码示例>>Java>>正文


Java FindQuery类代码示例

本文整理汇总了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;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:13,代码来源:ClassMapLister.java

示例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;
   }
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:15,代码来源:GraphD2RQ.java

示例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;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:39,代码来源:ResourceDescriber.java


注:本文中的de.fuberlin.wiwiss.d2rq.find.FindQuery类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。