本文整理汇总了Java中org.apache.jena.shared.JenaException类的典型用法代码示例。如果您正苦于以下问题:Java JenaException类的具体用法?Java JenaException怎么用?Java JenaException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JenaException类属于org.apache.jena.shared包,在下文中一共展示了JenaException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: record_add_abort_1
import org.apache.jena.shared.JenaException; //导入依赖的package包/类
@Test public void record_add_abort_1() {
setup();
try {
txn(graph, ()->{
graph.add(triple1);
throw new JenaException("Abort!");
});
} catch (JenaException ex) {}
Graph g2 = replay();
check(g2);
}
开发者ID:afs,项目名称:rdf-delta,代码行数:12,代码来源:TestRDFChangesGraph.java
示例2: main
import org.apache.jena.shared.JenaException; //导入依赖的package包/类
public static void main(String... argv)
{
String assemblerFile = "Store/tdb-assembler.ttl" ;
// Find a particular description in the file where there are several:
Model spec = RDFDataMgr.loadModel(assemblerFile) ;
// Find the right starting point for the description in some way.
Resource root = null ;
if ( false )
// If you know the Resource URI:
root = spec.createResource("http://example/myChoiceOfURI" );
else
{
// Alternatively, look for the a single resource of the right type.
try {
// Find the required description - the file can contain descriptions of many different types.
root = GraphUtils.findRootByType(spec, VocabTDB.tDatasetTDB) ;
if ( root == null )
throw new JenaException("Failed to find a suitable root") ;
} catch (TypeNotUniqueException ex)
{ throw new JenaException("Multiple types for: "+DatasetAssemblerVocab.tDataset) ; }
}
Dataset ds = (Dataset)Assembler.general.open(root) ;
}
开发者ID:xcurator,项目名称:xcurator,代码行数:28,代码来源:ExTDB3.java
示例3: testMultipleInputFiles
import org.apache.jena.shared.JenaException; //导入依赖的package包/类
@Test
public void testMultipleInputFiles() throws IOException {
String query = "SELECT * FROM <x> <y> {}";
try {
TarqlQuery tq = new TarqlParser(new StringReader(query), null).getResult();
assertSelect(tq);
fail("Expected exception due to multiple input files in query");
} catch (JenaException ex) {
// Expected
}
}
开发者ID:tarql,项目名称:tarql,代码行数:12,代码来源:TarqlTest.java
注:本文中的org.apache.jena.shared.JenaException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论