A namespace is the topmost layer of an individual ontology, it will contain all classes and properties defined by it. In order to define a namespace you can do:
# These prefixes will be used in the definition of the ontology,
# thus must be explicitly defined
@prefix nrl: <http://tracker.api.gnome.org/ontology/v3/nrl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
# This is our example namespace
@prefix ex: <http://example.org/#>
ex: a nrl:Namespace, nrl:Ontology
nrl:prefix "ex"
rdfs:comment "example ontology"
nrl:lastModified "2017-01-01T15:00:00Z"