ODP example queries in R-DEVICE
Query Name |
OO-based query |
Triple-based query |
0 |
(deductiverule (? (dc:title
?t)) => (result (title ?t)) ) |
(deductiverule (triple (subj
?x) (pred dc:title) (obj ?t)) => (result (title ?t)) ) |
1 |
(deductiverule (dmoz:Topic
(dc:title ?t)) => (result (title ?t)) ) |
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?t)) => (result (title ?t)) ) |
2 |
(deductiverule (dmoz:Topic
(dc:title ?t) (dmoz:newsGroup
?n)) => (result (title ?t) (news ?n)) ) |
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?t)) (triple (subj
?x) (pred dmoz:newsGroup)
(obj ?n)) => (result (title ?t) (news ?n)) ) |
3 |
(deductiverule (dmoz:Topic
(dmoz:catid "4") (dc:title
?t)) => (result (title ?t)) ) |
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?t)) (triple (subj
?x) (pred dmoz:catid) (obj "4")) => (result (title ?t)) ) |
4 |
(deductiverule (dmoz:Topic (dmoz:catid
"4") (dc:title ?t) (dmoz:link
$? ?l $?)) ?l <- (dmoz:ExternalPage
(dc:title ?lt)) => (result (title ?t) (link_title ?lt)) ) |
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?t)) (triple (subj
?x) (pred dmoz:catid) (obj "4")) (triple (subj
?x) (pred dmoz:link) (obj ?l)) (triple (subj
?l) (pred dc:title) (obj ?lt)) => (result (title ?t) (link_title ?lt)) ) |
5 |
(deductiverule (dmoz:Topic (dmoz:catid
"4") (dc:title ?t) (dmoz:link
$? ?l $?)) ?l <- (dmoz:ExternalPage
(dc:title ?lt) (dc:description ?d)) => (result (title ?t) (link_title ?lt) (link_desc ?d)) ) |
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?t)) (triple (subj
?x) (pred dmoz:catid) (obj "4")) (triple (subj
?x) (pred dmoz:link) (obj ?l)) (triple (subj
?l) (pred dc:title) (obj ?lt)) (triple (subj
?l) (pred dc:description)
(obj ?d)) => (result (title ?t) (link_title ?lt) (link_desc ?d)) ) |
5a |
|
(deductiverule (triple (subj ?x) (pred
rdf:type) (obj dmoz:Topic)) (triple (subj ?x) (pred
dc:title) (obj ?t)) (triple (subj ?x) (pred
dmoz:catid) (obj
"4")) (triple (subj ?x) (pred
dmoz:link) (obj ?l)) (triple (subj ?l) (pred
rdf:type) (obj dmoz:ExternalPage)) (triple (subj ?l) (pred
dc:title) (obj ?lt)) (triple (subj ?l) (pred
dc:description) (obj ?d)) => (result
(title ?t) (link_title ?lt)
(link_desc ?d)) ) |
6 |
(deductiverule (dmoz:Topic (dmoz:catid
~"4") (dc:title ?t) (dmoz:link
$? ?l $?)) ?l <- (dmoz:ExternalPage
(dc:title ?lt) (dc:description
?d) (dmoz:priority 1)) => (result (title ?t) (link_title ?lt) (link_desc ?d)) ) |
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?t)) (triple (subj
?x) (pred dmoz:catid) (obj ~"4")) (triple (subj
?x) (pred dmoz:link) (obj ?l)) (triple (subj
?l) (pred dc:title) (obj ?lt)) (triple (subj
?l) (pred dc:description)
(obj ?d)) (triple (subj
?l) (pred dmoz:priority)
(obj 1)) => (result (title ?t) (link_title ?lt) (link_desc ?d)) ) |
6a |
|
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?t)) (triple (subj
?x) (pred dmoz:catid) (obj ~"4")) (triple (subj
?x) (pred dmoz:link) (obj ?l)) (triple (subj
?l) (pred rdf:type) (obj dmoz:ExternalPage)) (triple (subj
?l) (pred dc:title) (obj ?lt)) (triple (subj
?l) (pred dc:description)
(obj ?d)) (triple (subj
?l) (pred dmoz:priority)
(obj 1)) => (result (title ?t) (link_title ?lt) (link_desc ?d)) ) |
7 |
(deductiverule (dmoz:Topic (dc:title
?top) (dmoz:narrow $? ?n $?)) ?n <- (dmoz:Topic (dc:title ?t) (dmoz:link $? ?l $?)) ?l <- (dmoz:ExternalPage
(dc:title ?lt)) => (result (top_title ?top) (title ?t) (link_title ?lt)) ) |
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?top)) (triple (subj
?x) (pred dmoz:narrow) (obj ?n)) (triple (subj
?n) (pred dc:title) (obj ?t)) (triple (subj
?n) (pred dmoz:link) (obj ?l)) (triple (subj
?l) (pred dc:title) (obj ?lt)) => (result (top_title ?top) (title ?t) (link_title ?lt)) ) |
7a |
|
(deductiverule (triple (subj ?x) (pred
rdf:type) (obj dmoz:Topic)) (triple (subj ?x) (pred
dc:title) (obj ?top)) (triple (subj ?x) (pred
dmoz:narrow) (obj ?n)) (triple (subj ?n) (pred
rdf:type) (obj dmoz:Topic)) (triple (subj ?n) (pred
dc:title) (obj ?t)) (triple (subj ?n) (pred
dmoz:link) (obj ?l)) (triple (subj ?l) (pred
rdf:type) (obj dmoz:ExternalPage)) (triple (subj ?l) (pred
dc:title) (obj ?lt)) => (result
(top_title ?top) (title ?t) (link_title
?lt)) ) |
8 |
(deductiverule (dmoz:Topic (dc:title
?top) (dmoz:narrow $? ?n $?)) ?n <- (dmoz:Topic (dc:title ?t) (dmoz:link $? ?l $?)) ?l <- (dmoz:ExternalPage
(dc:title ?lt) (dmoz:priority 1)) => (result (top_title ?top) (title ?t) (link_title ?lt)) ) |
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?top)) (triple (subj
?x) (pred dmoz:narrow) (obj ?n)) (triple (subj
?n) (pred dc:title) (obj ?t)) (triple (subj
?n) (pred dmoz:link) (obj ?l)) (triple (subj
?l) (pred dc:title) (obj ?lt)) (triple (subj
?l) (pred dmoz:priority)
(obj 1)) => (result (top_title ?top) (title ?t) (link_title ?lt)) ) |
8a |
|
(deductiverule (triple (subj
?x) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?x) (pred dc:title) (obj ?top)) (triple (subj
?x) (pred dmoz:narrow) (obj ?n)) (triple (subj
?n) (pred rdf:type) (obj dmoz:Topic)) (triple (subj
?n) (pred dc:title) (obj ?t)) (triple (subj
?n) (pred dmoz:link) (obj ?l)) (triple (subj
?l) (pred rdf:type) (obj dmoz:ExternalPage)) (triple (subj
?l) (pred dc:title) (obj ?lt)) (triple (subj
?l) (pred dmoz:priority)
(obj 1)) => (result (top_title ?top) (title ?t) (link_title ?lt)) ) |