可以对在FOAF (http://xmlns.com/foaf/spec/)中找到的类进行子类分类吗?我尝试了下面的代码,但我不确定这是否是正确的方法。
<rdfs:Class rdf:ID="user">
<rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/#Agent" />
<rdfs:comment>
The class of users, subclass of foaf:Agent.
</rdfs:comment>
</rdfs:Class>发布于 2014-05-22 22:25:19
您的代码片段(虽然不是一个完整的RDF文档)是使yourdoc#user成为http://xmlns.com/foaf/0.1/#Agent子类的正确方法。但是,后者不是FOAF代理类。FOAF代理类由URI http://xmlns.com/foaf/0.1/Agent标识(没有#)。查看一下实际的FOAF本体可能很有用,因为您可以看到它是如何定义代理的子类的。例如,它声明了foaf:Organization
<rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Organization" rdfs:label="Organization" rdfs:comment="An organization." vs:term_status="stable">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
<rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
<rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
<owl:disjointWith rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
<owl:disjointWith rdf:resource="http://xmlns.com/foaf/0.1/Document"/>
</rdfs:Class>如果您是手工编写这篇文章的话,那么在Turtle或N3序列化中工作就容易多了,这将是这样的:
foaf:Organization a rdfs:Class , owl:Class ;
rdfs:comment "An organization." ;
rdfs:isDefinedBy foaf: ;
rdfs:label "Organization" ;
rdfs:subClassOf foaf:Agent ;
owl:disjointWith foaf:Person , foaf:Document ;
vs:term_status "stable" .https://stackoverflow.com/questions/23815960
复制相似问题