私はオントロジーを持っています。これを Jena と一緒に読み込んで、Web サイトから RDFa トリプルをスクレイピングするのに役立てました。私は現在、これらのトリプルを Jena モデルに保存していませんが、それは非常に簡単で、次のリストに載っています。
しかし、私が苦労している領域は、私が持っているオントロジーの正しい RDF を Jena に出力させることです。オントロジーは Owl と RDFS の定義を使用していますが、いくつかのサンプル トリプルをモデルに渡すと、正しく表示されません。あたかもオントロジーについて何も知らないかのように。ただし、出力は依然として有効な RDF ですが、期待した形式で出力されていません。
オントロジーに基づいて、私が収集したトリプルについて、Jena が適切に記述された RDF (有効なだけでなく) を生成できるはずであるという考えは正しいですか?
ご意見をお寄せいただきありがとうございます。
更新 1
例:
これは私たちが現在持っているものです:
<rdf:Description rdf:about='http://theinternet.com/%3fq=Club/325'>
<j.0:hasName>Manchester United</j.0:hasName>
<j.0:hasPlayer>
<rdf:Description rdf:about='http://theinternet.com/%3fq=player/291/'>
</rdf:Description>
</j.0:hasPlayer>
<j.0:hasEmblem>http://theinternet.com/images/manutd.jpg</j.0:hasEmblem>
<j.0:hasWebsite>http://www.manutd.com/</j.0:hasWebsite>
</rdf:Description>
</rdf:RDF>
これは私たちが理想的に望むものです:
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:ontology="http://theinternet.com/ontology.rdf#">
<rdf:Description rdf:about='http://theinternet.com/%3fq=Club/325'>
<rdf:type rdf:resource='ontology:Club' />
<ontology:hasName>Manchester United</ontology:hasName>
<ontology:hasPlayer>
<rdf:Description rdf:about='http://theinternet.com/%3fq=player/291/'>
<rdf:type rdf:resource='ontology:Player' />
</rdf:Description>
</ontology:hasPlayer>
<ontology:hasEmblem>http://theinternet.com/images/manutd.jpg</ontology:hasEmblem>
<ontology:hasWebsite>http://www.manutd.com/</ontology:hasWebsite>
</rdf:Description>
</rdf:RDF>
私には、リソースタイプなど、オントロジーに関係するものがJenaに欠けているように見えます.Jenaを間違って使用していると感じています。