|
1 | 1 | """ |
2 | 2 | An RDFLib Dataset is a slight extension to ConjunctiveGraph: it uses simpler terminology |
3 | | -and has a few additional convenience method extensions, for example add() can be used to |
| 3 | +and has a few additional convenience methods, for example add() can be used to |
4 | 4 | add quads directly to a specific Graph within the Dataset. |
5 | 5 |
|
6 | | -This example file shows how to decalre a Dataset, add content to it, serialise it, query it |
| 6 | +This example file shows how to declare a Dataset, add content to it, serialise it, query it |
7 | 7 | and remove things from it. |
8 | 8 | """ |
9 | 9 |
|
|
12 | 12 | # Note regarding `mypy: ignore_errors=true`: |
13 | 13 | # |
14 | 14 | # This example is using URIRef values as context identifiers. This is contrary |
15 | | -# to the type hints, but it does work. Most likely the type hints are wrong. |
| 15 | +# to the type hints, but it does work. Most likely, the type hints are wrong. |
16 | 16 | # Ideally we should just use `# type: ignore` comments for the lines that are |
17 | | -# causing problems, but for some reason the error occurs on different lines with |
18 | | -# different python versions, so the only option is to ignore errors for the |
19 | | -# whole file. |
| 17 | +# causing problems, but the error occurs on different lines with different |
| 18 | +# Python versions, so the only option is to ignore errors for the whole file. |
20 | 19 |
|
21 | 20 | # mypy: ignore_errors=true |
22 | 21 |
|
|
102 | 101 | print() |
103 | 102 | print() |
104 | 103 |
|
105 | | -# Query one graph in the Dataset for all it's triples |
| 104 | +# Query one graph in the Dataset for all its triples |
106 | 105 | # we should get |
107 | 106 | """ |
108 | 107 | (rdflib.term.URIRef('http://example.com/subject-z'), rdflib.term.URIRef('http://example.com/predicate-z'), rdflib.term.Literal('Triple Z')) |
|
117 | 116 | print() |
118 | 117 |
|
119 | 118 | # Query the union of all graphs in the dataset for all triples |
120 | | -# we should get Nothing: |
| 119 | +# we should get nothing: |
121 | 120 | """ |
122 | 121 | """ |
123 | 122 | # A Dataset's default union graph does not exist by default (default_union property is False) |
|
0 commit comments