equal
deleted
inserted
replaced
31 connect_config = "%(engine)s://%(user)s:%(password)s@%(host)s:%(port)s/%(name)s"%sa_db_settings |
31 connect_config = "%(engine)s://%(user)s:%(password)s@%(host)s:%(port)s/%(name)s"%sa_db_settings |
32 |
32 |
33 return ConjunctiveGraph.open(self, connect_config, create=create) |
33 return ConjunctiveGraph.open(self, connect_config, create=create) |
34 |
34 |
35 def get_uri_for_term(self, term, context): |
35 def get_uri_for_term(self, term, context): |
36 c = URIRef(context) |
36 c = self.get_context(URIRef(context)) |
37 tl = Literal(term) |
37 tl = Literal(term) |
38 |
38 |
39 for s,p,_ in self.triples((None, None, tl), context=c): |
39 for s,p,_ in self.triples((None, None, tl), context=c): |
40 if p in [URIRef("http://www.w3.org/2004/02/skos/core#prefLabel"), URIRef("http://www.w3.org/2004/02/skos/core#alternateLabel")]: |
40 if p in [URIRef("http://www.w3.org/2004/02/skos/core#prefLabel"), URIRef("http://www.w3.org/2004/02/skos/core#alternateLabel")]: |
41 return unicode(s) |
41 return unicode(s) |