本文整理汇总了Java中org.apache.commons.rdf.simple.SimpleRDF类的典型用法代码示例。如果您正苦于以下问题:Java SimpleRDF类的具体用法?Java SimpleRDF怎么用?Java SimpleRDF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleRDF类属于org.apache.commons.rdf.simple包,在下文中一共展示了SimpleRDF类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: blanknode
import org.apache.commons.rdf.simple.SimpleRDF; //导入依赖的package包/类
@Test
public void blanknode() throws Exception {
BlankNode bnode = factory.createBlankNode();
System.out.println(bnode.equals(bnode));
System.out.println(bnode.equals(factory.createBlankNode()));
BlankNode b1 = factory.createBlankNode("b1");
System.out.println(b1.ntriplesString());
System.out.println(b1.equals(factory.createBlankNode("b1")));
System.out.println(b1.equals(new SimpleRDF().createBlankNode("b1")));
System.out.println(bnode.uniqueReference());
}
开发者ID:apache,项目名称:commons-rdf,代码行数:16,代码来源:UserGuideTest.java
示例2: data
import org.apache.commons.rdf.simple.SimpleRDF; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Parameters(name = "{index}: {0}->{1}")
public static Collection<Object[]> data() {
final List<Class> factories = Arrays.asList(SimpleRDF.class, JenaRDF.class, RDF4J.class, JsonLdRDF.class);
final Collection<Object[]> allToAll = new ArrayList<>();
for (final Class from : factories) {
for (final Class to : factories) {
// NOTE: we deliberately include self-to-self here
// to test two instances of the same implementation
allToAll.add(new Object[] { from, to });
}
}
return allToAll;
}
开发者ID:apache,项目名称:commons-rdf,代码行数:15,代码来源:AllToAllTest.java
示例3: createRDFTermFactory
import org.apache.commons.rdf.simple.SimpleRDF; //导入依赖的package包/类
/**
* Create a new {@link RDF} for a parse session.
* <p>
* This is called by {@link #parse()} to set {@link #rdfTermFactory(RDF)} if
* it is {@link Optional#empty()}.
* <p>
* As parsed blank nodes might be made with
* {@link RDF#createBlankNode(String)}, each call to this method SHOULD
* return a new RDF instance.
*
* @return A new {@link RDF}
*/
protected RDF createRDFTermFactory() {
return new SimpleRDF();
}
开发者ID:apache,项目名称:commons-rdf,代码行数:16,代码来源:AbstractRDFParser.java
注:本文中的org.apache.commons.rdf.simple.SimpleRDF类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论