Skip to content

Commit

Permalink
OntCuries.populate
Browse files Browse the repository at this point in the history
wow is that an easier way to do things ...
  • Loading branch information
tgbugs committed Apr 29, 2019
1 parent e398eba commit f4f564a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ontquery/terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ def __new__(cls, *args, **kwargs):

return cls._dict

@classmethod
def populate(cls, graph):
""" populate an rdflib graph with these curies """
[graph.bind(k, v) for k, v in cls._dict.items()]

@classmethod
def qname(cls, iri):
# while / is not *technically* allowed in prefix names by ttl
Expand Down

0 comments on commit f4f564a

Please sign in to comment.