summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Car <nicholas.car@surroundaustralia.com>2021-07-15 10:04:50 +1000
committerNicholas Car <nicholas.car@surroundaustralia.com>2021-07-15 10:04:50 +1000
commit9071117a4a70b8d1dbf9436919ce1d671b2bdc86 (patch)
tree60faa6287155c0614e6011e92fc09b0a10e24a27
parentc62a573b4e9fbdcadcf2e008531c2c1579b81b5d (diff)
downloadrdflib-9071117a4a70b8d1dbf9436919ce1d671b2bdc86.tar.gz
fix docc build warnings
-rw-r--r--docs/developers.rst2
-rw-r--r--docs/index.rst1
-rw-r--r--rdflib/extras/external_graph_libs.py81
-rw-r--r--rdflib/extras/infixowl.py369
-rw-r--r--rdflib/graph.py21
-rw-r--r--rdflib/namespace/_DCAT.py75
-rw-r--r--rdflib/namespace/_DCTERMS.py7
-rw-r--r--rdflib/namespace/_DOAP.py23
-rw-r--r--rdflib/namespace/_ODRL2.py14
-rw-r--r--rdflib/namespace/_ORG.py30
-rw-r--r--rdflib/namespace/_OWL.py17
-rw-r--r--rdflib/namespace/_PROF.py16
-rw-r--r--rdflib/namespace/_PROV.py71
-rw-r--r--rdflib/namespace/_QB.py11
-rw-r--r--rdflib/namespace/_SKOS.py14
-rw-r--r--rdflib/namespace/_SOSA.py13
-rw-r--r--rdflib/namespace/_SSN.py26
-rw-r--r--rdflib/namespace/_TIME.py29
-rw-r--r--rdflib/namespace/_VOID.py14
-rw-r--r--rdflib/namespace/_XSD.py40
-rwxr-xr-xrdflib/plugins/parsers/notation3.py1
-rw-r--r--rdflib/plugins/parsers/ntriples.py1
22 files changed, 319 insertions, 557 deletions
diff --git a/docs/developers.rst b/docs/developers.rst
index 56d6761b..7b44d1b2 100644
--- a/docs/developers.rst
+++ b/docs/developers.rst
@@ -48,7 +48,7 @@ Writing documentation
We use sphinx for generating HTML docs, see :ref:`docs`
Continuous Integration
----------------------
+----------------------
We used Drone for CI, see:
diff --git a/docs/index.rst b/docs/index.rst
index b79c75a1..f82e1d97 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -84,7 +84,6 @@ For developers
developers
docs
- univrdfstore
persisting_n3_terms
Developers might also like to join rdflib's dev mailing list: `<https://groups.google.com/group/rdflib-dev>`__
diff --git a/rdflib/extras/external_graph_libs.py b/rdflib/extras/external_graph_libs.py
index cf805c48..869b6c91 100644
--- a/rdflib/extras/external_graph_libs.py
+++ b/rdflib/extras/external_graph_libs.py
@@ -77,11 +77,12 @@ def rdflib_to_networkx_multidigraph(
The subjects and objects are the later nodes of the MultiDiGraph.
The predicates are used as edge keys (to identify multi-edges).
- Arguments:
- graph: a rdflib.Graph.
- edge_attrs: Callable to construct later edge_attributes. It receives
+ :Parameters:
+
+ - graph: a rdflib.Graph.
+ - edge_attrs: Callable to construct later edge_attributes. It receives
3 variables (s, p, o) and should construct a dictionary that is
- passed to networkx's add_edge(s, o, **attrs) function.
+ passed to networkx's add_edge(s, o, \*\*attrs) function.
By default this will include setting the MultiDiGraph key=p here.
If you don't want to be able to re-identify the edge later on, you
@@ -135,12 +136,13 @@ def rdflib_to_networkx_digraph(
all triples between s and o.
Also by default calculates the edge weight as the length of triples.
- Args:
- graph: a rdflib.Graph.
- calc_weights: If true calculate multi-graph edge-count as edge 'weight'
- edge_attrs: Callable to construct later edge_attributes. It receives
- 3 variables (s, p, o) and should construct a dictionary that is
- passed to networkx's add_edge(s, o, **attrs) function.
+ :Parameters:
+
+ - `graph`: a rdflib.Graph.
+ - `calc_weights`: If true calculate multi-graph edge-count as edge 'weight'
+ - `edge_attrs`: Callable to construct later edge_attributes. It receives
+ 3 variables (s, p, o) and should construct a dictionary that is passed to
+ networkx's add_edge(s, o, \*\*attrs) function.
By default this will include setting the 'triples' attribute here,
which is treated specially by us to be merged. Other attributes of
@@ -148,8 +150,7 @@ def rdflib_to_networkx_digraph(
If you don't want the 'triples' attribute for tracking, set this to
`lambda s, p, o: {}`.
- Returns:
- networkx.DiGraph
+ Returns: networkx.DiGraph
>>> from rdflib import Graph, URIRef, Literal
>>> g = Graph()
@@ -176,6 +177,7 @@ def rdflib_to_networkx_digraph(
False
>>> 'triples' in dg[a][b]
False
+
"""
import networkx as nx
@@ -197,18 +199,19 @@ def rdflib_to_networkx_graph(
list of triples between s and o in graph.
Also by default calculates the edge weight as the len(triples).
- Args:
- graph: a rdflib.Graph.
- calc_weights: If true calculate multi-graph edge-count as edge 'weight'
- edge_attrs: Callable to construct later edge_attributes. It receives
- 3 variables (s, p, o) and should construct a dictionary that is
- passed to networkx's add_edge(s, o, **attrs) function.
+ :Parameters:
- By default this will include setting the 'triples' attribute here,
- which is treated specially by us to be merged. Other attributes of
- multi-edges will only contain the attributes of the first edge.
- If you don't want the 'triples' attribute for tracking, set this to
- `lambda s, p, o: {}`.
+ - graph: a rdflib.Graph.
+ - calc_weights: If true calculate multi-graph edge-count as edge 'weight'
+ - edge_attrs: Callable to construct later edge_attributes. It receives
+ 3 variables (s, p, o) and should construct a dictionary that is
+ passed to networkx's add_edge(s, o, \*\*attrs) function.
+
+ By default this will include setting the 'triples' attribute here,
+ which is treated specially by us to be merged. Other attributes of
+ multi-edges will only contain the attributes of the first edge.
+ If you don't want the 'triples' attribute for tracking, set this to
+ `lambda s, p, o: {}`.
Returns:
networkx.Graph
@@ -259,22 +262,21 @@ def rdflib_to_graphtool(
The subjects and objects are the later vertices of the Graph.
The predicates become edges.
- Arguments:
- graph: a rdflib.Graph.
- v_prop_names: a list of names for the vertex properties. The default is
- set to ['term'] (see transform_s, transform_o below).
- e_prop_names: a list of names for the edge properties.
- transform_s: callable with s, p, o input. Should return a dictionary
- containing a value for each name in v_prop_names. By default is set
- to {'term': s} which in combination with v_prop_names = ['term']
- adds s as 'term' property to the generated vertex for s.
- transform_p: similar to transform_s, but wrt. e_prop_names. By default
- returns {'term': p} which adds p as a property to the generated
- edge between the vertex for s and the vertex for o.
- transform_o: similar to transform_s.
-
- Returns:
- graph_tool.Graph()
+ :Parameters:
+ - graph: a rdflib.Graph.
+ - v_prop_names: a list of names for the vertex properties. The default is set
+ to ['term'] (see transform_s, transform_o below).
+ - e_prop_names: a list of names for the edge properties.
+ - transform_s: callable with s, p, o input. Should return a dictionary
+ containing a value for each name in v_prop_names. By default is set
+ to {'term': s} which in combination with v_prop_names = ['term']
+ adds s as 'term' property to the generated vertex for s.
+ - transform_p: similar to transform_s, but wrt. e_prop_names. By default
+ returns {'term': p} which adds p as a property to the generated
+ edge between the vertex for s and the vertex for o.
+ - transform_o: similar to transform_s.
+
+ Returns: graph_tool.Graph()
>>> from rdflib import Graph, URIRef, Literal
>>> g = Graph()
@@ -309,6 +311,7 @@ def rdflib_to_graphtool(
True
>>> len(list(gt_util.find_edge(mdg, epterm, unicode(q)))) == 1
True
+
"""
import graph_tool as gt
diff --git a/rdflib/extras/infixowl.py b/rdflib/extras/infixowl.py
index 83f02bce..db541161 100644
--- a/rdflib/extras/infixowl.py
+++ b/rdflib/extras/infixowl.py
@@ -1,8 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-__doc__ = """
-RDFLib Python binding for OWL Abstract Syntax
+__doc__ = """RDFLib Python binding for OWL Abstract Syntax
see: http://www.w3.org/TR/owl-semantics/syntax.html
http://owl-workshop.man.ac.uk/acceptedLong/submission_9.pdf
@@ -12,13 +11,12 @@ see: http://www.w3.org/TR/owl-semantics/syntax.html
Named class description of type 2 (with owl:oneOf) or type 4-6
(with owl:intersectionOf, owl:unionOf or owl:complementOf
-
Uses Manchester Syntax for __repr__
>>> exNs = Namespace('http://example.com/')
>>> namespace_manager = NamespaceManager(Graph())
>>> namespace_manager.bind('ex', exNs, override=False)
->>> namespace_manager.bind('owl', OWL_NS, override=False)
+>>> namespace_manager.bind('owl', OWL, override=False)
>>> g = Graph()
>>> g.namespace_manager = namespace_manager
@@ -41,10 +39,10 @@ We can then access the rdfs:subClassOf relationships
This can also be used against already populated graphs:
->>> owlGraph = Graph().parse(OWL_NS) #doctest: +SKIP
->>> namespace_manager.bind('owl', OWL_NS, override=False) #doctest: +SKIP
+>>> owlGraph = Graph().parse(OWL) #doctest: +SKIP
+>>> namespace_manager.bind('owl', OWL, override=False) #doctest: +SKIP
>>> owlGraph.namespace_manager = namespace_manager #doctest: +SKIP
->>> list(Class(OWL_NS.Class, graph=owlGraph).subClassOf) #doctest: +SKIP
+>>> list(Class(OWL.Class, graph=owlGraph).subClassOf) #doctest: +SKIP
[Class: rdfs:Class ]
Operators are also available. For instance we can add ex:Opera to the extension
@@ -115,7 +113,7 @@ import itertools
from rdflib import BNode, Literal, Namespace, RDF, RDFS, URIRef, Variable
from rdflib.graph import Graph
from rdflib.collection import Collection
-from rdflib.namespace import XSD as _XSD_NS
+from rdflib.namespace import OWL, XSD
from rdflib.namespace import NamespaceManager
from rdflib.term import Identifier
from rdflib.util import first
@@ -135,7 +133,6 @@ operators can be defined.
"""
__all__ = [
- "OWL_NS",
"nsBinds",
"ACE_NS",
"CLASS_RELATIONS",
@@ -202,13 +199,11 @@ class Infix:
return self.function(value1, value2)
-OWL_NS = Namespace("http://www.w3.org/2002/07/owl#")
-
nsBinds = {
"skos": "http://www.w3.org/2004/02/skos/core#",
"rdf": RDF,
"rdfs": RDFS,
- "owl": OWL_NS,
+ "owl": OWL,
"list": URIRef("http://www.w3.org/2000/10/swap/list#"),
"dc": "http://purl.org/dc/elements/1.1/",
}
@@ -259,7 +254,7 @@ def manchesterSyntax(thing, store, boolean=None, transientList=False):
children = [
manchesterSyntax(child, store) for child in Collection(store, thing)
]
- if boolean == OWL_NS.intersectionOf:
+ if boolean == OWL.intersectionOf:
childList = []
named = []
for child in liveChildren:
@@ -289,33 +284,33 @@ def manchesterSyntax(thing, store, boolean=None, transientList=False):
return prefix
else:
return "( " + " AND ".join([str(c) for c in children]) + " )"
- elif boolean == OWL_NS.unionOf:
+ elif boolean == OWL.unionOf:
return "( " + " OR ".join([str(c) for c in children]) + " )"
- elif boolean == OWL_NS.oneOf:
+ elif boolean == OWL.oneOf:
return "{ " + " ".join([str(c) for c in children]) + " }"
else:
- assert boolean == OWL_NS.complementOf
- elif OWL_NS.Restriction in store.objects(subject=thing, predicate=RDF.type):
- prop = list(store.objects(subject=thing, predicate=OWL_NS.onProperty))[0]
+ assert boolean == OWL.complementOf
+ elif OWL.Restriction in store.objects(subject=thing, predicate=RDF.type):
+ prop = list(store.objects(subject=thing, predicate=OWL.onProperty))[0]
prefix, uri, localName = store.compute_qname(prop)
propString = ":".join([prefix, localName])
label = first(store.objects(subject=prop, predicate=RDFS.label))
if label:
propString = "'%s'" % label
- for onlyClass in store.objects(subject=thing, predicate=OWL_NS.allValuesFrom):
+ for onlyClass in store.objects(subject=thing, predicate=OWL.allValuesFrom):
return "( %s ONLY %s )" % (propString, manchesterSyntax(onlyClass, store))
- for val in store.objects(subject=thing, predicate=OWL_NS.hasValue):
+ for val in store.objects(subject=thing, predicate=OWL.hasValue):
return "( %s VALUE %s )" % (propString, manchesterSyntax(val, store))
- for someClass in store.objects(subject=thing, predicate=OWL_NS.someValuesFrom):
+ for someClass in store.objects(subject=thing, predicate=OWL.someValuesFrom):
return "( %s SOME %s )" % (propString, manchesterSyntax(someClass, store))
cardLookup = {
- OWL_NS.maxCardinality: "MAX",
- OWL_NS.minCardinality: "MIN",
- OWL_NS.cardinality: "EQUALS",
+ OWL.maxCardinality: "MAX",
+ OWL.minCardinality: "MIN",
+ OWL.cardinality: "EQUALS",
}
for s, p, o in store.triples_choices((thing, list(cardLookup.keys()), None)):
return "( %s %s %s )" % (propString, cardLookup[p], o)
- compl = list(store.objects(subject=thing, predicate=OWL_NS.complementOf))
+ compl = list(store.objects(subject=thing, predicate=OWL.complementOf))
if compl:
return "( NOT %s )" % (manchesterSyntax(compl[0], store))
else:
@@ -347,7 +342,7 @@ def manchesterSyntax(thing, store, boolean=None, transientList=False):
def GetIdentifiedClasses(graph):
- for c in graph.subjects(predicate=RDF.type, object=OWL_NS.Class):
+ for c in graph.subjects(predicate=RDF.type, object=OWL.Class):
if isinstance(c, URIRef):
yield Class(c)
@@ -429,7 +424,7 @@ class Individual(object):
def _delete_type(self):
"""
>>> g = Graph()
- >>> b=Individual(OWL_NS.Restriction,g)
+ >>> b=Individual(OWL.Restriction,g)
>>> b.type = RDF.Resource
>>> len(list(b.type))
1
@@ -472,20 +467,20 @@ class Individual(object):
identifier = property(_get_identifier, _set_identifier)
def _get_sameAs(self):
- for _t in self.graph.objects(subject=self.identifier, predicate=OWL_NS.sameAs):
+ for _t in self.graph.objects(subject=self.identifier, predicate=OWL.sameAs):
yield _t
def _set_sameAs(self, term):
# if not kind:
# return
if isinstance(term, (Individual, Identifier)):
- self.graph.add((self.identifier, OWL_NS.sameAs, classOrIdentifier(term)))
+ self.graph.add((self.identifier, OWL.sameAs, classOrIdentifier(term)))
else:
for c in term:
assert isinstance(c, (Individual, Identifier))
- self.graph.add((self.identifier, OWL_NS.sameAs, classOrIdentifier(c)))
+ self.graph.add((self.identifier, OWL.sameAs, classOrIdentifier(c)))
- @TermDeletionHelper(OWL_NS.sameAs)
+ @TermDeletionHelper(OWL.sameAs)
def _delete_sameAs(self):
pass
@@ -518,32 +513,32 @@ class AnnotatableTerms(Individual):
# PN_sg singular form of a proper name ()
self.PN_sgProp = Property(
- ACE_NS.PN_sg, baseType=OWL_NS.AnnotationProperty, graph=self.graph
+ ACE_NS.PN_sg, baseType=OWL.AnnotationProperty, graph=self.graph
)
# CN_sg singular form of a common noun
self.CN_sgProp = Property(
- ACE_NS.CN_sg, baseType=OWL_NS.AnnotationProperty, graph=self.graph
+ ACE_NS.CN_sg, baseType=OWL.AnnotationProperty, graph=self.graph
)
# CN_pl plural form of a common noun
self.CN_plProp = Property(
- ACE_NS.CN_pl, baseType=OWL_NS.AnnotationProperty, graph=self.graph
+ ACE_NS.CN_pl, baseType=OWL.AnnotationProperty, graph=self.graph
)
# singular form of a transitive verb
self.TV_sgProp = Property(
- ACE_NS.TV_sg, baseType=OWL_NS.AnnotationProperty, graph=self.graph
+ ACE_NS.TV_sg, baseType=OWL.AnnotationProperty, graph=self.graph
)
# plural form of a transitive verb
self.TV_plProp = Property(
- ACE_NS.TV_pl, baseType=OWL_NS.AnnotationProperty, graph=self.graph
+ ACE_NS.TV_pl, baseType=OWL.AnnotationProperty, graph=self.graph
)
# past participle form a transitive verb
self.TV_vbgProp = Property(
- ACE_NS.TV_vbg, baseType=OWL_NS.AnnotationProperty, graph=self.graph
+ ACE_NS.TV_vbg, baseType=OWL.AnnotationProperty, graph=self.graph
)
def _get_comment(self):
@@ -600,7 +595,7 @@ class AnnotatableTerms(Individual):
def _delete_label(self):
"""
>>> g=Graph()
- >>> b=Individual(OWL_NS.Restriction,g)
+ >>> b=Individual(OWL.Restriction,g)
>>> b.label = Literal('boo')
>>> len(list(b.label))
1
@@ -620,15 +615,15 @@ class Ontology(AnnotatableTerms):
super(Ontology, self).__init__(identifier, graph)
self.imports = imports and imports or []
self.comment = comment and comment or []
- if (self.identifier, RDF.type, OWL_NS.Ontology) not in self.graph:
- self.graph.add((self.identifier, RDF.type, OWL_NS.Ontology))
+ if (self.identifier, RDF.type, OWL.Ontology) not in self.graph:
+ self.graph.add((self.identifier, RDF.type, OWL.Ontology))
def setVersion(self, version):
- self.graph.set((self.identifier, OWL_NS.versionInfo, version))
+ self.graph.set((self.identifier, OWL.versionInfo, version))
def _get_imports(self):
for owl in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS["imports"]
+ subject=self.identifier, predicate=OWL["imports"]
):
yield owl
@@ -636,9 +631,9 @@ class Ontology(AnnotatableTerms):
if not other:
return
for o in other:
- self.graph.add((self.identifier, OWL_NS["imports"], o))
+ self.graph.add((self.identifier, OWL["imports"], o))
- @TermDeletionHelper(OWL_NS["imports"])
+ @TermDeletionHelper(OWL["imports"])
def _del_imports(self):
pass
@@ -647,7 +642,7 @@ class Ontology(AnnotatableTerms):
def AllClasses(graph):
prevClasses = set()
- for c in graph.subjects(predicate=RDF.type, object=OWL_NS.Class):
+ for c in graph.subjects(predicate=RDF.type, object=OWL.Class):
if c not in prevClasses:
prevClasses.add(c)
yield Class(c)
@@ -660,25 +655,25 @@ def AllProperties(graph):
None,
RDF.type,
[
- OWL_NS.SymmetricProperty,
- OWL_NS.FunctionalProperty,
- OWL_NS.InverseFunctionalProperty,
- OWL_NS.TransitiveProperty,
- OWL_NS.DatatypeProperty,
- OWL_NS.ObjectProperty,
- OWL_NS.AnnotationProperty,
+ OWL.SymmetricProperty,
+ OWL.FunctionalProperty,
+ OWL.InverseFunctionalProperty,
+ OWL.TransitiveProperty,
+ OWL.DatatypeProperty,
+ OWL.ObjectProperty,
+ OWL.AnnotationProperty,
],
)
):
if o in [
- OWL_NS.SymmetricProperty,
- OWL_NS.InverseFunctionalProperty,
- OWL_NS.TransitiveProperty,
- OWL_NS.ObjectProperty,
+ OWL.SymmetricProperty,
+ OWL.InverseFunctionalProperty,
+ OWL.TransitiveProperty,
+ OWL.ObjectProperty,
]:
- bType = OWL_NS.ObjectProperty
+ bType = OWL.ObjectProperty
else:
- bType = OWL_NS.DatatypeProperty
+ bType = OWL.DatatypeProperty
if s not in prevProps:
prevProps.add(s)
yield Property(s, graph=graph, baseType=bType)
@@ -698,20 +693,20 @@ class ClassNamespaceFactory(Namespace):
return self.term(name)
-CLASS_RELATIONS = set(OWL_NS.resourceProperties).difference(
+CLASS_RELATIONS = set(Namespace("http://www.w3.org/2002/07/owl#resourceProperties")).difference(
[
- OWL_NS.onProperty,
- OWL_NS.allValuesFrom,
- OWL_NS.hasValue,
- OWL_NS.someValuesFrom,
- OWL_NS.inverseOf,
- OWL_NS.imports,
- OWL_NS.versionInfo,
- OWL_NS.backwardCompatibleWith,
- OWL_NS.incompatibleWith,
- OWL_NS.unionOf,
- OWL_NS.intersectionOf,
- OWL_NS.oneOf,
+ OWL.onProperty,
+ OWL.allValuesFrom,
+ OWL.hasValue,
+ OWL.someValuesFrom,
+ OWL.inverseOf,
+ OWL.imports,
+ OWL.versionInfo,
+ OWL.backwardCompatibleWith,
+ OWL.incompatibleWith,
+ OWL.unionOf,
+ OWL.intersectionOf,
+ OWL.oneOf,
]
)
@@ -721,11 +716,11 @@ def ComponentTerms(cls):
Takes a Class instance and returns a generator over the classes that
are involved in its definition, ignoring unnamed classes
"""
- if OWL_NS.Restriction in cls.type:
+ if OWL.Restriction in cls.type:
try:
cls = CastClass(cls, Individual.factoryGraph)
for s, p, innerClsId in cls.factoryGraph.triples_choices(
- (cls.identifier, [OWL_NS.allValuesFrom, OWL_NS.someValuesFrom], None)
+ (cls.identifier, [OWL.allValuesFrom, OWL.someValuesFrom], None)
):
innerCls = Class(innerClsId, skipOWLClassMembership=True)
if isinstance(innerClsId, BNode):
@@ -770,7 +765,7 @@ def DeepClassClear(classToPrune):
>>> EX = Namespace('http://example.com/')
>>> namespace_manager = NamespaceManager(Graph())
>>> namespace_manager.bind('ex', EX, override=False)
- >>> namespace_manager.bind('owl', OWL_NS, override=False)
+ >>> namespace_manager.bind('owl', OWL, override=False)
>>> g = Graph()
>>> g.namespace_manager = namespace_manager
>>> Individual.factoryGraph = g
@@ -818,10 +813,10 @@ def DeepClassClear(classToPrune):
classToPrune.graph.remove((classToPrune.identifier, RDFS.subClassOf, None))
for c in classToPrune.equivalentClass:
deepClearIfBNode(c)
- classToPrune.graph.remove((classToPrune.identifier, OWL_NS.equivalentClass, None))
+ classToPrune.graph.remove((classToPrune.identifier, OWL.equivalentClass, None))
inverseClass = classToPrune.complementOf
if inverseClass:
- classToPrune.graph.remove((classToPrune.identifier, OWL_NS.complementOf, None))
+ classToPrune.graph.remove((classToPrune.identifier, OWL.complementOf, None))
deepClearIfBNode(inverseClass)
if isinstance(classToPrune, BooleanClass):
for c in classToPrune:
@@ -843,18 +838,18 @@ class MalformedClass(Exception):
def CastClass(c, graph=None):
graph = graph is None and c.factoryGraph or graph
for kind in graph.objects(subject=classOrIdentifier(c), predicate=RDF.type):
- if kind == OWL_NS.Restriction:
+ if kind == OWL.Restriction:
kwArgs = {"identifier": classOrIdentifier(c), "graph": graph}
for s, p, o in graph.triples((classOrIdentifier(c), None, None)):
if p != RDF.type:
- if p == OWL_NS.onProperty:
+ if p == OWL.onProperty:
kwArgs["onProperty"] = o
else:
if p not in Restriction.restrictionKinds:
continue
- kwArgs[str(p.split(OWL_NS)[-1])] = o
+ kwArgs[str(p.split(OWL)[-1])] = o
if not set(
- [str(i.split(OWL_NS)[-1]) for i in Restriction.restrictionKinds]
+ [str(i.split(OWL)[-1]) for i in Restriction.restrictionKinds]
).intersection(kwArgs):
raise MalformedClass("Malformed owl:Restriction")
return Restriction(**kwArgs)
@@ -862,15 +857,15 @@ def CastClass(c, graph=None):
for s, p, o in graph.triples_choices(
(
classOrIdentifier(c),
- [OWL_NS.intersectionOf, OWL_NS.unionOf, OWL_NS.oneOf],
+ [OWL.intersectionOf, OWL.unionOf, OWL.oneOf],
None,
)
):
- if p == OWL_NS.oneOf:
+ if p == OWL.oneOf:
return EnumeratedClass(classOrIdentifier(c), graph=graph)
else:
return BooleanClass(classOrIdentifier(c), operator=p, graph=graph)
- # assert (classOrIdentifier(c),RDF.type,OWL_NS.Class) in graph
+ # assert (classOrIdentifier(c),RDF.type,OWL.Class) in graph
return Class(classOrIdentifier(c), graph=graph, skipOWLClassMembership=True)
@@ -885,9 +880,9 @@ class Class(AnnotatableTerms):
[Annotation]
‘Class:’ classID {Annotation
- ( (‘SubClassOf:’ ClassExpression)
- | (‘EquivalentTo’ ClassExpression)
- | (’DisjointWith’ ClassExpression)) }
+ ( (‘SubClassOf:’ ClassExpression)
+ | (‘EquivalentTo’ ClassExpression)
+ | (’DisjointWith’ ClassExpression)) }
Appropriate excerpts from OWL Reference:
@@ -955,10 +950,10 @@ class Class(AnnotatableTerms):
self.setupNounAnnotations(nounAnnotations)
if (
not skipOWLClassMembership
- and (self.identifier, RDF.type, OWL_NS.Class) not in self.graph
- and (self.identifier, RDF.type, OWL_NS.Restriction) not in self.graph
+ and (self.identifier, RDF.type, OWL.Class) not in self.graph
+ and (self.identifier, RDF.type, OWL.Restriction) not in self.graph
):
- self.graph.add((self.identifier, RDF.type, OWL_NS.Class))
+ self.graph.add((self.identifier, RDF.type, OWL.Class))
self.subClassOf = subClassOf and subClassOf or []
self.equivalentClass = equivalentClass and equivalentClass or []
@@ -1001,8 +996,8 @@ class Class(AnnotatableTerms):
def __hash__(self):
"""
- >>> b=Class(OWL_NS.Restriction)
- >>> c=Class(OWL_NS.Restriction)
+ >>> b=Class(OWL.Restriction)
+ >>> c=Class(OWL.Restriction)
>>> len(set([b,c]))
1
"""
@@ -1034,7 +1029,7 @@ class Class(AnnotatableTerms):
this class and 'other' and return it
"""
return BooleanClass(
- operator=OWL_NS.unionOf, members=[self, other], graph=self.graph
+ operator=OWL.unionOf, members=[self, other], graph=self.graph
)
def __and__(self, other):
@@ -1045,7 +1040,7 @@ class Class(AnnotatableTerms):
>>> exNs = Namespace('http://example.com/')
>>> namespace_manager = NamespaceManager(Graph())
>>> namespace_manager.bind('ex', exNs, override=False)
- >>> namespace_manager.bind('owl', OWL_NS, override=False)
+ >>> namespace_manager.bind('owl', OWL, override=False)
>>> g = Graph()
>>> g.namespace_manager = namespace_manager
@@ -1063,7 +1058,7 @@ class Class(AnnotatableTerms):
True
"""
return BooleanClass(
- operator=OWL_NS.intersectionOf, members=[self, other], graph=self.graph
+ operator=OWL.intersectionOf, members=[self, other], graph=self.graph
)
def _get_subClassOf(self):
@@ -1086,7 +1081,7 @@ class Class(AnnotatableTerms):
def _get_equivalentClass(self):
for ec in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS.equivalentClass
+ subject=self.identifier, predicate=OWL.equivalentClass
):
yield Class(ec, graph=self.graph)
@@ -1095,10 +1090,10 @@ class Class(AnnotatableTerms):
return
for sc in other:
self.graph.add(
- (self.identifier, OWL_NS.equivalentClass, classOrIdentifier(sc))
+ (self.identifier, OWL.equivalentClass, classOrIdentifier(sc))
)
- @TermDeletionHelper(OWL_NS.equivalentClass)
+ @TermDeletionHelper(OWL.equivalentClass)
def _del_equivalentClass(self):
pass
@@ -1108,7 +1103,7 @@ class Class(AnnotatableTerms):
def _get_disjointWith(self):
for dc in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS.disjointWith
+ subject=self.identifier, predicate=OWL.disjointWith
):
yield Class(dc, graph=self.graph)
@@ -1116,9 +1111,9 @@ class Class(AnnotatableTerms):
if not other:
return
for c in other:
- self.graph.add((self.identifier, OWL_NS.disjointWith, classOrIdentifier(c)))
+ self.graph.add((self.identifier, OWL.disjointWith, classOrIdentifier(c)))
- @TermDeletionHelper(OWL_NS.disjointWith)
+ @TermDeletionHelper(OWL.disjointWith)
def _del_disjointWith(self):
pass
@@ -1126,7 +1121,7 @@ class Class(AnnotatableTerms):
def _get_complementOf(self):
comp = list(
- self.graph.objects(subject=self.identifier, predicate=OWL_NS.complementOf)
+ self.graph.objects(subject=self.identifier, predicate=OWL.complementOf)
)
if not comp:
return None
@@ -1138,9 +1133,9 @@ class Class(AnnotatableTerms):
def _set_complementOf(self, other):
if not other:
return
- self.graph.add((self.identifier, OWL_NS.complementOf, classOrIdentifier(other)))
+ self.graph.add((self.identifier, OWL.complementOf, classOrIdentifier(other)))
- @TermDeletionHelper(OWL_NS.complementOf)
+ @TermDeletionHelper(OWL.complementOf)
def _del_complementOf(self):
pass
@@ -1155,7 +1150,7 @@ class Class(AnnotatableTerms):
>>> exNs = Namespace('http://example.com/')
>>> namespace_manager = NamespaceManager(Graph())
>>> namespace_manager.bind('ex', exNs, override=False)
- >>> namespace_manager.bind('owl', OWL_NS, override=False)
+ >>> namespace_manager.bind('owl', OWL, override=False)
>>> g = Graph()
>>> g.namespace_manager = namespace_manager
>>> Individual.factoryGraph = g
@@ -1185,11 +1180,11 @@ class Class(AnnotatableTerms):
collectionHead = listSiblings[-1]
else:
collectionHead = link
- for disjCls in self.factoryGraph.subjects(OWL_NS.unionOf, collectionHead):
+ for disjCls in self.factoryGraph.subjects(OWL.unionOf, collectionHead):
if isinstance(disjCls, URIRef):
yield Class(disjCls, skipOWLClassMembership=True)
for rdfList in self.factoryGraph.objects(
- self.identifier, OWL_NS.intersectionOf
+ self.identifier, OWL.intersectionOf
):
for member in OWLRDFListProxy([rdfList], graph=self.factoryGraph):
if isinstance(member, URIRef):
@@ -1198,12 +1193,12 @@ class Class(AnnotatableTerms):
parents = property(_get_parents)
def isPrimitive(self):
- if (self.identifier, RDF.type, OWL_NS.Restriction) in self.graph:
+ if (self.identifier, RDF.type, OWL.Restriction) in self.graph:
return False
# sc = list(self.subClassOf)
ec = list(self.equivalentClass)
for boolClass, p, rdfList in self.graph.triples_choices(
- (self.identifier, [OWL_NS.intersectionOf, OWL_NS.unionOf], None)
+ (self.identifier, [OWL.intersectionOf, OWL.unionOf], None)
):
ec.append(manchesterSyntax(rdfList, self.graph, boolean=p))
for e in ec:
@@ -1229,7 +1224,7 @@ class Class(AnnotatableTerms):
sc = list(self.subClassOf)
ec = list(self.equivalentClass)
for boolClass, p, rdfList in self.graph.triples_choices(
- (self.identifier, [OWL_NS.intersectionOf, OWL_NS.unionOf], None)
+ (self.identifier, [OWL.intersectionOf, OWL.unionOf], None)
):
ec.append(manchesterSyntax(rdfList, self.graph, boolean=p))
dc = list(self.disjointWith)
@@ -1389,7 +1384,7 @@ class EnumeratedClass(OWLRDFListProxy, Class):
>>> exNs = Namespace('http://example.com/')
>>> namespace_manager = NamespaceManager(Graph())
>>> namespace_manager.bind('ex', exNs, override=False)
- >>> namespace_manager.bind('owl', OWL_NS, override=False)
+ >>> namespace_manager.bind('owl', OWL, override=False)
>>> g = Graph()
>>> g.namespace_manager = namespace_manager
>>> Individual.factoryGraph = g
@@ -1400,7 +1395,7 @@ class EnumeratedClass(OWLRDFListProxy, Class):
>>> ogbujiBros #doctest: +SKIP
{ ex:chime ex:uche ex:ejike }
>>> col = Collection(g, first(
- ... g.objects(predicate=OWL_NS.oneOf, subject=ogbujiBros.identifier)))
+ ... g.objects(predicate=OWL.oneOf, subject=ogbujiBros.identifier)))
>>> [g.qname(item) for item in col]
[u'ex:chime', u'ex:uche', u'ex:ejike']
>>> print(g.serialize(format='n3')) #doctest: +SKIP
@@ -1414,7 +1409,7 @@ class EnumeratedClass(OWLRDFListProxy, Class):
<BLANKLINE>
"""
- _operator = OWL_NS.oneOf
+ _operator = OWL.oneOf
def isPrimitive(self):
return False
@@ -1423,7 +1418,7 @@ class EnumeratedClass(OWLRDFListProxy, Class):
Class.__init__(self, identifier, graph=graph)
members = members and members or []
rdfList = list(
- self.graph.objects(predicate=OWL_NS.oneOf, subject=self.identifier)
+ self.graph.objects(predicate=OWL.oneOf, subject=self.identifier)
)
OWLRDFListProxy.__init__(self, rdfList, members)
@@ -1446,7 +1441,7 @@ class EnumeratedClass(OWLRDFListProxy, Class):
self._serialize(graph)
-BooleanPredicates = [OWL_NS.intersectionOf, OWL_NS.unionOf]
+BooleanPredicates = [OWL.intersectionOf, OWL.unionOf]
class BooleanClassExtentHelper:
@@ -1461,7 +1456,7 @@ class BooleanClassExtentHelper:
>>> water = Class(EX.Water)
>>> testClass = BooleanClass(members=[fire, water])
>>> testClass2 = BooleanClass(
- ... operator=OWL_NS.unionOf, members=[fire, water])
+ ... operator=OWL.unionOf, members=[fire, water])
>>> for c in BooleanClass.getIntersections():
... print(c) #doctest: +SKIP
( ex:Fire AND ex:Water )
@@ -1494,14 +1489,14 @@ class BooleanClass(OWLRDFListProxy, Class):
"""
- @BooleanClassExtentHelper(OWL_NS.intersectionOf)
+ @BooleanClassExtentHelper(OWL.intersectionOf)
@Callable
def getIntersections(): # type: ignore[misc]
pass
getIntersections = Callable(getIntersections)
- @BooleanClassExtentHelper(OWL_NS.unionOf)
+ @BooleanClassExtentHelper(OWL.unionOf)
@Callable
def getUnions(): # type: ignore[misc]
pass
@@ -1509,18 +1504,18 @@ class BooleanClass(OWLRDFListProxy, Class):
getUnions = Callable(getUnions)
def __init__(
- self, identifier=None, operator=OWL_NS.intersectionOf, members=None, graph=None
+ self, identifier=None, operator=OWL.intersectionOf, members=None, graph=None
):
if operator is None:
props = []
for s, p, o in graph.triples_choices(
- (identifier, [OWL_NS.intersectionOf, OWL_NS.unionOf], None)
+ (identifier, [OWL.intersectionOf, OWL.unionOf], None)
):
props.append(p)
operator = p
assert len(props) == 1, repr(props)
Class.__init__(self, identifier, graph=graph)
- assert operator in [OWL_NS.intersectionOf, OWL_NS.unionOf], str(operator)
+ assert operator in [OWL.intersectionOf, OWL.unionOf], str(operator)
self._operator = operator
rdfList = list(self.graph.objects(predicate=operator, subject=self.identifier))
assert not members or not rdfList, (
@@ -1571,10 +1566,10 @@ class BooleanClass(OWLRDFListProxy, Class):
>>> testClass = BooleanClass(members=[fire,water])
>>> testClass #doctest: +SKIP
( ex:Fire AND ex:Water )
- >>> testClass.changeOperator(OWL_NS.unionOf)
+ >>> testClass.changeOperator(OWL.unionOf)
>>> testClass #doctest: +SKIP
( ex:Fire OR ex:Water )
- >>> try: testClass.changeOperator(OWL_NS.unionOf)
+ >>> try: testClass.changeOperator(OWL.unionOf)
... except Exception as e: print(e)
The new operator is already being used!
@@ -1594,7 +1589,7 @@ class BooleanClass(OWLRDFListProxy, Class):
"""
Adds other to the list and returns self
"""
- assert self._operator == OWL_NS.unionOf
+ assert self._operator == OWL.unionOf
self._rdfList.append(classOrIdentifier(other))
return self
@@ -1610,19 +1605,20 @@ def AllDifferent(members):
class Restriction(Class):
"""
restriction ::= 'restriction('
- datavaluedPropertyID dataRestrictionComponent
- { dataRestrictionComponent } ')'
- | 'restriction(' individualvaluedPropertyID
- individualRestrictionComponent
- { individualRestrictionComponent } ')'
+ datavaluedPropertyID dataRestrictionComponent
+ { dataRestrictionComponent } ')'
+ | 'restriction(' individualvaluedPropertyID
+ individualRestrictionComponent
+ { individualRestrictionComponent } ')'
+
"""
restrictionKinds = [
- OWL_NS.allValuesFrom,
- OWL_NS.someValuesFrom,
- OWL_NS.hasValue,
- OWL_NS.maxCardinality,
- OWL_NS.minCardinality,
+ OWL.allValuesFrom,
+ OWL.someValuesFrom,
+ OWL.hasValue,
+ OWL.maxCardinality,
+ OWL.minCardinality,
]
def __init__(
@@ -1642,20 +1638,20 @@ class Restriction(Class):
)
if (
self.identifier,
- OWL_NS.onProperty,
+ OWL.onProperty,
propertyOrIdentifier(onProperty),
) not in graph:
graph.add(
- (self.identifier, OWL_NS.onProperty, propertyOrIdentifier(onProperty))
+ (self.identifier, OWL.onProperty, propertyOrIdentifier(onProperty))
)
self.onProperty = onProperty
restrTypes = [
- (allValuesFrom, OWL_NS.allValuesFrom),
- (someValuesFrom, OWL_NS.someValuesFrom),
- (value, OWL_NS.hasValue),
- (cardinality, OWL_NS.cardinality),
- (maxCardinality, OWL_NS.maxCardinality),
- (minCardinality, OWL_NS.minCardinality),
+ (allValuesFrom, OWL.allValuesFrom),
+ (someValuesFrom, OWL.someValuesFrom),
+ (value, OWL.hasValue),
+ (cardinality, OWL.cardinality),
+ (maxCardinality, OWL.maxCardinality),
+ (minCardinality, OWL.minCardinality),
]
validRestrProps = [(i, oTerm) for (i, oTerm) in restrTypes if i]
assert len(validRestrProps)
@@ -1672,9 +1668,9 @@ class Restriction(Class):
if (self.identifier, restrictionType, self.restrictionRange) not in self.graph:
self.graph.add((self.identifier, restrictionType, self.restrictionRange))
assert self.restrictionRange is not None, Class(self.identifier)
- if (self.identifier, RDF.type, OWL_NS.Restriction) not in self.graph:
- self.graph.add((self.identifier, RDF.type, OWL_NS.Restriction))
- self.graph.remove((self.identifier, RDF.type, OWL_NS.Class))
+ if (self.identifier, RDF.type, OWL.Restriction) not in self.graph:
+ self.graph.add((self.identifier, RDF.type, OWL.Restriction))
+ self.graph.remove((self.identifier, RDF.type, OWL.Class))
def serialize(self, graph):
"""
@@ -1686,10 +1682,10 @@ class Restriction(Class):
>>> namespace_manager = NamespaceManager(g2)
>>> namespace_manager.bind('ex', EX, override=False)
>>> Individual.factoryGraph = g1
- >>> prop = Property(EX.someProp, baseType=OWL_NS.DatatypeProperty)
+ >>> prop = Property(EX.someProp, baseType=OWL.DatatypeProperty)
>>> restr1 = (Property(
... EX.someProp,
- ... baseType=OWL_NS.DatatypeProperty)) | some | (Class(EX.Foo))
+ ... baseType=OWL.DatatypeProperty)) | some | (Class(EX.Foo))
>>> restr1 #doctest: +SKIP
( ex:someProp SOME ex:Foo )
>>> restr1.serialize(g2)
@@ -1703,7 +1699,7 @@ class Restriction(Class):
Property(self.onProperty, graph=self.graph, baseType=None).serialize(graph)
for s, p, o in self.graph.triples((self.identifier, None, None)):
graph.add((s, p, o))
- if p in [OWL_NS.allValuesFrom, OWL_NS.someValuesFrom]:
+ if p in [OWL.allValuesFrom, OWL.someValuesFrom]:
CastClass(o, self.graph).serialize(graph)
def isPrimitive(self):
@@ -1728,11 +1724,11 @@ class Restriction(Class):
def _get_onProperty(self):
return list(
- self.graph.objects(subject=self.identifier, predicate=OWL_NS.onProperty)
+ self.graph.objects(subject=self.identifier, predicate=OWL.onProperty)
)[0]
def _set_onProperty(self, prop):
- triple = (self.identifier, OWL_NS.onProperty, propertyOrIdentifier(prop))
+ triple = (self.identifier, OWL.onProperty, propertyOrIdentifier(prop))
if not prop:
return
elif triple in self.graph:
@@ -1740,7 +1736,7 @@ class Restriction(Class):
else:
self.graph.set(triple)
- @TermDeletionHelper(OWL_NS.onProperty)
+ @TermDeletionHelper(OWL.onProperty)
def _del_onProperty(self):
pass
@@ -1748,13 +1744,13 @@ class Restriction(Class):
def _get_allValuesFrom(self):
for i in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS.allValuesFrom
+ subject=self.identifier, predicate=OWL.allValuesFrom
):
return Class(i, graph=self.graph)
return None
def _set_allValuesFrom(self, other):
- triple = (self.identifier, OWL_NS.allValuesFrom, classOrIdentifier(other))
+ triple = (self.identifier, OWL.allValuesFrom, classOrIdentifier(other))
if not other:
return
elif triple in self.graph:
@@ -1762,7 +1758,7 @@ class Restriction(Class):
else:
self.graph.set(triple)
- @TermDeletionHelper(OWL_NS.allValuesFrom)
+ @TermDeletionHelper(OWL.allValuesFrom)
def _del_allValuesFrom(self):
pass
@@ -1770,13 +1766,13 @@ class Restriction(Class):
def _get_someValuesFrom(self):
for i in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS.someValuesFrom
+ subject=self.identifier, predicate=OWL.someValuesFrom
):
return Class(i, graph=self.graph)
return None
def _set_someValuesFrom(self, other):
- triple = (self.identifier, OWL_NS.someValuesFrom, classOrIdentifier(other))
+ triple = (self.identifier, OWL.someValuesFrom, classOrIdentifier(other))
if not other:
return
elif triple in self.graph:
@@ -1784,7 +1780,7 @@ class Restriction(Class):
else:
self.graph.set(triple)
- @TermDeletionHelper(OWL_NS.someValuesFrom)
+ @TermDeletionHelper(OWL.someValuesFrom)
def _del_someValuesFrom(self):
pass
@@ -1793,12 +1789,12 @@ class Restriction(Class):
)
def _get_hasValue(self):
- for i in self.graph.objects(subject=self.identifier, predicate=OWL_NS.hasValue):
+ for i in self.graph.objects(subject=self.identifier, predicate=OWL.hasValue):
return Class(i, graph=self.graph)
return None
def _set_hasValue(self, other):
- triple = (self.identifier, OWL_NS.hasValue, classOrIdentifier(other))
+ triple = (self.identifier, OWL.hasValue, classOrIdentifier(other))
if not other:
return
elif triple in self.graph:
@@ -1806,7 +1802,7 @@ class Restriction(Class):
else:
self.graph.set(triple)
- @TermDeletionHelper(OWL_NS.hasValue)
+ @TermDeletionHelper(OWL.hasValue)
def _del_hasValue(self):
pass
@@ -1814,13 +1810,13 @@ class Restriction(Class):
def _get_cardinality(self):
for i in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS.cardinality
+ subject=self.identifier, predicate=OWL.cardinality
):
return Class(i, graph=self.graph)
return None
def _set_cardinality(self, other):
- triple = (self.identifier, OWL_NS.cardinality, classOrIdentifier(other))
+ triple = (self.identifier, OWL.cardinality, classOrIdentifier(other))
if not other:
return
elif triple in self.graph:
@@ -1828,7 +1824,7 @@ class Restriction(Class):
else:
self.graph.set(triple)
- @TermDeletionHelper(OWL_NS.cardinality)
+ @TermDeletionHelper(OWL.cardinality)
def _del_cardinality(self):
pass
@@ -1836,13 +1832,13 @@ class Restriction(Class):
def _get_maxCardinality(self):
for i in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS.maxCardinality
+ subject=self.identifier, predicate=OWL.maxCardinality
):
return Class(i, graph=self.graph)
return None
def _set_maxCardinality(self, other):
- triple = (self.identifier, OWL_NS.maxCardinality, classOrIdentifier(other))
+ triple = (self.identifier, OWL.maxCardinality, classOrIdentifier(other))
if not other:
return
elif triple in self.graph:
@@ -1850,7 +1846,7 @@ class Restriction(Class):
else:
self.graph.set(triple)
- @TermDeletionHelper(OWL_NS.maxCardinality)
+ @TermDeletionHelper(OWL.maxCardinality)
def _del_maxCardinality(self):
pass
@@ -1860,13 +1856,13 @@ class Restriction(Class):
def _get_minCardinality(self):
for i in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS.minCardinality
+ subject=self.identifier, predicate=OWL.minCardinality
):
return Class(i, graph=self.graph)
return None
def _set_minCardinality(self, other):
- triple = (self.identifier, OWL_NS.minCardinality, classOrIdentifier(other))
+ triple = (self.identifier, OWL.minCardinality, classOrIdentifier(other))
if not other:
return
elif triple in self.graph:
@@ -1874,7 +1870,7 @@ class Restriction(Class):
else:
self.graph.set(triple)
- @TermDeletionHelper(OWL_NS.minCardinality)
+ @TermDeletionHelper(OWL.minCardinality)
def _del_minCardinality(self):
pass
@@ -1886,7 +1882,7 @@ class Restriction(Class):
for p in self.graph.triple_choices(
(self.identifier, self.restrictionKinds, None)
):
- return p.split(OWL_NS)[-1]
+ return p.split(OWL)[-1]
raise
def __repr__(self):
@@ -1929,14 +1925,15 @@ class Property(AnnotatableTerms):
{ annotation }
{ 'super(' datavaluedPropertyID ')'} ['Functional']
{ 'domain(' description ')' } { 'range(' dataRange ')' } ')'
- | 'ObjectProperty(' individualvaluedPropertyID ['Deprecated']
+ | 'ObjectProperty(' individualvaluedPropertyID ['Deprecated']
{ annotation }
{ 'super(' individualvaluedPropertyID ')' }
[ 'inverseOf(' individualvaluedPropertyID ')' ] [ 'Symmetric' ]
[ 'Functional' | 'InverseFunctional' |
- 'Functional' 'InverseFunctional' |
- 'Transitive' ]
+ 'Functional' 'InverseFunctional' |
+ 'Transitive' ]
{ 'domain(' description ')' } { 'range(' description ')' } ')
+
"""
def setupVerbAnnotations(self, verbAnnotations):
@@ -1961,7 +1958,7 @@ class Property(AnnotatableTerms):
self,
identifier=None,
graph=None,
- baseType=OWL_NS.ObjectProperty,
+ baseType=OWL.ObjectProperty,
subPropertyOf=None,
domain=None,
range=None,
@@ -2015,7 +2012,7 @@ class Property(AnnotatableTerms):
def __repr__(self):
rt = []
- if OWL_NS.ObjectProperty in self.type:
+ if OWL.ObjectProperty in self.type:
rt.append(
"ObjectProperty( %s annotation(%s)"
% (self.qname, first(self.comment) and first(self.comment) or "")
@@ -2030,7 +2027,7 @@ class Property(AnnotatableTerms):
" inverseOf( %s )%s"
% (
inverseRepr,
- OWL_NS.SymmetricProperty in self.type and " Symmetric" or "",
+ OWL.SymmetricProperty in self.type and " Symmetric" or "",
)
)
for s, p, roleType in self.graph.triples_choices(
@@ -2038,20 +2035,20 @@ class Property(AnnotatableTerms):
self.identifier,
RDF.type,
[
- OWL_NS.FunctionalProperty,
- OWL_NS.InverseFunctionalProperty,
- OWL_NS.TransitiveProperty,
+ OWL.FunctionalProperty,
+ OWL.InverseFunctionalProperty,
+ OWL.TransitiveProperty,
],
)
):
- rt.append(str(roleType.split(OWL_NS)[-1]))
+ rt.append(str(roleType.split(OWL)[-1]))
else:
rt.append(
"DatatypeProperty( %s %s"
% (self.qname, first(self.comment) and first(self.comment) or "")
)
for s, p, roleType in self.graph.triples(
- (self.identifier, RDF.type, OWL_NS.FunctionalProperty)
+ (self.identifier, RDF.type, OWL.FunctionalProperty)
):
rt.append(" Functional")
@@ -2059,11 +2056,11 @@ class Property(AnnotatableTerms):
normalizedName = classOrIdentifier(term)
if isinstance(normalizedName, BNode):
return term
- elif normalizedName.startswith(_XSD_NS):
+ elif normalizedName.startswith(XSD):
return str(term)
elif first(
g.triples_choices(
- (normalizedName, [OWL_NS.unionOf, OWL_NS.intersectionOf], None)
+ (normalizedName, [OWL.unionOf, OWL.intersectionOf], None)
)
):
return repr(term)
@@ -2118,16 +2115,16 @@ class Property(AnnotatableTerms):
def _get_inverseOf(self):
for anc in self.graph.objects(
- subject=self.identifier, predicate=OWL_NS.inverseOf
+ subject=self.identifier, predicate=OWL.inverseOf
):
yield Property(anc, graph=self.graph, baseType=None)
def _set_inverseOf(self, other):
if not other:
return
- self.graph.add((self.identifier, OWL_NS.inverseOf, classOrIdentifier(other)))
+ self.graph.add((self.identifier, OWL.inverseOf, classOrIdentifier(other)))
- @TermDeletionHelper(OWL_NS.inverseOf)
+ @TermDeletionHelper(OWL.inverseOf)
def _del_inverseOf(self):
pass
@@ -2185,7 +2182,7 @@ def CommonNSBindings(graph, additionalNS={}):
namespace_manager = NamespaceManager(graph)
namespace_manager.bind("rdfs", RDFS)
namespace_manager.bind("rdf", RDF)
- namespace_manager.bind("owl", OWL_NS)
+ namespace_manager.bind("owl", OWL)
for prefix, uri in list(additionalNS.items()):
namespace_manager.bind(prefix, uri, override=False)
graph.namespace_manager = namespace_manager
diff --git a/rdflib/graph.py b/rdflib/graph.py
index 1b83b22e..2ed32292 100644
--- a/rdflib/graph.py
+++ b/rdflib/graph.py
@@ -2167,21 +2167,20 @@ def _assertnode(*terms):
class BatchAddGraph(object):
"""
- Wrapper around graph that turns calls to :meth:`add` (and optionally, :meth:`addN`)
- into calls to :meth:`~rdflib.graph.Graph.addN`.
+ Wrapper around graph that turns batches of calls to Graph's add
+ (and optionally, addN) into calls to batched calls to addN`.
:Parameters:
- - `graph`: The graph to wrap
- - `batch_size`: The maximum number of triples to buffer before passing to
- `graph`'s `addN`
- - `batch_addn`: If True, then even calls to `addN` will be batched according to
- `batch_size`
+ - graph: The graph to wrap
+ - batch_size: The maximum number of triples to buffer before passing to
+ Graph's addN
+ - batch_addn: If True, then even calls to `addN` will be batched according to
+ batch_size
- :ivar graph: The wrapped graph
- :ivar count: The number of triples buffered since initaialization or the last call
- to :meth:`reset`
- :ivar batch: The current buffer of triples
+ graph: The wrapped graph
+ count: The number of triples buffered since initialization or the last call to reset
+ batch: The current buffer of triples
"""
diff --git a/rdflib/namespace/_DCAT.py b/rdflib/namespace/_DCAT.py
index f153487a..7e9a171a 100644
--- a/rdflib/namespace/_DCAT.py
+++ b/rdflib/namespace/_DCAT.py
@@ -5,81 +5,26 @@ from rdflib.namespace import DefinedNamespace, Namespace
class DCAT(DefinedNamespace):
"""
The data catalog vocabulary
-
+
DCAT is an RDF vocabulary designed to facilitate interoperability between data catalogs published on the Web.
By using DCAT to describe datasets in data catalogs, publishers increase discoverability and enable
applications easily to consume metadata from multiple catalogs. It further enables decentralized publishing of
catalogs and facilitates federated dataset search across sites. Aggregated DCAT metadata can serve as a
manifest file to facilitate digital preservation. DCAT is defined at http://www.w3.org/TR/vocab-dcat/. Any
variance between that normative document and this schema is an error in this schema.
-
+
Generated from: https://www.w3.org/ns/dcat2.ttl
Date: 2020-05-26 14:19:59.985854
- <http://www.w3.org/ns/dcat> rdfs:label "أنطولوجية فهارس قوائم البيانات"@ar
- "Slovník pro datové katalogy"@cs
- "Το λεξιλόγιο των καταλόγων δεδομένων"@el
- "El vocabulario de catálogo de datos"@es
- "Le vocabulaire des jeux de données"@fr
- "Il vocabolario del catalogo dei dati"@it
- "データ・カタログ語彙(DCAT)"@ja
- dct:license <https://creativecommons.org/licenses/by/4.0/>
- dct:modified "2012-04-24"^^xsd:date
- "2013-09-20"^^xsd:date
- "2013-11-28"^^xsd:date
- "2017-12-19"^^xsd:date
- "2019"
- rdfs:comment "هي أنطولوجية تسهل تبادل البيانات بين مختلف الفهارس على الوب. استخدام هذه الأنطولوجية يساعد على
- اكتشاف قوائم البيانات المنشورة على الوب و يمكن التطبيقات المختلفة من الاستفادة أتوماتيكيا من البيانات المتاحة
- من مختلف الفهارس."@ar
- "DCAT je RDF slovník navržený pro zprostředkování interoperability mezi datovými katalogy publikovanými na
- Webu. Poskytovatelé dat používáním slovníku DCAT pro popis datových sad v datových katalozích zvyšují jejich
- dohledatelnost a umožňují aplikacím konzumovat metadata z více katalogů. Dále je umožňena decentralizovaná
- publikace katalogů a federované dotazování na datové sady napříč katalogy. Agregovaná DCAT metadata mohou také
- sloužit jako průvodka umožňující digitální uchování informace. DCAT je definován na
- http://www.w3.org/TR/vocab-dcat/. Jakýkoliv nesoulad mezi odkazovaným dokumentem a tímto schématem je chybou v
- tomto schématu."@cs
- "Το DCAT είναι ένα RDF λεξιλόγιο που σχεδιάσθηκε για να κάνει εφικτή τη διαλειτουργικότητα μεταξύ
- καταλόγων δεδομένων στον Παγκόσμιο Ιστό. Χρησιμοποιώντας το DCAT για την περιγραφή συνόλων δεδομένων, οι
- εκδότες αυτών αυξάνουν την ανακαλυψιμότητα και επιτρέπουν στις εφαρμογές την εύκολη κατανάλωση μεταδεδομένων
- από πολλαπλούς καταλόγους. Επιπλέον, δίνει τη δυνατότητα για αποκεντρωμένη έκδοση και διάθεση καταλόγων και
- επιτρέπει δυνατότητες ενοποιημένης αναζήτησης μεταξύ διαφορετικών πηγών. Συγκεντρωτικά μεταδεδομένα που έχουν
- περιγραφεί με το DCAT μπορούν να χρησιμοποιηθούν σαν ένα δηλωτικό αρχείο (manifest file) ώστε να διευκολύνουν
- την ψηφιακή συντήρηση."@el
- "DCAT es un vocabulario RDF diseñado para facilitar la interoperabilidad entre catálogos de datos
- publicados en la Web. Utilizando DCAT para describir datos disponibles en catálogos se aumenta la posibilidad
- de que sean descubiertos y se permite que las aplicaciones consuman fácilmente los metadatos de varios
- catálogos."@es
- "DCAT est un vocabulaire développé pour faciliter l'interopérabilité entre les jeux de données publiées
- sur le Web. En utilisant DCAT pour décrire les jeux de données dans les catalogues de données, les
- fournisseurs de données augmentent leur découverte et permettent que les applications facilement les
- métadonnées de plusieurs catalogues. Il permet en plus la publication décentralisée des catalogues et
- facilitent la recherche fédérée des données entre plusieurs sites. Les métadonnées DCAT aggrégées peuvent
- servir comme un manifeste pour faciliter la préservation digitale des ressources. DCAT est définie à l'adresse
- http://www.w3.org/TR/vocab-dcat/. Une quelconque version de ce document normatif et ce vocabulaire est une
- erreur dans ce vocabulaire."@fr
- "DCAT è un vocabolario RDF progettato per facilitare l'interoperabilità tra i cataloghi di dati pubblicati
- nel Web. Utilizzando DCAT per descrivere i dataset nei cataloghi di dati, i fornitori migliorano la capacità
- di individuazione dei dati e abilitano le applicazioni al consumo di dati provenienti da cataloghi
- differenti. DCAT permette di decentralizzare la pubblicazione di cataloghi e facilita la ricerca federata dei
- dataset. L'aggregazione dei metadati federati può fungere da file manifesto per facilitare la conservazione
- digitale. DCAT è definito all'indirizzo http://www.w3.org/TR/vocab-dcat/. Qualsiasi scostamento tra tale
- definizione normativa e questo schema è da considerarsi un errore di questo schema."@it
- "DCATは、ウェブ上で公開されたデータ・カタログ間の相互運用性の促進を目的とするRDFの語彙です。このドキュメントでは、その利用のために、スキーマを定義し、例を提供します。データ・カタログ内のデータセットを記述
- するためにDCATを用いると、公開者が、発見可能性を増加させ、アプリケーションが複数のカタログのメタデータを容易に利用できるようになります。さらに、カタログの分散公開を可能にし、複数のサイトにまたがるデータセットの統合検
- 索を促進します。集約されたDCATメタデータは、ディジタル保存を促進するためのマニフェスト・ファイルとして使用できます。"@ja
- owl:imports dct:
- <http://www.w3.org/2004/02/skos/core>
- <http://www.w3.org/ns/prov-o#>
- owl:versionInfo "Toto je aktualizovaná kopie slovníku DCAT verze 2.0, převzatá z
- https://www.w3.org/ns/dcat.ttl"@cs
- "Questa è una copia aggiornata del vocabolario DCAT v2.0 disponibile in https://www.w3.org/ns/dcat.ttl"
- "This is an updated copy of v2.0 of the DCAT vocabulary, taken from https://www.w3.org/ns/dcat.ttl"
- "Esta es una copia del vocabulario DCAT v2.0 disponible en https://www.w3.org/ns/dcat.ttl"@es
- skos:editorialNote "English language definitions updated in this revision in line with ED. Multilingual text
- unevenly updated."
+ <http://www.w3.org/ns/dcat>
+ rdfs:label "The data catalog vocabulary"@en ;
+ dct:license <https://creativecommons.org/licenses/by/4.0/> ;
+ dct:modified "2017-12-19"^^xsd:date ;
+ rdfs:comment "DCAT is an RDF vocabulary designed to facilitate interoperability between data catalogs published on the Web. By using DCAT to describe datasets in data catalogs, publishers increase discoverability and enable applications easily to consume metadata from multiple catalogs. It further enables decentralized publishing of catalogs and facilitates federated dataset search across sites. Aggregated DCAT metadata can serve as a manifest file to facilitate digital preservation. DCAT is defined at http://www.w3.org/TR/vocab-dcat/. Any variance between that normative document and this schema is an error in this schema."@en ;
+ owl:versionInfo "This is an updated copy of v2.0 of the DCAT vocabulary, taken from https://www.w3.org/ns/dcat.ttl"@en ;
+ .
"""
-
+
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
accessURL: URIRef # A URL of a resource that gives access to a distribution of the dataset. E.g. landing page, feed, SPARQL endpoint. Use for all cases except a simple download link, in which case downloadURL is preferred.
bbox: URIRef # The geographic bounding box of a resource.
diff --git a/rdflib/namespace/_DCTERMS.py b/rdflib/namespace/_DCTERMS.py
index 855a9808..a1739777 100644
--- a/rdflib/namespace/_DCTERMS.py
+++ b/rdflib/namespace/_DCTERMS.py
@@ -5,15 +5,16 @@ from rdflib.namespace import DefinedNamespace, Namespace
class DCTERMS(DefinedNamespace):
"""
DCMI Metadata Terms - other
-
+
Generated from: https://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_terms.ttl
Date: 2020-05-26 14:20:00.590514
dcterms:modified "2012-06-14"^^xsd:date
dcterms:publisher <http://purl.org/dc/aboutdcmi#DCMI>
+
"""
_fail = True
-
+
# http://purl.org/dc/dcam/VocabularyEncodingScheme
DCMIType: URIRef # The set of classes specified by the DCMI Type Vocabulary, used to categorize the nature or genre of the resource.
DDC: URIRef # The set of conceptual resources specified by the Dewey Decimal Classification.
@@ -118,7 +119,7 @@ class DCTERMS(DefinedNamespace):
URI: URIRef # The set of identifiers constructed according to the generic syntax for Uniform Resource Identifiers as specified by the Internet Engineering Task Force.
W3CDTF: URIRef # The set of dates and times constructed according to the W3C Date and Time Formats Specification.
- # Valid non-python identifiers
+ # Valid non-python identifiers
_extras = ['ISO639-2', 'ISO639-3']
_NS = Namespace("http://purl.org/dc/terms/")
diff --git a/rdflib/namespace/_DOAP.py b/rdflib/namespace/_DOAP.py
index 494a5f0d..fc29cdf6 100644
--- a/rdflib/namespace/_DOAP.py
+++ b/rdflib/namespace/_DOAP.py
@@ -5,30 +5,15 @@ from rdflib.namespace import DefinedNamespace, Namespace
class DOAP(DefinedNamespace):
"""
Description of a Project (DOAP) vocabulary
-
+
The Description of a Project (DOAP) vocabulary, described using W3C RDF Schema and the Web Ontology Language.
-
+
Generated from: http://usefulinc.com/ns/doap
Date: 2020-05-26 14:20:01.307972
- dc:creator "Edd Wilder-James"
- dc:description "Slovník Description of a Project (DOAP, Popis projektu), popsaný použitím W3C RDF Schema a Web
- Ontology Language."@cs
- "Das Vokabular \"Description of a Project (DOAP)\", beschrieben durch W3C RDF Schema and the Web Ontology
- Language."@de
- '''El vocabulario Description of a Project (DOAP, Descripción de un Proyecto), descrito usando RDF Schema
- de W3
- y Web Ontology Language.'''@es
- '''Le vocabulaire Description Of A Project (DOAP, Description D'Un Projet)
- décrit en utilisant RDF Schema du W3C et OWL.'''@fr
- "Vocabulário de descrição de um Projeto (DOAP - Description of a Project), descrito no esquema (schema)
- W3C RDF e na Web Ontology Language."@pt
- dc:format "application/rdf+xml"
- dc:rights "Copyright © 2004-2018 Edd Dumbill, Edd Wilder-James"
- owl:imports foaf:index.rdf
"""
_fail = True
-
+
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
audience: URIRef # Description of target user base
blog: URIRef # URI of a blog related to a project
@@ -77,7 +62,7 @@ class DOAP(DefinedNamespace):
# http://www.w3.org/2002/07/owl#InverseFunctionalProperty
homepage: URIRef # URL of a project's homepage, associated with exactly one project.
- # Valid non-python identifiers
+ # Valid non-python identifiers
_extras = ['anon-root', 'bug-database', 'developer-forum', 'download-mirror', 'download-page', 'file-release', 'mailing-list', 'programming-language', 'service-endpoint', 'support-forum', 'old-homepage']
_NS = Namespace("http://usefulinc.com/ns/doap#")
diff --git a/rdflib/namespace/_ODRL2.py b/rdflib/namespace/_ODRL2.py
index 08961e6c..d7654a64 100644
--- a/rdflib/namespace/_ODRL2.py
+++ b/rdflib/namespace/_ODRL2.py
@@ -5,25 +5,23 @@ from rdflib.namespace import DefinedNamespace, Namespace
class ODRL2(DefinedNamespace):
"""
ODRL Version 2.2
-
+
The ODRL Vocabulary and Expression defines a set of concepts and terms (the vocabulary) and encoding mechanism
(the expression) for permissions and obligations statements describing digital content usage based on the ODRL
Information Model.
-
+
Generated from: https://www.w3.org/ns/odrl/2/ODRL22.ttl
Date: 2020-05-26 14:20:02.352356
dct:contributor "W3C Permissions & Obligations Expression Working Group"
- dct:creator "Michael Steidl"
- "Renato Iannella"
- "Stuart Myles"
- "Víctor Rodríguez-Doncel"
+ dct:creator "Michael Steidl" , "Renato Iannella", "Stuart Myles", "Víctor Rodríguez-Doncel"
dct:license <https://www.w3.org/Consortium/Legal/2002/ipr-notice-20021231#Copyright/>
rdfs:comment "This is the RDF ontology for ODRL Version 2.2."
owl:versionInfo "2.2"
+
"""
_fail = True
-
+
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
action: URIRef # The operation relating to the Asset for which the Rule is being subjected.
andSequence: URIRef # The relation is satisfied when each of the Constraints are satisfied in the order specified.
@@ -236,7 +234,7 @@ class ODRL2(DefinedNamespace):
write: URIRef # The act of writing to the Asset.
writeTo: URIRef # The act of adding data to the Asset.
- # Valid non-python identifiers
+ # Valid non-python identifiers
_extras = ['and', 'or', '#actionConcepts', '#actions', '#actionsCommon', '#assetConcepts', '#assetParty', '#assetRelations', '#assetRelationsCommon', '#conflictConcepts', '#constraintLeftOperandCommon', '#constraintLogicalOperands', '#constraintRelationalOperators', '#constraintRightOpCommon', '#constraints', '#deprecatedTerms', '#duties', '#logicalConstraints', '#partyConcepts', '#partyRoles', '#partyRolesCommon', '#permissions', '#policyConcepts', '#policySubClasses', '#policySubClassesCommon', '#prohibitions', '#ruleConcepts']
_NS = Namespace("http://www.w3.org/ns/odrl/2/")
diff --git a/rdflib/namespace/_ORG.py b/rdflib/namespace/_ORG.py
index 1d21af25..2839442f 100644
--- a/rdflib/namespace/_ORG.py
+++ b/rdflib/namespace/_ORG.py
@@ -5,40 +5,26 @@ from rdflib.namespace import DefinedNamespace, Namespace
class ORG(DefinedNamespace):
"""
Core organization ontology
-
+
Vocabulary for describing organizational structures, specializable to a broad variety of types of
organization.
-
+
Generated from: http://www.w3.org/ns/org#
Date: 2020-05-26 14:20:02.908408
- rdfs:label "Ontología de organizaciones"@es
- "Ontologie des organisations"@fr
- "Ontologia delle organizzazioni"@it
+ rdfs:label "Ontología de organizaciones"@es, "Ontologie des organisations"@fr, "Ontologia delle organizzazioni"@it
dct:created "2010-05-28"^^xsd:date
dct:license <http://www.opendatacommons.org/licenses/pddl/1.0/>
- dct:modified "2010-06-09"^^xsd:date
- "2010-10-08"^^xsd:date
- "2012-09-30"^^xsd:date
- "2012-10-06"^^xsd:date
- "2013-02-15"^^xsd:date
- "2013-12-16"^^xsd:date
- "2014-01-02"^^xsd:date
- "2014-01-25"^^xsd:date
- "2014-02-05"^^xsd:date
- "2014-04-12"^^xsd:date
- dct:title "Core organization ontology"
- "Ontología de organizaciones"@es
- "Ontologie des organisations"@fr
- "Ontologia delle organizzazioni"@it
- rdfs:comment "Vocabulario para describir organizaciones, adaptable a una amplia variedad de ellas."@es
- "Vocabolario per descrivere strutture organizzative, le quali possono essere specializzate in una vasta
+ dct:modified "2014-04-12"^^xsd:date
+ dct:title "Core organization ontology", "Ontología de organizaciones"@es, "Ontologie des organisations"@fr, "Ontologia delle organizzazioni"@it
+ rdfs:comment "Vocabulario para describir organizaciones, adaptable a una amplia variedad de ellas."@es, "Vocabolario per descrivere strutture organizzative, le quali possono essere specializzate in una vasta
varietà di tipi di organizzazione"@it
rdfs:seeAlso <http://www.w3.org/TR/vocab-org/>
owl:versionInfo "0.8"
+
"""
_fail = True
-
+
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
basedAt: URIRef # Indicates the site at which a person is based. We do not restrict the possibility that a person is based at multiple sites.
changedBy: URIRef # Indicates a change event which resulted in a change to this organization. Depending on the event the organization may or may not have continued to exist after the event. Inverse of `org:originalOrganization`.
diff --git a/rdflib/namespace/_OWL.py b/rdflib/namespace/_OWL.py
index accc0a9f..9605f88b 100644
--- a/rdflib/namespace/_OWL.py
+++ b/rdflib/namespace/_OWL.py
@@ -5,8 +5,8 @@ from rdflib.namespace import DefinedNamespace, Namespace
class OWL(DefinedNamespace):
"""
The OWL 2 Schema vocabulary (OWL 2)
-
- This ontology partially describes the built-in classes and properties that together form the basis of
+
+ This ontology partially describes the built-in classes and properties that together form the basis of
the RDF/XML syntax of OWL 2. The content of this ontology is based on Tables 6.1 and 6.2 in Section 6.4
of the OWL 2 RDF-Based Semantics specification, available at http://www.w3.org/TR/owl2-rdf-based-
semantics/. Please note that those tables do not include the different annotations (labels, comments and
@@ -16,22 +16,13 @@ class OWL(DefinedNamespace):
the information provided by this ontology may be misleading if not used with care. This ontology SHOULD NOT
be imported into OWL ontologies. Importing this file into an OWL 2 DL ontology will cause it to become
an OWL 2 Full ontology and may have other, unexpected, consequences.
-
+
Generated from: http://www.w3.org/2002/07/owl#
Date: 2020-05-26 14:20:03.193795
- <http://www.w3.org/2002/07/owl> rdfs:isDefinedBy <http://www.w3.org/TR/owl2-mapping-to-rdf/>
- <http://www.w3.org/TR/owl2-rdf-based-semantics/>
- <http://www.w3.org/TR/owl2-syntax/>
- rdfs:seeAlso <http://www.w3.org/TR/owl2-rdf-based-semantics/#table-axiomatic-classes>
- <http://www.w3.org/TR/owl2-rdf-based-semantics/#table-axiomatic-properties>
- owl:imports <http://www.w3.org/2000/01/rdf-schema>
- owl:versionIRI <http://www.w3.org/2002/07/owl>
- owl:versionInfo "$Date: 2009/11/15 10:54:12 $"
- grddl:namespaceTransformation <http://dev.w3.org/cvsweb/2009/owl-grddl/owx2rdf.xsl>
"""
_fail = True
-
+
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
allValuesFrom: URIRef # The property that determines the class that a universal property restriction refers to.
annotatedProperty: URIRef # The property that determines the predicate of an annotated axiom or annotated annotation.
diff --git a/rdflib/namespace/_PROF.py b/rdflib/namespace/_PROF.py
index cadd7bb1..bfc185b5 100644
--- a/rdflib/namespace/_PROF.py
+++ b/rdflib/namespace/_PROF.py
@@ -5,7 +5,7 @@ from rdflib.namespace import DefinedNamespace, Namespace
class PROF(DefinedNamespace):
"""
Profiles Vocabulary
-
+
This vocabulary is for describing relationships between standards/specifications, profiles of them and
supporting artifacts such as validating resources. This model starts with
[http://dublincore.org/2012/06/14/dcterms#Standard](dct:Standard) entities which can either be Base
@@ -14,22 +14,12 @@ class PROF(DefinedNamespace):
rules for the it. Resource Descriptors must indicate the role they play (to guide, to validate etc.) and the
formalism they adhere to (dct:format) to allow for content negotiation. A vocabulary of Resource Roles are
provided alongside this vocabulary but that list is extensible.
-
+
Generated from: https://www.w3.org/ns/dx/prof/profilesont.ttl
Date: 2020-05-26 14:20:03.542924
- <http://www.w3.org/ns/dx/prof> dc:contributor "Alejandra Gonzalez-Beltran"
- "Nicholas Car"
- "Simon Cox"
- dc:creator "Rob Atkinson"
- dct:contributor <http://orcid.org/0000-0002-3884-3420>
- <http://orcid.org/0000-0002-8742-7730>
- dct:created "2018-02-16"^^xsd:date
- dct:modified "2018-11-15"^^xsd:date
- owl:versionIRI prof:1.0
- owl:versionInfo "1.0"
"""
-
+
# http://www.w3.org/2002/07/owl#Class
Profile: URIRef # A named set of constraints on one or more identified base specifications or other profiles, including the identification of any implementing subclasses of datatypes, semantic interpretations, vocabularies, options and parameters of those base specifications necessary to accomplish a particular function. This definition includes what are often called "application profiles", "metadata application profiles", or "metadata profiles".
ResourceDescriptor: URIRef # A resource that defines an aspect - a particular part or feature - of a Profile
diff --git a/rdflib/namespace/_PROV.py b/rdflib/namespace/_PROV.py
index 530e15e8..6026bb39 100644
--- a/rdflib/namespace/_PROV.py
+++ b/rdflib/namespace/_PROV.py
@@ -5,95 +5,58 @@ from rdflib.namespace import DefinedNamespace, Namespace
class PROV(DefinedNamespace):
"""
W3C PROVenance Interchange Ontology (PROV-O)
-
+
This document is published by the Provenance Working Group (http://www.w3.org/2011/prov/wiki/Main_Page). If
you wish to make comments regarding this document, please send them to public-prov-comments@w3.org (subscribe
public-prov-comments-request@w3.org, archives http://lists.w3.org/Archives/Public/public-prov-comments/). All
feedback is welcome.
-
+
PROV Access and Query Ontology
-
+
This document is published by the Provenance Working Group (http://www.w3.org/2011/prov/wiki/Main_Page). If
you wish to make comments regarding this document, please send them to public-prov-comments@w3.org (subscribe
public-prov-comments-request@w3.org, archives http://lists.w3.org/Archives/Public/public-prov-comments/). All
feedback is welcome.
-
+
Dublin Core extensions of the W3C PROVenance Interchange Ontology (PROV-O)
-
+
This document is published by the Provenance Working Group (http://www.w3.org/2011/prov/wiki/Main_Page). If
you wish to make comments regarding this document, please send them to public-prov-comments@w3.org (subscribe
public-prov-comments-request@w3.org, archives http://lists.w3.org/Archives/Public/public-prov-comments/). All
feedback is welcome.
-
+
W3C PROV Linking Across Provenance Bundles Ontology (PROV-LINKS)
-
+
This document is published by the Provenance Working Group (http://www.w3.org/2011/prov/wiki/Main_Page). If
you wish to make comments regarding this document, please send them to public-prov-comments@w3.org (subscribe
public-prov-comments-request@w3.org, archives http://lists.w3.org/Archives/Public/public-prov-comments/ ). All
feedback is welcome.
-
+
W3C PROVenance Interchange Ontology (PROV-O) Dictionary Extension
-
+
This document is published by the Provenance Working Group (http://www.w3.org/2011/prov/wiki/Main_Page).
If you wish to make comments regarding this document, please send them to public-prov-comments@w3.org
(subscribe public-prov-comments-request@w3.org, archives http://lists.w3.org/Archives/Public/public-prov-
comments/). All feedback is welcome.
-
+
W3C PROVenance Interchange
-
+
This document is published by the Provenance Working Group (http://www.w3.org/2011/prov/wiki/Main_Page). If
you wish to make comments regarding this document, please send them to public-prov-comments@w3.org (subscribe
public-prov-comments-request@w3.org, archives http://lists.w3.org/ Archives/Public/public-prov-comments/). All
feedback is welcome.
-
+
Generated from: http://www.w3.org/ns/prov
Date: 2020-05-26 14:20:04.650279
- <file:///Users/solbrig/git/hsolbrig/definednamespace/tests/#> rdfs:seeAlso
- <http://www.w3.org/TR/prov-o/#names-of-inverse-properties>
- owl:imports <http://www.w3.org/ns/prov-o#>
- owl:versionIRI <http://www.w3.org/ns/prov-o-inverses-20130430>
- prov:specializationOf <http://www.w3.org/ns/prov-o-inverses>
- prov:wasDerivedFrom <http://www.w3.org/ns/prov-o-20130430>
- prov:wasRevisionOf <http://www.w3.org/ns/prov-o-inverses-20120312>
- rdfs:isDefinedBy <http://www.w3.org/ns/prov>
- rdfs:seeAlso <http://www.w3.org/TR/prov-overview/>
- owl:imports <http://www.w3.org/ns/prov-aq#>
- <http://www.w3.org/ns/prov-dc#>
- <http://www.w3.org/ns/prov-dictionary#>
- <http://www.w3.org/ns/prov-links#>
- <http://www.w3.org/ns/prov-o#>
- <http://www.w3.org/ns/prov-o-inverses#>
- owl:versionIRI <http://www.w3.org/ns/prov-20130430>
- prov:wasDerivedFrom <http://www.w3.org/ns/prov-aq#>
- <http://www.w3.org/ns/prov-dc#>
- <http://www.w3.org/ns/prov-dictionary#>
- <http://www.w3.org/ns/prov-links#>
- <http://www.w3.org/ns/prov-o#>
- <http://www.w3.org/ns/prov-o-inverses#>
- prov:wasRevisionOf <http://www.w3.org/ns/prov-20130312>
- <http://www.w3.org/ns/prov-aq#> rdfs:comment "0.2"^^xsd:string
- rdfs:seeAlso <http://www.w3.org/TR/prov-aq/>
- prov:
- owl:versionIRI <http://www.w3.org/TR/2013/NOTE-prov-aq-20130430/>
- <http://www.w3.org/ns/prov-dc#> owl:imports <http://www.w3.org/ns/prov-o#>
- <http://www.w3.org/ns/prov-dictionary#> rdfs:seeAlso <http://www.w3.org/TR/prov-dictionary/>
- <http://www.w3.org/ns/prov>
- <http://www.w3.org/ns/prov-links#> rdfs:seeAlso <http://www.w3.org/TR/prov-links/>
- <http://www.w3.org/ns/prov>
- owl:imports <http://www.w3.org/ns/prov-o#>
- owl:versionIRI <http://www.w3.org/ns/prov-links-20130430>
- owl:versionInfo "Working Group Note version 2013-04-30"
- prov:specializationOf <http://www.w3.org/ns/prov-links>
- <http://www.w3.org/ns/prov-o#> rdfs:seeAlso <http://www.w3.org/TR/prov-o/>
- <http://www.w3.org/ns/prov>
owl:versionIRI <http://www.w3.org/ns/prov-o-20130430>
owl:versionInfo "Recommendation version 2013-04-30"
prov:specializationOf <http://www.w3.org/ns/prov-o>
prov:wasRevisionOf <http://www.w3.org/ns/prov-o-20120312>
+
"""
_fail = True
-
+
# http://www.w3.org/2000/01/rdf-schema#Resource
activityOfInfluence: URIRef # activityOfInfluence
agentOfInfluence: URIRef # agentOfInfluence
@@ -134,7 +97,7 @@ class PROV(DefinedNamespace):
wasUsedInDerivation: URIRef # wasUsedInDerivation
# http://www.w3.org/2002/07/owl#AnnotationProperty
- aq: URIRef #
+ aq: URIRef #
category: URIRef # Classify prov-o terms into three categories, including 'starting-point', 'qualifed', and 'extended'. This classification is used by the prov-o html document to gently introduce prov-o terms to its users.
component: URIRef # Classify prov-o terms into six components according to prov-dm, including 'agents-responsibility', 'alternate', 'annotations', 'collections', 'derivations', and 'entities-activities'. This classification is used so that readers of prov-o specification can find its correspondence with the prov-dm specification.
constraints: URIRef # A reference to the principal section of the PROV-CONSTRAINTS document that describes this concept.
@@ -146,9 +109,9 @@ class PROV(DefinedNamespace):
n: URIRef # A reference to the principal section of the PROV-M document that describes this concept.
order: URIRef # The position that this OWL term should be listed within documentation. The scope of the documentation (e.g., among all terms, among terms within a prov:category, among properties applying to a particular class, etc.) is unspecified.
qualifiedForm: URIRef # This annotation property links a subproperty of prov:wasInfluencedBy with the subclass of prov:Influence and the qualifying property that are used to qualify it. Example annotation: prov:wasGeneratedBy prov:qualifiedForm prov:qualifiedGeneration, prov:Generation . Then this unqualified assertion: :entity1 prov:wasGeneratedBy :activity1 . can be qualified by adding: :entity1 prov:qualifiedGeneration :entity1Gen . :entity1Gen a prov:Generation, prov:Influence; prov:activity :activity1; :customValue 1337 . Note how the value of the unqualified influence (prov:wasGeneratedBy :activity1) is mirrored as the value of the prov:activity (or prov:entity, or prov:agent) property on the influence class.
- sharesDefinitionWith: URIRef #
+ sharesDefinitionWith: URIRef #
specializationOf: URIRef # specializationOf
- todo: URIRef #
+ todo: URIRef #
unqualifiedForm: URIRef # Classes and properties used to qualify relationships are annotated with prov:unqualifiedForm to indicate the property used to assert an unqualified provenance relation.
wasRevisionOf: URIRef # A revision is a derivation that revises an entity into a revised version.
diff --git a/rdflib/namespace/_QB.py b/rdflib/namespace/_QB.py
index fdb1c702..4aa6d48d 100644
--- a/rdflib/namespace/_QB.py
+++ b/rdflib/namespace/_QB.py
@@ -5,23 +5,22 @@ from rdflib.namespace import DefinedNamespace, Namespace
class QB(DefinedNamespace):
"""
Vocabulary for multi-dimensional (e.g. statistical) data publishing
-
+
This vocabulary allows multi-dimensional data, such as statistics, to be published in RDF. It is based on the
core information model from SDMX (and thus also DDI).
-
+
Generated from: http://purl.org/linked-data/cube#
Date: 2020-05-26 14:20:05.485176
<http://purl.org/linked-data/cube> rdfs:label "The data cube vocabulary"
dcterms:created "2010-07-12"^^xsd:date
dcterms:license <http://www.opendatacommons.org/licenses/pddl/1.0/>
- dcterms:modified "2010-11-27"^^xsd:date
- "2013-03-02"^^xsd:date
- "2013-07-26"^^xsd:date
+ dcterms:modified "2013-07-26"^^xsd:date
owl:versionInfo "0.2"
+
"""
_fail = True
-
+
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
attribute: URIRef # An alternative to qb:componentProperty which makes explicit that the component is a attribute
codeList: URIRef # gives the code list associated with a CodedProperty
diff --git a/rdflib/namespace/_SKOS.py b/rdflib/namespace/_SKOS.py
index 6f8aa252..6e1789c1 100644
--- a/rdflib/namespace/_SKOS.py
+++ b/rdflib/namespace/_SKOS.py
@@ -5,23 +5,21 @@ from rdflib.namespace import DefinedNamespace, Namespace
class SKOS(DefinedNamespace):
"""
SKOS Vocabulary
-
+
An RDF vocabulary for describing the basic structure and content of concept schemes such as thesauri,
classification schemes, subject heading lists, taxonomies, 'folksonomies', other types of controlled
vocabulary, and also concept schemes embedded in glossaries and terminologies.
-
+
Generated from: https://www.w3.org/2009/08/skos-reference/skos.rdf
Date: 2020-05-26 14:20:08.489187
- <http://www.w3.org/2004/02/skos/core> dct:contributor "Dave Beckett"
- "Nikki Rogers"
- "Participants in W3C's Semantic Web Deployment Working Group."
- dct:creator "Alistair Miles"
- "Sean Bechhofer"
+ <http://www.w3.org/2004/02/skos/core> dct:contributor "Dave Beckett", "Nikki Rogers", "Participants in W3C's Semantic Web Deployment Working Group."
+ dct:creator "Alistair Miles", "Sean Bechhofer"
rdfs:seeAlso <http://www.w3.org/TR/skos-reference/>
+
"""
_fail = True
-
+
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
altLabel: URIRef # An alternative lexical label for a resource.
broadMatch: URIRef # skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes.
diff --git a/rdflib/namespace/_SOSA.py b/rdflib/namespace/_SOSA.py
index 85c09343..21c12bfc 100644
--- a/rdflib/namespace/_SOSA.py
+++ b/rdflib/namespace/_SOSA.py
@@ -5,22 +5,15 @@ from rdflib.namespace import DefinedNamespace, Namespace
class SOSA(DefinedNamespace):
"""
Sensor, Observation, Sample, and Actuator (SOSA) Ontology
-
+
This ontology is based on the SSN Ontology by the W3C Semantic Sensor Networks Incubator Group (SSN-XG),
together with considerations from the W3C/OGC Spatial Data on the Web Working Group.
-
+
Generated from: http://www.w3.org/ns/sosa/
Date: 2020-05-26 14:20:08.792504
- a voaf:Vocabulary
- dcterms:created "2017-04-17"^^xsd:date
- dcterms:license <http://www.opengeospatial.org/ogc/Software>
- <http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document>
- dcterms:rights "Copyright 2017 W3C/OGC."
- vann:preferredNamespacePrefix "sosa"
- vann:preferredNamespaceUri "http://www.w3.org/ns/sosa/"
"""
-
+
# http://www.w3.org/2000/01/rdf-schema#Class
ActuatableProperty: URIRef # An actuatable quality (property, characteristic) of a FeatureOfInterest.
Actuation: URIRef # An Actuation carries out an (Actuation) Procedure to change the state of the world using an Actuator.
diff --git a/rdflib/namespace/_SSN.py b/rdflib/namespace/_SSN.py
index 5d928e2a..155c9df1 100644
--- a/rdflib/namespace/_SSN.py
+++ b/rdflib/namespace/_SSN.py
@@ -5,35 +5,15 @@ from rdflib.namespace import DefinedNamespace, Namespace
class SSN(DefinedNamespace):
"""
Semantic Sensor Network Ontology
-
+
This ontology describes sensors, actuators and observations, and related concepts. It does not describe domain
concepts, time, locations, etc. these are intended to be included from other ontologies via OWL imports.
-
+
Generated from: http://www.w3.org/ns/ssn/
Date: 2020-05-26 14:20:09.068204
- a voaf:Vocabulary
- dcterms:created "2017-04-17"^^xsd:date
- dcterms:license <http://www.opengeospatial.org/ogc/Software>
- <http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document>
- dcterms:rights "Copyright 2017 W3C/OGC."
- vann:preferredNamespacePrefix "ssn"
- vann:preferredNamespaceUri "http://www.w3.org/ns/ssn/"
- rdfs:comment "Please report any errors to the W3C Spatial Data on the Web Working Group via the SDW WG Public
- List public-sdw-wg@w3.org"
- rdfs:seeAlso <https://www.w3.org/2015/spatial/wiki/Semantic_Sensor_Network_Ontology>
- owl:imports sosa:
- owl:versionInfo '''New modular version of the SSN ontology.
- This ontology was originally developed in 2009-2011 by the W3C Semantic Sensor Networks Incubator Group (SSN-
- XG). For more information on the group's activities http://www.w3.org/2005/Incubator/ssn/. The ontology was
- revised and modularized in 2015-2017 by the W3C/OGC Spatial Data on the Web Working Group,
- https://www.w3.org/2015/spatial/wiki/Semantic_Sensor_Network_Ontology.
- In particular, (a) the scope is extended to include actuation and sampling; (b) the core concepts and
- properties are factored out into the SOSA ontology. The SSN ontology imports SOSA and adds formal
- axiomatization consistent with the text definitions in SOSA, and adds classes and properties to accommodate
- the scope of the original SSN ontology. '''
"""
-
+
# http://www.w3.org/2002/07/owl#Class
Deployment: URIRef # Describes the Deployment of one or more Systems for a particular purpose. Deployment may be done on a Platform.
Input: URIRef # Any information that is provided to a Procedure for its use.
diff --git a/rdflib/namespace/_TIME.py b/rdflib/namespace/_TIME.py
index 94329392..d247ae71 100644
--- a/rdflib/namespace/_TIME.py
+++ b/rdflib/namespace/_TIME.py
@@ -5,37 +5,12 @@ from rdflib.namespace import DefinedNamespace, Namespace
class TIME(DefinedNamespace):
"""
OWL-Time
-
+
Generated from: http://www.w3.org/2006/time#
Date: 2020-05-26 14:20:10.531265
- <http://www.w3.org/2006/time> rdfs:label "Tiempo en OWL"@es
- dct:contributor <https://orcid.org/0000-0001-8269-8171>
- <mailto:chris.little@metoffice.gov.uk>
- dct:created "2006-09-27"^^xsd:date
- dct:creator <http://orcid.org/0000-0002-3884-3420>
- <https://en.wikipedia.org/wiki/Jerry_Hobbs>
- <mailto:panfeng66@gmail.com>
- dct:isVersionOf <http://www.w3.org/TR/owl-time>
- dct:license <https://creativecommons.org/licenses/by/4.0/>
- dct:modified "2017-04-06"^^xsd:date
- dct:rights "Copyright © 2006-2017 W3C, OGC. W3C and OGC liability, trademark and document use rules apply."
- rdfs:seeAlso <http://dx.doi.org/10.3233/SW-150187>
- <http://www.semantic-web-journal.net/content/time-ontology-extended-non-gregorian-calendar-applications>
- <http://www.w3.org/TR/owl-time>
- owl:priorVersion time:2006
- owl:versionIRI time:2016
- skos:changeNote "2016-06-15 - initial update of OWL-Time - modified to support arbitrary temporal reference
- systems. "
- "2016-12-20 - adjust range of time:timeZone to time:TimeZone, moved up from the tzont ontology. "
- "2016-12-20 - restore time:Year and time:January which were present in the 2006 version of the ontology,
- but now marked \"deprecated\". "
- "2017-02 - intervalIn, intervalDisjoint, monthOfYear added; TemporalUnit subclass of TemporalDuration"
- "2017-04-06 - hasTime, hasXSDDuration added; Number removed; all duration elements changed to xsd:decimal"
- skos:historyNote '''Update of OWL-Time ontology, extended to support general temporal reference systems.
- Ontology engineering by Simon J D Cox'''
"""
-
+
# http://www.w3.org/2000/01/rdf-schema#Datatype
generalDay: URIRef # Day of month - formulated as a text string with a pattern constraint to reproduce the same lexical form as gDay, except that values up to 99 are permitted, in order to support calendars with more than 31 days in a month. Note that the value-space is not defined, so a generic OWL2 processor cannot compute ordering relationships of values of this type.
generalMonth: URIRef # Month of year - formulated as a text string with a pattern constraint to reproduce the same lexical form as gMonth, except that values up to 20 are permitted, in order to support calendars with more than 12 months in the year. Note that the value-space is not defined, so a generic OWL2 processor cannot compute ordering relationships of values of this type.
diff --git a/rdflib/namespace/_VOID.py b/rdflib/namespace/_VOID.py
index 7265a294..be42e91b 100644
--- a/rdflib/namespace/_VOID.py
+++ b/rdflib/namespace/_VOID.py
@@ -5,21 +5,18 @@ from rdflib.namespace import DefinedNamespace, Namespace
class VOID(DefinedNamespace):
"""
Vocabulary of Interlinked Datasets (VoID)
-
+
The Vocabulary of Interlinked Datasets (VoID) is an RDF Schema vocabulary for expressing metadata about RDF
datasets. It is intended as a bridge between the publishers and users of RDF data, with applications ranging
from data discovery to cataloging and archiving of datasets. This document provides a formal definition of the
new RDF classes and properties introduced for VoID. It is a companion to the main specification document for
VoID, <em><a href="http://www.w3.org/TR/void/">Describing Linked Datasets with the VoID Vocabulary</a></em>.
-
+
Generated from: http://rdfs.org/ns/void#
Date: 2020-05-26 14:20:11.911298
<http://vocab.deri.ie/void> a adms:SemanticAsset
- dc:creator <http://vocab.deri.ie/void#Michael%20Hausenblas>
- <http://vocab.deri.ie/void#cygri>
- <http://vocab.deri.ie/void#junzha>
- <http://vocab.deri.ie/void#keiale>
+ dc:creator <http://vocab.deri.ie/void#Michael%20Hausenblas>, <http://vocab.deri.ie/void#cygri>, <http://vocab.deri.ie/void#junzha>, <http://vocab.deri.ie/void#keiale>
dcterms:created "2010-01-26"^^xsd:date
dcterms:modified "2011-03-06"^^xsd:date
dcterms:partOf <http://vocab.deri.ie>
@@ -29,9 +26,10 @@ class VOID(DefinedNamespace):
vann:preferredNamespacePrefix "void"
vann:preferredNamespaceUri "http://rdfs.org/ns/void#"
foaf:homepage <http://vocab.deri.ie/void.html>
+
"""
_fail = True
-
+
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
classPartition: URIRef # A subset of a void:Dataset that contains only the entities of a certain rdfs:Class.
classes: URIRef # The total number of distinct classes in a void:Dataset. In other words, the number of distinct resources occuring as objects of rdf:type triples in the dataset.
@@ -66,7 +64,7 @@ class VOID(DefinedNamespace):
Linkset: URIRef # A collection of RDF links between two void:Datasets.
TechnicalFeature: URIRef # A technical feature of a void:Dataset, such as a supported RDF serialization format.
- # Valid non-python identifiers
+ # Valid non-python identifiers
_extras = ['class']
_NS = Namespace("http://rdfs.org/ns/void#")
diff --git a/rdflib/namespace/_XSD.py b/rdflib/namespace/_XSD.py
index b01ee7ed..48e9a0f4 100644
--- a/rdflib/namespace/_XSD.py
+++ b/rdflib/namespace/_XSD.py
@@ -9,46 +9,6 @@ class XSD(DefinedNamespace):
Generated from: ../schemas/datatypes.xsd
Date: 2020-05-26 14:21:14.993677
- The schema corresponding to this document is normative,
- with respect to the syntactic constraints it expresses in the
- XML Schema language. The documentation (within <documentation>
- elements) below, is not normative, but rather highlights important
- aspects of the W3C Recommendation of which this is a part
-
- First the built-in primitive datatypes. These definitions are for
- information only, the real built-in definitions are magic.
-
- For each built-in datatype in this schema (both primitive and
- derived) can be uniquely addressed via a URI constructed
- as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the datatype
-
- For example, to address the int datatype, the URI is:
-
- http://www.w3.org/2001/XMLSchema#int
-
- Additionally, each facet definition element can be uniquely
- addressed via a URI constructed as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the facet
-
- For example, to address the maxInclusive facet, the URI is:
-
- http://www.w3.org/2001/XMLSchema#maxInclusive
-
- Additionally, each facet usage in a built-in datatype definition
- can be uniquely addressed via a URI constructed as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the datatype, followed
- by a period (".") followed by the name of the facet
-
- For example, to address the usage of the maxInclusive facet in
- the definition of int, the URI is:
-
- http://www.w3.org/2001/XMLSchema#int.maxInclusive
-
- Now the derived primitive types
"""
ENTITIES: URIRef # see: http://www.w3.org/TR/xmlschema-2/#ENTITIES
diff --git a/rdflib/plugins/parsers/notation3.py b/rdflib/plugins/parsers/notation3.py
index 3cf19ace..becbba59 100755
--- a/rdflib/plugins/parsers/notation3.py
+++ b/rdflib/plugins/parsers/notation3.py
@@ -313,6 +313,7 @@ escapeChars = set("(_~.-!$&'()*+,;=/?#@%)") # valid for \ escapes in localnames
numberChars = set("0123456789-")
numberCharsPlus = numberChars | {"+", "."}
+
def unicodeExpand(m):
try:
return chr(int(m.group(1), 16))
diff --git a/rdflib/plugins/parsers/ntriples.py b/rdflib/plugins/parsers/ntriples.py
index e4fe5833..2acf8b99 100644
--- a/rdflib/plugins/parsers/ntriples.py
+++ b/rdflib/plugins/parsers/ntriples.py
@@ -105,6 +105,7 @@ class W3CNTriplesParser(object):
"""An N-Triples Parser.
This is a legacy-style Triples parser for NTriples provided by W3C
Usage::
+
p = NTriplesParser(sink=MySink())
sink = p.parse(f) # file; use parsestring for a string