-- 作者:dulm
-- 发布时间:11/12/2008 4:16:00 PM
-- 关于RDF的一些疑问
1.看完语义网络基础,本来一直以为这rdfs:domain 只能是Class的。 今天在Practical RDF上看到,有的属性的rdfs:domain 是指向Property的。但是Property默认是小写的,书里定义属性relevancy的地方是小写的,rdfs:domain 里面引用的时候又用大写的Relevancy了。。。。不知道有没有关系。 2.还有如果一个类A,一个属性B,如果A内的属性B是通过rdf:Seq组织的,B的domain写A还是rdf:Seq?如果写A的话,通过什么方式来在Schema内指出B在A内,而且是以rdf:Seq方式组织的。 3.xml的Schema应该是一看就知道怎么通过这个Schema写xml的。RDF的Schema对于Property的domain和range的定义有些广泛(没有详细指明那个类,用广泛的resours指代)。是否都是需要通过第3个文件来详细描绘类和属性的组织。 4.类Resourse 有 属性 bio, bio 又有N个子属性description、author等。一般惯例是为bio再开一个类Bio组织子属性,还是直接让这些子属性依附于属性bio? <?xml version="1.0"?> <rdf:RDF xml:lang="en" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <rdfs:Class rdf:about="http://burningbird.net/postcon/elements/1.0/Resource"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en"> Web Resource</rdfs:label> <rdfs:comment xml:lang="en"> Web resource managed with PostCon system </rdfs:comment> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource" /> </rdfs:Class> <rdfs:Class rdf:about="http://burningbird.net/postcon/elements/1.0/Movement"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en"> Web Resource Movement</rdfs:label> <rdfs:comment xml:lang="en"> An event for the resource within the PostCon system </rdfs:comment> </rdfs:Class> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/bio"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en">Resource biography</rdfs:label> <rdfs:comment xml:lang="en"> Biographical information for resource </rdfs:comment> <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> <rdfs:domain rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/relevancy"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en">Resource Relevancy</rdfs:label> <rdfs:comment xml:lang="en"> Biographical information for resource </rdfs:comment> <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> <rdfs:domain rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/presentation"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en">Resource Presentation</rdfs:label> <rdfs:comment xml:lang="en"> Information related to relevancy of resource </rdfs:comment> <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> <rdfs:domain rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/history"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en"> Web Content History</rdfs:label> <rdfs:comment xml:lang="en"> History of movement of content within system </rdfs:comment> <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> <rdfs:domain rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/currentStatus"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en">Current Status</rdfs:label> <rdfs:comment>Current status of document (allowable values of Active and Inactive)</rdfs: comment> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> <rdfs:domain rdf:resource="http://postcon/elements/1.0/Relevancy"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/reason"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en">Reason</rdfs:label> <rdfs:comment>Reason</rdfs:comment> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> <rdfs:domain rdf:resource="http://postcon/elements/1.0/Resource"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/movementType"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en">Movement Type</rdfs:label> <rdfs:comment>Type of Movement (allowable values of Move, Add, Remove)</rdfs:comment> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> <rdfs:domain rdf:resource="http://postcon/elements/1.0/Movement"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/related"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en"> Related Resource</rdfs:label> <rdfs:comment xml:lang="en"> Resources within PostCon system related to current resource </rdfs:comment> <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/requires"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en">Resource Requirement</rdfs:label> <rdfs:comment xml:lang="en"> External resource required by current resource </rdfs:comment> <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/> </rdf:Property> <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/type"> <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/> <rdfs:label xml:lang="en">Resource Type</rdfs:label> <rdfs:comment>Type of Required Resource</rdfs:comment> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> </rdf:Property> </rdf:RDF> Example 6-5. PostCon vocabulary instance showing Movement and related resources <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/" xml:base="http://burningbird.net/articles/"> <pstcn:Resource rdf:about="monsters1.htm"> <!--biography of resource--> <pstcn:bio rdf:parseType="Resource"> <pstcn:title>Tale of Two Monsters: Legends</pstcn:title> <pstcn:abstract> When I think of "monsters" I think of the creatures of legends and tales, from the books and movies, and I think of the creatures that have entertained me for years. </pstcn:abstract> <pstcn:description> Part 1 of four-part series on cryptozoology, legends, Nessie the Loch Ness Monster and the giant squid. </pstcn:description> <pstcn:dateCreated>1999-08-01T00:00:00-06:00</pstcn:dateCreated> <pstcn:author>Shelley Powers</pstcn:author> <pstcn:owner>Burningbird Network</pstcn:owner> </pstcn:bio> <!--related resources--> <pstcn:related rdf:resource="monsters2.htm" /> <pstcn:related rdf:resource="monsters3.htm" /> <pstcn:related rdf:resource="monsters4.htm" /> <!--resource movements--> <pstcn:history> <rdf:Seq> <rdf:_1 rdf:resource="http://www.yasd.com/dynaearth/monsters1.htm" /> <rdf:_2 rdf:resource="http://www.dynamicearth.com/articles/monsters1.htm" /> <rdf:_3 rdf:resource="http://burningbird.net/articles/monsters1.htm" /> </rdf:Seq> </pstcn:history> </pstcn:Resource> <!--related resource defintions--> <pstcn:Resource rdf:about="monsters2.htm"> <pstcn:title>Cryptozooloy</pstcn:title> <pstcn:reason>First in the Tale of Two Monsters series.</pstcn:reason> </pstcn:Resource> <pstcn:Resource rdf:about="monsters3.htm"> <pstcn:title>A Tale of Two Monsters: Architeuthis Dux (Giant Squid)</pstcn:title> <pstcn:reason>Second in the Tale of Two Monsters series.</pstcn:reason> </pstcn:Resource> <pstcn:Resource rdf:about="monsters4.htm"> <pstcn:title>Nessie, the Loch Ness Monster </pstcn:title> <pstcn:reason>Fourth in the Tale of Two Monsters series.</pstcn:reason> </pstcn:Resource> <!--resource movement definitions--> <pstcn:Movement rdf:about="http://www.yasd.com/dynaearth/monsters1.htm"> <pstcn:movementType>Add</pstcn:movementType> <pstcn:reason>New Article</pstcn:reason> <pstcn:date>1998-01-01T00:00:00-05:00</pstcn:date> </pstcn:Movement> <pstcn:Movement rdf:about="http://www.dynamicearth.com/articles/monsters1.htm"> <pstcn:movementType>Move</pstcn:movementType> <pstcn:reason>moved to dynamicearth.com domain</pstcn:reason> <pstcn:date>1999-10-31:T00:00:00-05:00</pstcn:date> </pstcn:Movement> <pstcn:Movement rdf:about="http://burningbird.net/articles/monsters1.htm"> <pstcn:movementType>Move</pstcn:movementType> <pstcn:reason>Moved to burningbird.net</pstcn:reason> <pstcn:date>2002-11-01:T00:00:00-05:00</pstcn:date> </pstcn:Movement> </rdf:RDF>
|