@@ -305,29 +305,36 @@ def _ipython_key_completions_(self) -> List[str]:
305305
306306
307307class NamespaceManager (object ):
308- """
309-
310- Class for managing prefix => namespace mappings
311-
312- Sample usage from FuXi ...
313-
314- .. code-block:: python
315-
316- ruleStore = N3RuleStore(additionalBuiltins=additionalBuiltins)
317- nsMgr = NamespaceManager(Graph(ruleStore))
318- ruleGraph = Graph(ruleStore,namespace_manager=nsMgr)
319-
320-
321- and ...
308+ """Class for managing prefix => namespace mappings
309+
310+ This class requires an RDFlib Graph as an input parameter and may optionally have
311+ the parameter bind_namespaces set. This second parameter selects a strategy which
312+ is one of the following:
313+
314+ * core:
315+ * binds several core prefixes only
316+ * owl, rdf, rdfs, xsd, xml from the NAMESPACE_PREFIXES_CORE object
317+ * this is detfault
318+ * rdflib:
319+ * binds all the namespaces shipped with RDFLib as DefinedNamespace instances
320+ * all the core namespaces and all the following: brick, csvw, dc, dcat
321+ * dcmitype, cdterms, dcam, doap, foaf, geo, odrl, org, prof, prov, qb, sdo
322+ * sh, skos, sosa, ssn, time, vann, void
323+ * see the NAMESPACE_PREFIXES_RDFLIB object for the up-to-date list
324+ * cc:
325+ * using prefix bindings from prefix.cc which is a online prefixes database
326+
327+ See the
328+ Sample usage
322329
323330 .. code-block:: pycon
324331
325332 >>> import rdflib
326333 >>> from rdflib import Graph
327334 >>> from rdflib.namespace import Namespace, NamespaceManager
328- >>> exNs = Namespace('http://example.com/')
335+ >>> EX = Namespace('http://example.com/')
329336 >>> namespace_manager = NamespaceManager(Graph())
330- >>> namespace_manager.bind('ex', exNs , override=False)
337+ >>> namespace_manager.bind('ex', EX , override=False)
331338 >>> g = Graph()
332339 >>> g.namespace_manager = namespace_manager
333340 >>> all_ns = [n for n in g.namespace_manager.namespaces()]
0 commit comments