本文整理汇总了Java中com.hp.hpl.jena.rdf.model.impl.ModelCom.asRDFNode方法的典型用法代码示例。如果您正苦于以下问题:Java ModelCom.asRDFNode方法的具体用法?Java ModelCom.asRDFNode怎么用?Java ModelCom.asRDFNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hp.hpl.jena.rdf.model.impl.ModelCom
的用法示例。
在下文中一共展示了ModelCom.asRDFNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: asResIterator
import com.hp.hpl.jena.rdf.model.impl.ModelCom; //导入方法依赖的package包/类
/**
* <p>Method that creates an iterator of resources</p>
* @param i - an iterator of resources as input
* @param m - the underlying model to use in the mapping
* @return a ResIterator
*/
public static ResIterator asResIterator( Iterator<Resource> i, final ModelCom m )
{
Map1<Resource, Resource> asResource = new Map1<Resource, Resource>()
{
public Resource map1( Resource o )
{ return (Resource) m.asRDFNode( o.asNode() ); }
};
return new ResIteratorImpl( WrappedIterator.create( i ).mapWith( asResource ), null );
}
示例2: asRDFNodeIterator
import com.hp.hpl.jena.rdf.model.impl.ModelCom; //导入方法依赖的package包/类
/**
* <p>Method that creates an iterator of rdf nodes</p>
* @param i - an iterator of rdf nodes as input
* @param m - the underlying model to use in the mapping
* @return a NodeIterator
*/
static public NodeIterator asRDFNodeIterator( Iterator<RDFNode> i, final ModelCom m )
{
Map1<RDFNode, RDFNode> asRDFNode = new Map1<RDFNode, RDFNode>()
{
public RDFNode map1( RDFNode o )
{ return m.asRDFNode( o.asNode() ); }
};
return new NodeIteratorImpl( WrappedIterator.create( i ).mapWith( asRDFNode ), null );
}