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


Java TripleMatch.asTriple方法代码示例

本文整理汇总了Java中com.hp.hpl.jena.graph.TripleMatch.asTriple方法的典型用法代码示例。如果您正苦于以下问题:Java TripleMatch.asTriple方法的具体用法?Java TripleMatch.asTriple怎么用?Java TripleMatch.asTriple使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.hp.hpl.jena.graph.TripleMatch的用法示例。


在下文中一共展示了TripleMatch.asTriple方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: graphBaseFind

import com.hp.hpl.jena.graph.TripleMatch; //导入方法依赖的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.getTripleRelations(), 
			new ExecutionContext(mapping.getContext(), this, null, null));
	ExtendedIterator<Triple> result = TripleQueryIter.create(query.iterator());
	result = result.andThen(mapping.getAdditionalTriples().find(t));
	return result;
   }
 
开发者ID:d2rq,项目名称:r2rml-kit,代码行数:14,代码来源:GraphD2RQ.java

示例2: graphBaseFind

import com.hp.hpl.jena.graph.TripleMatch; //导入方法依赖的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: and

import com.hp.hpl.jena.graph.TripleMatch; //导入方法依赖的package包/类
/** 
    Answer an ExtendedIterator returning all the triples from this store that
    match the pattern <code>m = (S, P, O)</code>.
    
    <p>Because the node-to-triples maps index on each of subject, predicate,
    and (non-literal) object, concrete S/P/O patterns can immediately select
    an appropriate map. Because the match for literals must be by sameValueAs,
    not equality, the optimisation is not applied for literals. [This is probably a
    Bad Thing for strings.]
    
    <p>Practice suggests doing the predicate test <i>last</i>, because there are
    "usually" many more statements than predicates, so the predicate doesn't
    cut down the search space very much. By "practice suggests" I mean that
    when the order went, accidentally, from S/O/P to S/P/O, performance on
    (ANY, P, O) searches on largish models with few predicates declined
    dramatically - specifically on the not-galen.owl ontology.
*/
public ExtendedIterator<Triple> find( TripleMatch tm )
    {
    Triple t = tm.asTriple();
    Node pm = t.getPredicate();
    Node om = t.getObject();
    Node sm = t.getSubject();
        
    if (sm.isConcrete())
        return new StoreTripleIterator( parent, subjects.iterator( sm, pm, om ), subjects, predicates, objects );
    else if (om.isConcrete())
        return new StoreTripleIterator( parent, objects.iterator( om, sm, pm ), objects, subjects, predicates );
    else if (pm.isConcrete())
        return new StoreTripleIterator( parent, predicates.iterator( pm, om, sm ), predicates, subjects, objects );
    else
        return new StoreTripleIterator( parent, subjects.iterateAll(), subjects, predicates, objects );
    }
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:34,代码来源:GraphTripleStoreBase.java


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