关于我的previous post, 现在,当我在测试时,progFields在下面:
System.Reflection.FieldInfo[] progFields = typeof(Program).GetFields();
什么都不返回。我关于程序的本体是这样的:
<owl:Class rdf:about="http://www.owl-ontologies.com/Ontology1243411901.owl#Program">
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<owl:disjointWith rdf:resource="http://www.owl-ontologies.com/Ontology1243411901.owl#Student"/>
<owl:disjointWith rdf:resource="http://www.owl-ontologies.com/Ontology1243411901.owl#Teacher"/>
<owl:disjointWith rdf:resource="http://www.owl-ontologies.com/Ontology1243411901.owl#Rank"/>
<owl:disjointWith rdf:resource="http://www.owl-ontologies.com/Ontology1243411901.owl#Course"/>
<owl:disjointWith>
<owl:Class rdf:about="http://www.owl-ontologies.com/Ontology1243411901.owl#LearningResource"/>
</owl:disjointWith>
<owl:disjointWith rdf:resource="http://www.owl-ontologies.com/Ontology1243411901.owl#ResourceAuthor"/>
<owl:disjointWith rdf:resource="http://www.owl-ontologies.com/Ontology1243411901.owl#Note"/>
<owl:disjointWith rdf:resource="http://www.owl-ontologies.com/Ontology1243411901.owl#ClassOfCourse"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<owl:ObjectProperty rdf:about="http://www.owl-ontologies.com/Ontology1243411901.owl#atGrade"/>
</owl:onProperty>
<owl:allValuesFrom rdf:resource="http://www.owl-ontologies.com/Ontology1243411901.owl#Grade"/>
</owl:Restriction>
</rdfs:subClassOf>
<owl:disjointWith>
<owl:Class rdf:about="http://www.owl-ontologies.com/Ontology1243411901.owl#Project"/>
</owl:disjointWith>
并在文件末尾定义了它的集合:
<owl:AllDifferent>
<owl:distinctMembers rdf:parseType="Collection">
<Program rdf:about="http://www.owl-ontologies.com/Ontology1243411901.owl#Information_Technology"/>
<Program rdf:about="http://www.owl-ontologies.com/Ontology1243411901.owl#Software"/>
<Program rdf:about="http://www.owl-ontologies.com/Ontology1243411901.owl#Management"/>
<Program rdf:about="http://www.owl-ontologies.com/Ontology1243411901.owl#Literature"/>
</owl:distinctMembers>
</owl:AllDifferent>
本体由Protege制作。你能帮忙吗
答案 0 :(得分:3)
由于您的Program类不是enumerated OWL class,因此您将获得零字段。
根问题是你的本体表达了程序不是什么,而不是说它是什么。这没有错,只是不是你想要的。我是一个人,我可以弄清楚你想要什么(即你有4个,只有4个程序,它们都不同),但你的本体并没有说。您的本体论述如下:
但是你可以拥有许多其他人,不仅仅是IT,SW,Mgmt和Literature。因此,ROWLEX不会将Program类公开为枚举类。
如果让您的Program类成为真enumerated OWL class.
,ROWLEX将生成静态字段