Jena奇怪地认为个人rdf:type是随机个体的“#NamedIndividual”

时间:2017-07-16 22:16:25

标签: rdf jena owl ontology

每当我在某些人身上调用“.getOntClass()”时,我都注意到Jena给了我一个转换错误。我做了一些进一步的测试,当我在某些人上调用“.getRDFType()”时,它错误地返回“http://www.w3.org/2002/07/owl#NamedIndividual”而不是本体中陈述的正确的rdf:类型。以下是本体中涉及的个人:

<owl:NamedIndividual rdf:about="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000250">
    <rdf:type rdf:resource="http://infoneer.txstate.edu/ontology/MSDL_0000076"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000370"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000542"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000550"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000602"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000603"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000604"/>
    <msdl:MSDL_0000179 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL_0000154"/>
    <rdfs:label xml:lang="en">Haas-DM1VerticalMill</rdfs:label>
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000256">
    <rdf:type rdf:resource="http://infoneer.txstate.edu/ontology/MSDL_0000076"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000544"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000549"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000551"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000605"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000606"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000607"/>
    <msdl:MSDL_0000179 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL_0000154"/>
    <rdfs:label xml:lang="en">Haas-DM2VerticalMill</rdfs:label>
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="http://infoneer.txstate.edu/ontology/MSDL_0000155">
    <rdf:type rdf:resource="http://infoneer.txstate.edu/ontology/MSDL_0000076"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL_0000128"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000581"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000601"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000608"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000609"/>
    <msdl:MSDL_0000130 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL#MSDL_0000610"/>
    <msdl:MSDL_0000179 rdf:resource="http://infoneer.txstate.edu/ontology/MSDL_0000154"/>
    <rdfs:label xml:lang="en">Haas-VF1VerticalMill</rdfs:label>
</owl:NamedIndividual>

当我在其上调用“.getRDFType()”时,第一个人(Haas-DM1VerticalMill)正确返回“http://infoneer.txstate.edu/ontology/MSDL_0000076”。但另外两个人(Haas-DM2VerticalMill和Haas-VF1VerticalMill)错误地返回“http://www.w3.org/2002/07/owl#NamedIndividual”而不是“http://infoneer.txstate.edu/ontology/MSDL_0000076”。

奇怪的是,当我摆脱两个问题个体中的“msdl:MSDL_0000179 rdf:resource =”http://infoneer.txstate.edu/ontology/MSDL_0000154“”这一行时,“。getRDFType()”返回“ http://infoneer.txstate.edu/ontology/MSDL_0000076“应该如此。我不知道为什么会这样,特别是考虑到Haas-DM1个人也有这条线,并且包含它的工作正常。

将严格模式设置为false不会改变任何内容。有什么帮助吗?

0 个答案:

没有答案