我使用Protege生成了OWL本体。我想使用OWL本体并创建RDF三元组,以使用Jena保存在三元组存储中。
我知道如何读写RDF,但我不知道如何为那些OWL类创建实例。例如:
我拥有的示例OWL本体
<owl:Class rdf:about="Person"/>
<owl:Class rdf:about="Animal"/>
<owl:DatatypeProperty rdf:about="salary">
<rdfs:domain rdf:resource="Person"/>
<rdfs:range rdf:resource="&xsd;real"/>
</owl:DatatypeProperty>
Run Code Online (Sandbox Code Playgroud)
需要RDF就是这样
<Person rdf:about="Jack">
<salary>1234</salary>
</Person>
Run Code Online (Sandbox Code Playgroud)