@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix og: <http://opengraphprotocol.org/schema/> .
@prefix string: <http://www.w3.org/2000/10/swap/string#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix gn: <http://www.geonames.org/ontology#> .
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
@prefix gr: <http://purl.org/goodrelations/v1#> .

# Map og:type to rdf:type.
{ ?x og:type ?y .
  ("http://www.opengraphprotocol.org/schema/" ?y) string:concatenation ?c .
  ?t log:uri ?c . }
=>
{ ?x rdf:type ?t . } .
# Or would this be { ?x foaf:topic [ rdf:type ?t ] . } . ?

# Map og:title to dc:title for content.
{ ?x og:type ?y ;
     og:title ?t .
  ?y list:in ("album" "book" "movie" "song" "tv_show" "article" "blog" "website") . }
=>
{ ?x dc:title ?t . } .

# Map og:title to foaf:name for people.
{ ?x og:type ?y ;
     og:title ?t .
  ?y list:in ("actor" "athlete" "author" "director" "musician" "politician" "public_figure") . }
=>
{ ?x foaf:name ?t . } .

# Map og:title to gn:name for places.
{ ?x og:type ?y ;
     og:title ?t .
  ?y list:in ("city" "country" "landmark" "state_province") . }
=>
{ ?x gn:name ?t . } .

# Can force og:url to foaf:homepage.
{ ?x og:url ?y .
  ?u log:uri ?y . }
=>
{ ?x foaf:homepage ?u . } .

# Can force og:image to foaf:depiction.
{ ?x og:image ?y .
  ?u log:uri ?y . }
=>
{ ?x foaf:depiction ?u . } .

# Can force og:upc to gr:hasEAN_UCC-13.
{ ?x og:upc ?y .
  ("0" ?y) string:concatenation ?c . }
=>
{ ?x gr:hasEAN_UCC-13 ?c . } .
# Not strictly true, because people MIGHT munge the UPC.  If UPC is
# 12-digits, then yes, this would work.  Otherwise...

