1. # CWM rules for HTTP protocol: What can be inferred from a GET? 2. # This is a DRAFT and surely will change without notice. 3. # 4. # Author: David Booth 5. # Date: 26-Feb-2008 6. # License: GPLv3: http://www.gnu.org/licenses/gpl-3.0.html 7. # 8. # See associated test data. 9. 10. ######################## Prefixes ########################### 11. # I see python code for parsing URIs here: 12. # http://www.w3.org/2000/10/swap/uripath.py 13. # but I haven't yet found an ontology for parsing URIs, 14. # though maybe the POWDER working group will eventually make one. 15. # @@@@ TODO: Find URI parsing ontology 16. @prefix uri: . 17. @prefix rdf: . 18. @prefix rdfs: . 19. @prefix log: . 20. # These two HTTP ontologies by David Sheets are not currently used, 21. # but relationships between my http: ontology and his 22. # are shown in comments: 23. # @prefix dshttp: . 24. # @prefix dshttph: . 25. @prefix http: . 26. @prefix sumo: . 27. @prefix owl: . 28. @prefix xsd: . 29. @prefix decl: . 30. @prefix n3: . 31. @prefix string: . 32. @prefix awww: . 33. 34. ########################## AWWW ############################# 35. # Concepts from the Architecture of the World Wide Web: 36. # http://www.w3.org/TR/webarch/ 37. # 38. awww:Resource a rdfs:Class ; 39. rdf:comment "A resource, as defined in http://www.w3.org/TR/webarch/#def-resource : 'We do not limit the scope of what might be a resource. The term ''resource'' is used in a general sense for whatever might be identified by a URI. It is conventional on the hypertext Web to describe Web pages, images, product catalogs, etc. as ''resources''." . 40. 41. awww:InformationResource a rdfs:Class ; 42. rdf:label "InformationResource" ; 43. rdf:comment "An information resource, roughly as defined in http://www.w3.org/TR/webarch/#def-information-resource though that definition is flawed. According to http://www.w3.org/TR/webarch/#p43 'Other things, such as cars and dogs (and, if you've printed this document on physical sheets of paper, the artifact that you are holding in your hand), are resources too. They are not information resources, however . . . .', so I will take this to mean that an information resource is an abstract entity. This property may either be asserted explicitly or inferred by the httpRange-14 rule." ; 44. rdfs:subClassOf sumo:AbstractEntity . 45. 46. ######################### URI Parsing ############################## 47. 48. uri:hasRacine a rdf:Property ; 49. rdf:label "hasRacine" ; 50. rdf:comment "Parse a URI with optional fragment identifier to extract the racine (the part before the #). The URI is NOT required to contain a fragment identifier. A URI with no fragID will map to itself. Compare hasProperRacine. This property should NOT be asserted explicitly -- it will be inferred from the URI." ; 51. rdfs:domain xsd:anyURI ; 52. rdfs:range xsd:anyURI . # But no fragID 53. 54. uri:hasProperRacine a rdf:Property ; 55. rdf:label "hasProperRacine" ; 56. rdf:comment "Parse a URI with fragment identifier to extract the racine (the part before the #). The URI must have a fragment identifier for this property to hold. Compare hasRacine. This property should NOT be asserted explicitly -- it will be inferred from the URI." ; 57. rdfs:domain xsd:anyURI ; 58. rdfs:range xsd:anyURI . # But no fragID 59. 60. # Rule for hasRacine. 61. # Test with: 62. # "http://example/people#fred"^^xsd:anyURI a xsd:anyURI . 63. # "http://example/people#"^^xsd:anyURI a xsd:anyURI . 64. # "http://example/people"^^xsd:anyURI a xsd:anyURI . 65. { ?u a xsd:anyURI . 66. # FragID would be: 67. # (?u "\\A[^\\#]*\\#(.+)\\Z") string:scrape ?fragid . 68. # Racine as a simple string: 69. (?u "\\A([^\\#]+)") string:scrape ?stringRacine . 70. # Turn ?stringRacine into type xsd:anyURI: 71. (?stringRacine xsd:anyURI) log:dtlit ?racine . 72. # ("FIRED: " ?u " uri:hasRacine " ?racine "\n") string:concatenation ?fired . # Debug 73. } => { ?u uri:hasRacine ?racine . 74. # "a" log:outputString ?fired . # Debug 75. } . 76. 77. # Rule for hasProperRacine. 78. # Test with: 79. # "http://example/people#fred"^^xsd:anyURI a xsd:anyURI . 80. # "http://example/people#"^^xsd:anyURI a xsd:anyURI . 81. # This last one should fail to match, because it has no #: 82. # "http://example/people"^^xsd:anyURI a xsd:anyURI . 83. { ?u a xsd:anyURI . 84. # FragID would be: 85. # (?u "\\A[^\\#]*\\#(.+)\\Z") string:scrape ?fragid . 86. # Proper racine as a simple string: 87. (?u "\\A([^\\#]+)\\#") string:scrape ?stringRacine . 88. # Turn ?stringRacine into type xsd:anyURI: 89. (?stringRacine xsd:anyURI) log:dtlit ?racine . 90. # ("FIRED: " ?u " uri:hasProperRacine " ?racine "\n") string:concatenation ?fired . # Debug 91. } => { ?u uri:hasProperRacine ?racine . 92. # "a" log:outputString ?fired . # Debug 93. } . 94. 95. uri:hasURI a rdf:Property ; 96. rdf:label "hasURI" ; 97. rdf:comment "The subject resource is denoted by the object URI. It is basically the same as log:uri, but has a range of xsd:anyURI, so that a simple assertion like {r hasURI u} will cause u to be recognized as type xsd:anyURI without having to assert it explicitly. This property should be asserted explicitly -- it is NOT inferred." ; 98. rdfs:subPropertyOf log:uri ; 99. # rdfs:domain rdfs:Resource ; 100. rdfs:range xsd:anyURI . 101. 102. 103. ########################## HTTP ############################# 104. # HTTP 1.1 105. 106. ########## Classes 107. http:Reply a rdfs:Class ; 108. # Maybe: owl:sameClassAs dshttp:ResponseMessage ; 109. rdf:comment "An HTTP 1.1 reply, as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6 ." . 110. 111. ## Deleted class http:StatusCode, as it wasn't used. 112. 113. ########### Properties 114. http:hasLocation a rdf:Property ; 115. rdf:comment "The Reply has an HTTP 1.1 Location response-header field, as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 ." ; 116. # Would probably be: rdfs:subPropertyOf dshttph:location ; 117. # except that dshttph: doesn't currently define that property. 118. rdfs:domain http:Reply ; 119. rdfs:range xsd:anyURI . 120. 121. http:hasStatusCode a rdf:Property ; 122. rdf:comment "The Reply has an HTTP 1.1 Status-Code, as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10 ." ; 123. rdfs:domain http:Reply ; 124. rdfs:range rdfs:Literal . 125. 126. http:hasContentType a rdf:Property ; 127. rdf:comment "The Reply has an HTTP 1.1 Content-Type entity-header field, as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 ." ; 128. # Would probably be: rdfs:subPropertyOf dshttp:status ; 129. rdfs:domain http:Reply ; 130. rdfs:range rdfs:Literal . 131. 132. http:hasResourceDescription a rdf:Property ; 133. rdf:comment "The subject Reply contains a Resource-Description header, as proposed in http://lists.w3.org/Archives/Public/www-tag/2003Mar/0006 , that specifies the location of set of ancillary assertions about the resource denoted by the URI that was dereferenced to obtain this Reply. (The notion of ancillary assertions is described in http://dbooth.org/2007/uri-decl/#ancillary .) See the accompanying inference rule for decl:hasAncillaryAssertions for details." ; 134. rdfs:domain http:Reply ; 135. rdfs:range xsd:anyURI . 136. 137. http:hasEntityBody a rdf:Property ; 138. rdf:comment "The Reply has an HTTP 1.1 Entity Body, as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.2 . The Entity Body 'is obtained from the message-body by decoding any Transfer-Encoding that might have been applied to ensure safe and proper transfer of the message'. I did not bother to model the message-body, as it was not needed. Also, the spec defines an Entity Body as a sequence of octets. I don't know if this is the same data type as xsd:hexBinary, but for simplicity I assumed that an Entity Body can be modeled as an rdfs:Literal." ; 139. # Would probably be: rdfs:subPropertyOf dshttp:entity-body ; 140. rdfs:domain http:Reply ; 141. rdfs:range rdfs:Literal . 142. 143. http:hasDirectGetReply a rdf:Property ; 144. rdf:comment "An HTTP 1.1 GET on the URI directly yielded a Reply. By the HTTP 1.1 spec, http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2 the URI must not contain a fragment identifier. GET is defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3 . Compare hasGetReply. Test data should assert hasDirectGetReply, from which hasGetReply will be inferred." ; 145. rdfs:domain xsd:anyURI ; 146. rdfs:range http:Reply . 147. 148. http:hasGetReply a rdf:Property ; 149. rdf:comment "An HTTP 1.1 GET on the URI directly or indirectly (through 301, 302 or 307 redirects) yielded a Reply. Compare hasDirectGetReply. Among other things, hasGetReply is used to delegate authority for URI declaration: if ?u hasGetReply ?r then ?r is treated as authoritative in the sense described in http://dbooth.org/2007/uri-decl/20070817.htm#precise-def-uri-decl , such that the act of serving the reply via the original URI satisfies the requirement for a performative speech act. Test data should NOT assert hasGetReply, but should instead assert hasDirectGetReply and let hasGetReply be inferred." ; 150. rdfs:domain xsd:anyURI ; 151. rdfs:range http:Reply . 152. 153. ########### Rules 154. 155. ##### OBSOLETE RULE. The decl:hasDeclaration rule for an 156. ##### awww:InformationResource makes this rule obsolete. 157. # httpRange-14 rule: 200 response => InformationResource 158. # http://lists.w3.org/Archives/Public/www-tag/2005Jun/0039.html 159. { 160. ?r uri:hasURI ?u . 161. ?u http:hasGetReply ?reply . 162. ?reply http:hasStatusCode 200 . 163. ("FIRED: " ?r " a awww:InformationResource \n") string:concatenation ?fired . # Debug 164. # @@ TODO: WTF???? Somehow test6 fails if this rule is commented out, 165. # but succeeds if this rule is here, even when it does 166. # cannot fire because of this antecedent: 167. . 168. } => { 169. # ?r a awww:InformationResource . 170. "a" log:outputString ?fired . # Debug 171. } . 172. 173. # Definition of hasGetReply (base case). 174. # hasDirectGetReply => hasGetReply. 175. { ?u http:hasDirectGetReply ?reply . # IF direct deref ?u yields ?reply 176. # ("FIRED base: " ?u " http:hasGetReply " ?reply "\n") string:concatenation ?fired . # Debug 177. } => { ?u http:hasGetReply ?reply . # THEN it derefs to ?reply. 178. # "a" log:outputString ?fired . # Debug 179. } . 180. 181. # Definition of hasGetReply (recursive case). 182. # For the purpose of hasGetReply, 301, 302 and 307 are treated the same: 183. # they are all deemed to delegate URI declaration authority to the new URI. 184. { 185. ?u1 http:hasGetReply ?reply1 . # IF ?u1 derefs to ?reply1 186. ?reply1 http:hasStatusCode 301 . # ... with 301 status 187. ?reply1 http:hasLocation ?u2 . # ... and new URI ?u2 188. ?u2 http:hasGetReply ?reply2 . # ... which derefs to ?reply2 189. # ("FIRED recursive: " ?u1 " http:hasGetReply " ?reply2 "\n") string:concatenation ?fired . # Debug 190. } => { # THEN 191. ?u1 http:hasGetReply ?reply2 . # ... ?u1 derefs to ?reply2 192. # "a" log:outputString ?fired . # Debug 193. } . 194. 195. # Furthermore, 301, 302 and 307 (but NOT 303) redirects are 196. # treated as saying that the resources denoted by the old and 197. # new URIs are the same resource. This is significant 198. # because it highlights the difference between talking about 199. # the resource denoted by a URI, versus the use of the URI 200. # in an HTTP GET: two URIs may denote the same resource, but 201. # dereferencing them may yield *different* results. For 202. # example, dereferencing a URI may yield a 301 redirect, 203. # but dereferencing the new URI may yield a 200 response. 204. # This helps explain why these HTTP rules are written in 205. # terms of URIs rather than awww:InformationResources. 206. { 207. ?u1 a xsd:anyURI . # Old URI 208. # ?r1 a rdfs:Resource . 209. ?r1 uri:hasURI ?u1 . 210. ?u2 a xsd:anyURI . # New URI 211. # ?r2 a rdfs:Resource . 212. ?r2 uri:hasURI ?u2 . 213. # @@ TODO: I suspect this should use http:hasDirectGetReply 214. # instead of http:hasGetReply, and then let the 301 215. # rule make a transitive inference about the URI declaration, 216. # but I haven't fully thought it through yet. 217. ?u1 http:hasGetReply ?reply1 . # IF ?u1 derefs to ?reply1 218. ?reply1 http:hasStatusCode 301 . # ... with 301 status 219. ?reply1 http:hasLocation ?u2 . # ... and new URI ?u2 220. # ("FIRED 301: " ?r1 " = " ?r2 "\n") string:concatenation ?fired . # Debug 221. } => { # THEN they denote 222. ?r1 = ?r2 . # ... the same thing. 223. # "a" log:outputString ?fired . # Debug 224. } . 225. 226. # 227. # @@@@ TODO: Implement 302 and 307 cases the same as 301. 228. 229. 230. ########################## URI Declaration ############################ 231. # This section defines concepts involved in URI declaration, as 232. # described in http://dbooth.org/2007/uri-decl/ 233. # Rules that assert these predicates are defined by each media type. 234. 235. decl:parsesTo a rdf:Property ; 236. rdf:label "parsesTo" ; 237. rdf:comment "The given EntityBody parses to an N3 formula according to the given media type. The subject is a list: the first element is the entity body to be parsed; the second element is the media type. The resulting object formula is a set of RDF statements as described in http://dbooth.org/2007/uri-decl/ . This property should NOT normally be asserted explicitly, but should be inferred by media-type-specific parsing rules." ; 238. # @@@@ TODO: Change the entity body type to octet stream. 239. # rdfs:domain ( rdfs:Literal rdfs:Literal ) ; # ( EntityBody, MediaType ) 240. rdfs:range log:Formula . 241. 242. decl:hasDeclaration a rdf:Property ; 243. rdf:label "hasDeclaration" ; 244. rdf:comment "The subject URI has a URI declaration consisting of the object formula -- a set of RDF statements as described in http://dbooth.org/2007/uri-decl/ . This property will normally be inferred from a successful http response, either from the URI's racine or via a 303 redirect using media-type-specific rules." ; 245. rdfs:domain xsd:anyURI ; # May have a fragID 246. rdfs:range log:Formula . 247. 248. decl:hasAncillaryAssertions a rdf:Property ; 249. rdf:label "hasAncillaryAssertions" ; 250. rdf:comment "The subject URI has ancillary assertions given by the object log:Formula. See http://dbooth.org/2007/uri-decl/#ancillary ." ; 251. rdfs:domain xsd:anyURI ; # May have a fragID 252. rdfs:range log:Formula . 253. 254. # URI declaration rule for hash URIs. The rules for each media 255. # type must specify how a body is parsed to a formula. 256. { ?u a xsd:anyURI . 257. ?u uri:hasProperRacine ?racine . 258. ?racine http:hasGetReply ?reply . 259. ?reply http:hasStatusCode 200 . 260. ?reply http:hasContentType ?mediaType . 261. ?reply http:hasEntityBody ?body . 262. ( ?body ?mediaType ) decl:parsesTo ?formula . 263. # ("FIRED hash: " ?u " decl:hasDeclaration " ?formula "\n") string:concatenation ?fired . # Debug 264. } => { 265. ?u decl:hasDeclaration ?formula . 266. # "a" log:outputString ?fired . # Debug 267. } . 268. 269. # URI declaration rule for 303 redirect URIs (which may also contain 270. # a fragment identifier). 271. # Note that this rule may involve any number of 301, 302 or 307 272. # redirects before or after the 303, but only a single 303. 273. # Thus, 303 is viewed as a less transferrable delegation of authority 274. # for URI declaration as 301, 302 and 307. The idea is that if we 275. # have u1 --303--> u2 --303--> u3, then u2 is treated as authoritative 276. # for URI declaration of u1, and u3 is treates as authoritative for 277. # URI declaration of u2, but u3 is NOT treated as authoritative for 278. # URI declaration of u1. I am not certain that this is the right 279. # choice -- perhaps it should be fully transitive -- but given that 280. # 303 is a weaker relationship than 301, 302 or 307 I think it may 281. # be a good choice. Comments on this question are invited. 282. { ?u a xsd:anyURI . 283. ?u uri:hasRacine ?racine . 284. ?racine http:hasGetReply ?reply1 . 285. ?reply1 http:hasStatusCode 303 . 286. ?reply1 http:hasLocation ?u2 . # ... forwarding to ?u2 287. ?u2 http:hasGetReply ?reply2 . # ... which derefs to reply2 288. ?reply2 http:hasStatusCode 200 . 289. ?reply2 http:hasContentType ?mediaType . 290. ?reply2 http:hasEntityBody ?body . 291. ( ?body ?mediaType ) decl:parsesTo ?formula . 292. # ("FIRED 303: " ?u " decl:hasDeclaration " ?formula "\n") string:concatenation ?fired . # Debug 293. } => { 294. ?u decl:hasDeclaration ?formula . 295. # "a" log:outputString ?fired . # Debug 296. } . 297. 298. # URI declaration rule for awww:InformationResource (using 299. # httpRange-14 rule): 200 response => InformationResource 300. # and declares the URI. 301. # http://lists.w3.org/Archives/Public/www-tag/2005Jun/0039.html 302. # Notice that assertions contained in the information resource's 303. # representation (i.e., the HTTP Response) are *not* 304. # a part of the resulting URI declaration. 305. # This is intentional, to permit 306. # users to make assertions about the information resource that 307. # such a URI denotes without accepting the assertions served by 308. # that information resource. For example, if dereferencing 309. # http://example/foo yields a 200 response with RDF/N3 content 310. # that parses to an n3 formula (i.e., a set of RDF assertions), 311. # then the rules for URI declaration will not automatically 312. # require everyone who writes that URI to accept those assertions. 313. { ?u a xsd:anyURI . 314. ?r uri:hasURI ?u . 315. ?u http:hasDirectGetReply ?reply . 316. ?reply http:hasStatusCode 200 . 317. ?formula = { 318. ?r a awww:InformationResource . 319. ?r uri:hasURI ?u . 320. } . 321. # ("FIRED 200: " ?u " decl:hasDeclaration " ?formula "\n") string:concatenation ?fired . # Debug 322. } => { 323. ?u decl:hasDeclaration ?formula . 324. # "a" log:outputString ?fired . # Debug 325. } . 326. 327. # URI declaration rule for rdfs:isDefinedBy, which is viewed 328. # as providing core assertions for a URI declaration, whereas 329. # the rdfs:seeAlso relationship is viewed as providing 330. # ancillary assertions, as described in 331. # http://dbooth.org/2007/uri-decl/#ancillary . 332. { ?r uri:hasURI ?u . 333. ?rdef uri:hasURI ?udef . 334. ?r rdfs:isDefinedBy ?rdef . 335. ?udef http:hasGetReply ?reply . 336. ?reply http:hasStatusCode 200 . 337. ?reply http:hasContentType ?mediaType . 338. ?reply http:hasEntityBody ?body . 339. ( ?body ?mediaType ) decl:parsesTo ?formula . 340. # ("FIRED isDefinedBy: " ?u " decl:hasDeclaration " ?formula "\n") string:concatenation ?fired . # Debug 341. } => { 342. ?u decl:hasDeclaration ?formula . 343. # "a" log:outputString ?fired . # Debug 344. } . 345. 346. # A rule for asserting decl:hasAncillaryAssertions from 347. # an HTTP Resource-Description header. Note that if URI u 348. # is dereferenced to obtain a Response containing such a 349. # header, and the header points to a metadata document containing 350. # assertions, then those assertions must NOT be interpreted 351. # as core assertions for u's declaration. Rather, 352. # they must be treated as ancillary assertions, as described in 353. # http://dbooth.org/2007/uri-decl/#ancillary . 354. # This is necessary to enable someone to use u to make 355. # a statement about its denoted document, such as: 356. # :hasRating :awful . 357. # without implying agreement with the assertions in the 358. # metadata document, which after all could contain a 359. # statement such as: 360. # :hasRating :excellent . 361. # 362. { ?r uri:hasURI ?u . 363. ?u http:hasDirectGetReply ?reply . 364. ?reply http:hasResourceDescription ?uMetadata . 365. ?rMetadata uri:hasURI ?uMetadata . 366. ?rMetadata log:semantics ?formula . 367. # ("FIRED: " ?u " decl:hasAncillaryAssertions " ?formula "\n") string:concatenation ?fired . # Debug 368. } => { 369. ?u decl:hasAncillaryAssertions ?formula . 370. # "a" log:outputString ?fired . # Debug 371. } . 372. 373. ######################### N3 Media Type ############################## 374. # Properties and rule for media type: text/n3. 375. # Not sure if this media type is registered yet, but 376. # TimBL suggests text/rdf+n3 here: 377. # http://www.nabble.com/N-Triples-MIME-type-should-not-be-text-plain----comment-on-RDF-Test-Cases.-td13220788.html 378. # but here mentions that there was strong push for text/n3 instead: 379. # http://lists.w3.org/Archives/Public/public-awwsw/2008Feb/0027.html . 380. # Either way, this is good enough for demonstrating the concepts. 381. 382. # @@@@ TODO: Define/find rule for parsing octet stream as RDF/n3. 383. # Should be able to use log:parsedAsN3 384. # In the meantime, this will do for test1: 385. { 386. ?mediaType = "text/n3" . 387. ?s = "@prefix sumo: . a sumo:Human . " . 388. ?f = { a sumo:Human . } . 389. # ("FIRED: ( " ?s " " ?mediaType " ) n3:parsesTo " ?f "\n") string:concatenation ?fired . # Debug 390. } => { 391. ( ?s ?mediaType ) decl:parsesTo ?f . 392. # "a" log:outputString ?fired . # Debug 393. } . 394. # And this will do for test2: 395. { 396. ?mediaType = "text/n3" . 397. ?s = "@prefix sumo: . a sumo:Human . " . 398. ?f = { a sumo:Human . } . 399. # ("FIRED: ( " ?s " " ?mediaType " ) n3:parsesTo " ?f "\n") string:concatenation ?fired . # Debug 400. } => { 401. ( ?s ?mediaType ) decl:parsesTo ?f . 402. # "a" log:outputString ?fired . # Debug 403. } . 404. 405. ########################## SUMO ############################# 406. # Concepts from Suggested Upper Merged Ontology (SUMO): 407. # http://www.ontologyportal.org/ 408. # This is used only: 409. # - to assert a simple, interesting fact, i.e., 410. # that <...#dan> is a sumo:Human; and 411. # - to demonstrate how one could detect when the same URI is 412. # used to denote both an awww:InformationResource and a 413. # a sumo:Human, which the AWWW says is contradictory: 414. # http://www.w3.org/TR/webarch/#def-information-resource 415. # "Other things, such as cars and dogs (and, if you've printed 416. # this document on physical sheets of paper, the artifact that 417. # you are holding in your hand), are resources too. They are 418. # not information resources, however, . . . ." 419. 420. sumo:AbstractEntity a rdfs:Class ; 421. rdf:label "sumo:AbstractEntity" ; 422. rdf:comment "An abstract entity, as defined in http://sigma.ontologyportal.org:4010/sigma/Browse.jsp?lang=EnglishLanguage&kb=SUMO&term=Abstract . 'Entity is exhaustively partitioned into physical and abstract.'" ; 423. owl:disjointWith sumo:PhysicalEntity . 424. 425. sumo:PhysicalEntity a rdfs:Class ; 426. rdf:label "sumo:PhysicalEntity" ; 427. rdf:comment "A physical entity, as defined in http://sigma.ontologyportal.org:4010/sigma/Browse.jsp?lang=EnglishLanguage&kb=SUMO&term=Physical ." . 428. 429. sumo:Human a rdfs:Class ; 430. rdf:label "sumo:Human" ; 431. rdf:comment "A human, as defined in http://sigma.ontologyportal.org:4010/sigma/Browse.jsp?kb=SUMO&term=Human . The SUMO ontology has a long chain of superclassing to get from human to physical entity: human, hominid, primate, mammal, warm blooded vertebrate, vertebrate, animal, organism, organic object, corpuscular object, self connected object, object, physical entity. Hence, I have abbreviated this chain for simplicity." ; 432. rdfs:subClassOf sumo:PhysicalEntity . 433. 434. ########################## Standard RDF and OWL Rules ########################## 435. # I haven't yet found out where to get these standard rules for cwm, 436. # so I hand coded them for the moment. 437. 438. # rdfs:subClassOf 439. { ?a a ?ca . ?ca rdfs:subClassOf ?cb . } 440. => { ?a a ?cb . } . 441. 442. # owl:sameAs 443. { ?a = ?b } => { ?b = ?a } . 444. { ?a = ?b . ?a ?p ?c } => { ?b ?p ?c } . 445. { ?a = ?b . ?c ?p ?a } => { ?c ?p ?b } . 446. 447. # rdfs:domain 448. { ?p rdfs:domain ?d . ?a ?p ?b } => { ?a a ?d } . 449. 450. # rdfs:range 451. { ?p rdfs:range ?r . ?a ?p ?b } => { ?b a ?r } .