code: function primaryTopic(store, uri) {
    var ret
    var pred
  
    var FOAF = $rdf.Namespace("http://xmlns.com/foaf/0.1/")
  
    var ret = store.any($rdf.sym(uri), FOAF('primaryTopic'), null, $rdf.sym(uri))
  
    if (!ret) {
      var sub = $rdf.sym(uri + '#this')
      pred = store.any(sub, null, null, $rdf.sym(uri))
      if (pred) {
        ret = sub.uri
      }
    } else {
      ret = ret.uri
    }
  
    return ret
  }
docs: Gets primary topic for a uri.  foaf : primaryTopic is check for or <#this>
  @param  {object} store an rdflib store
  @param  {string} uri   a uri
  @return {string} the primary topic or null