Jena RDF模型联合方法

时间:2018-07-13 13:17:20

标签: graph rdf jena

我是耶拿(Jena)的新手,我现在正在使用让(Jean)构造一些有趣的用户图,包括人员实体及其一些关系,但是,当我使用耶拿(Jena)的Model接口时,我总是遇到异常:

Exception in thread "main" org.apache.jena.atlas.lib.InternalErrorException: Invalid id node for object (null node): ([0000000000B5C8BA], [00000000000002E2], [0000000000B5C91A])
    at org.apache.jena.tdb.lib.TupleLib.triple(TupleLib.java:109)
    at org.apache.jena.tdb.lib.TupleLib.triple(TupleLib.java:84)
    at org.apache.jena.tdb.lib.TupleLib.lambda$convertToTriples$2(TupleLib.java:54)
    at org.apache.jena.tdb.lib.TupleLib$$Lambda$43/54162225.apply(Unknown Source)
    at org.apache.jena.atlas.iterator.Iter$2.next(Iter.java:270)
    at org.apache.jena.atlas.iterator.Iter$2.next(Iter.java:270)
    at org.apache.jena.atlas.iterator.Iter$2.next(Iter.java:270)
    at org.apache.jena.atlas.iterator.Iter.next(Iter.java:891)
    at org.apache.jena.util.iterator.WrappedIterator.next(WrappedIterator.java:94)
    at org.apache.jena.util.IteratorCollection.iteratorToList(IteratorCollection.java:63)
    at org.apache.jena.graph.GraphUtil.addIteratorWorker(GraphUtil.java:144)
    at org.apache.jena.graph.GraphUtil.addInto(GraphUtil.java:139)
    at org.apache.jena.rdf.model.impl.ModelCom.add(ModelCom.java:225)
    at org.apache.jena.rdf.model.impl.ModelCom.union(ModelCom.java:1502)

每当我尝试在union界面中使用Model方法时都会发生此异常,例如:

val newModel = model_1.union(model_2)

有人可以给些提示吗?

谢谢!

0 个答案:

没有答案