Commits

Anonymous committed d912910

added umbel vocabulary, just fixtures for now

  • Participants
  • Parent commits d6ee6d5

Comments (0)

Files changed (1)

File ordf/vocab/umbel.py

+from ordf.graph import Graph
+from ordf.namespace import register_ns
+
+register_ns("umbel", "http://umbel.org/umbel#")
+register_ns("sc", "http://umbel.org/umbel/sc/")
+register_ns("ac", "http://umbel.org/umbel/ac/")
+register_ns("ne", "http://umbel.org/umbel/ne/")
+
+from ordf.namespace import UMBEL, SC, AC, NE
+
+from logging import getLogger
+log = getLogger(__name__)
+
+def fixtures():
+    def fetch(src):
+        log.info("Fetching %s" % src)
+        g = Graph(identifier=src).parse(src, format="n3")
+        log.info("Parsed %s (%d triples)" % (src, len(g)))
+        return g
+
+    yield fetch("http://umbel.org/ontology/umbel.n3")
+    yield fetch("http://umbel.org/ontology/umbel_subject_concepts.n3")
+    yield fetch("http://umbel.org/ontology/umbel_abstract_concepts.n3")
+    yield fetch("http://umbel.org/ontology/umbel_external_ontologies_linkage.n3")