;;; General extractor from scenario graph. (define (describe-thing thing) (cond ((uri? thing) (ns-uri->qname thing)) ((rdf-literal? thing) (rdf-literal-text thing)) ((rdf-bnode? thing) (describe-subject thing)) (else thing))) (define (describe-subject subject) (map (lambda (triple) (map describe-thing `(,(rdf-triple-predicate triple) ,(rdf-triple-object triple)))) (triples-with-subject (canonicalize-rdf-subject subject) ns-index))) (define (tell-me-about qname) (let ((about (describe-subject (ns-qname->uri qname)))) (pp-comment about))) #| (tell-me-about 's3:arrest-1) ;((|j:arrestSubjectRightsReadIndicator| "true") ; (|j:arrestCharge| |law:USC/18/228|) ; (|j:arrestLocation| |te:NYC|) ; (|j:arrestSubject| |s3:JohnDoe|) ; (|j:arrestWarrant| |s3:05-NY-2343-CR-JFC|) ; (|j:arrestOfficial| |te:CharlesDodgson|) ; (ts:antecedent s3:open-source-search-2-result-1) ; (dc:date "2005-11-01") ; (rdfs:type |j:Arrest|)) ;Unspecified return value (tell-me-about '|s3:JohnDoe|) ;((|ts:homeAddress| ; ((|u:locationPostalCodeID| "10044") (|u:locationStateName| "NY") ; (|u:locationCityName| "New York") ; (|u:locationAddress| "123 Main Street") ; (rdfs:type |ts:Location|))) ; (|ts:birthDate| "1975-08-24") ; (|u:personSurName| "Doe") ; (|u:personMiddleName| "Henry") ; (|u:personGivenName| "John") ; (rdfs:type |ts:Subject|)) ;Unspecified return value (tell-me-about '|j:arrestSubjectRightsReadIndicator|) ;((rdfs:domain |j:Arrest|) ; (rdfs:range |xsd:Boolean|) ; (rdf:type |rdf:Property|)) ;Unspecified return value (tell-me-about '|j:arrestCharge|) ;((rdfs:domain |j:Arrest|) ; (rdfs:range |ts:Statute|) ; (rdf:type |rdf:Property|)) ;Unspecified return value (tell-me-about 's3:open-source-search-2-result-1) ;((ts:content |s3:05-NY-2343-CR-JFC|) ; (sorn:recipient |s3:FBI-NYC|) ; (sorn:source ; ((dc:identifier ; #[uri 53 "http://appsext4.dos.state.ny.us/csewarrants_public/cse_search"]) ; (rdfs:type |sorn:Data-source|))) ; (ts:antecedent s3:open-source-search-2) ; (dc:date "2005-10-02T12:00:01") ; (rdfs:type |ts:SearchResult|)) ;Unspecified return value |#