Skip to content

Instantly share code, notes, and snippets.

@edsu edsu/properties
Created Jan 6, 2009

What would you like to do?
#!/usr/bin/env python
# awful hack to print out bibo classes, and the properties that hang off of
# them directly
import rdflib
g = rdflib.ConjunctiveGraph()
owl = rdflib.Namespace('')
for klass in g.subjects(predicate=rdflib.RDF.type, object=owl.Class):
if not klass.startswith(''):
print klass
for property in g.subjects(predicate=rdflib.RDFS.domain, object=klass):
print " " + property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.