You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-6Lines changed: 50 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,19 +29,63 @@ Practically, to map RDF to objects, you need to:
29
29
1. a corresponding ValueMapping and TermMapping for sets of primitive values
30
30
1. a corresponding TermWrapper for properties returning a class
31
31
1. two corresponding TermWrappers (generally the same) for sets of classes
32
-
1. Each class mutates the underlying Dataset that is passed to it for instantiation
32
+
1. Each class mutates the underlying Dataset that is passed to it at instantiation time
33
33
34
34
35
-
## Usage
35
+
## Wrapping RDF
36
36
37
-
### Wrapping Datasets
38
-
39
-
Dataset Wrapper allows you to instantiate classes from existing data in a graph.
37
+
In order to wrap RDF, one needs an underlying data structure. Therefore, both `TermWrapper` and `DatasetWrapper` take an RDF/JS [Dataset](https://rdf.js.org/dataset-spec/#datasetcore-interface) and [Datafactory](https://rdf.js.org/data-model-spec/#datafactory-interface) as constructor parameters.
40
38
41
39
42
40
### Wrapping Terms
43
41
44
-
Term Wrapper allows to manipulate data in a graph via class properties.
42
+
Term wrapping lets you manipulate data in a graph via class properties.
43
+
44
+
A [term](https://www.w3.org/TR/rdf12-concepts/#section-terms) wrapper instantiates a class from a term.
45
+
46
+
For example you can write a `Person` class with one `name` property:
0 commit comments