final String url = "http://www.bbc.co.uk/nature/life/Human";
Model model = ModelFactory.createDefaultModel();
model.read(url, "RDF/XML");
Exception in thread "main" org.apache.jena.riot.RiotException: [line: 25, col: 6 ] {E202} Cannot have both string data "Great white sharks are at the very top of the marine food chain. Feared as man-eaters, they are only responsible for about 5-10 attacks a year, which are rarely fatal. Great whites are ultimate predators. Powerful streamlined bodies and a mouth full of terrifyingly sharp, serrated teeth, combine with super senses that can detect a single drop of blood from over a mile away. Hiding from a great white isn't an option as they can detect and home in on small electrical discharges from hearts and gills. Unlike most other sharks, live young are born that immediately swim away.
" and XML data <br> inside a property element. Maybe you want rdf:parseType='Literal'.
然后连空白节点都是嵌套的,这是我不想要的。有什么方法可以使用Jena获得这种结构吗?或者有没有其他的Java库可以更好地处理这一点?
我需要帮助从RDF和Jena框架中获取一些信息。我有一个RDF内容是这样的: 我如何提取值test_id_test???如果我想用SPARQL,我怎么用Jena???
其中url是RDF/XML web文档。
这些天来我一直在读关于OWL本体和RDF文件的文章。我还是不能理解这一点。 假设我使用Protege创建了一个简单的本体。它有一个称为Review的类,具有两个数据属性,即comment和rating。 后面的行返回NULL。 这里面有什么问题?
下面是java代码: 这有帮助吗?我真的不知道了...
我想把xml文件转换成RDF。我认为JENA GRDDL可以使用,但我不知道它是如何工作的!我没有找到任何例子!你能帮助我请开始使用这个API或显示我任何可能的解决方案!