Source code for brickschema.namespaces

The `namespaces` module provides pointers to standard Brick namespaces
and related ontology namespaces
wrapper class and convenience methods for a Brick graph
from rdflib import Namespace, XSD

BRICK11 = Namespace("")
TAG11 = Namespace("")
BSH11 = Namespace("")

# all versions of Brick > 1.1 have these namespaces
BRICK = Namespace("")
TAG = Namespace("")
BSH = Namespace("")
REF = Namespace("")

# other ontologies
BACNET = Namespace("")

# defaults
OWL = Namespace("")
RDF = Namespace("")
RDFS = Namespace("")
SKOS = Namespace("")
SH = Namespace("")

# QUDT namespaces
QUDT = Namespace("")
QUDTQK = Namespace("")
QUDTDV = Namespace("")
UNIT = Namespace("")

A = RDF.type

[docs]def bind_prefixes(graph, brick_version="1.3"): """ Associate common prefixes with the graph """ graph.bind("rdf", RDF) graph.bind("owl", OWL) graph.bind("rdfs", RDFS) graph.bind("skos", SKOS) graph.bind("sh", SH) graph.bind("qudtqk", QUDTQK) graph.bind("qudt", QUDT) graph.bind("unit", UNIT) graph.bind("ref", REF) graph.bind("bacnet", BACNET) if brick_version == "1.1": graph.bind("brick", BRICK11) graph.bind("tag", TAG11) graph.bind("bsh", BSH11) else: graph.bind("brick", BRICK) graph.bind("tag", TAG) graph.bind("bsh", BSH)