@@ -58,80 +58,53 @@ HTTP/1.1 200 OK
58
58
<http://www.w3.org/ns/posix/stat#size> "780" .
59
59
```
60
60
61
- #### Globbing (inlining on GET)
61
+ #### Globbing (concatenate RDF files in a container on GET)
62
62
63
- We have found that in some cases, using the existing LDP features was not
64
- enough. For instance, to optimize certain applications we needed to aggregate
65
- all RDF resources from a container and retrieve them with a single GET
66
- operation. We implemented this feature on the servers and decided to call it
67
- "globbing". Similar to [ UNIX shell
68
- glob] ( https://en.wikipedia.org/wiki/Glob_(programming) ) , doing a GET on any URI
69
- which ends with a ` * ` will return an aggregate view of all the resources that
70
- match the indicated pattern .
63
+ To optimize certain applications,
64
+ you can aggregate all RDF resources within a container
65
+ and retrieve them with a single ` GET ` operation.
66
+ We refer to this feature as _ globbing _ ,
67
+ since it provides a subset of the functionality
68
+ offered by the [ UNIX shell glob] ( https://en.wikipedia.org/wiki/Glob_(programming) ) .
69
+ Performing a ` GET ` on a URL ending in ` /* `
70
+ will return an aggregate view of all RDF resources of the corresponding container .
71
71
72
- For example, let's assume that ` /data/res1 ` and ` /data/res2 ` are two resources
73
- containing one triple each, which defines their type as follows:
72
+ For example, consider a container ` /data ` that contains the following files:
73
+ - ` file1.ttl `
74
+ - ` file2.ttl `
75
+ - ` res3.txt `
74
76
75
- For * res1* :
77
+ Let's assume that ` /data/file1.ttl ` and ` /data/file2.ttl `
78
+ contain one triple each:
76
79
77
80
``` ttl
78
- <> a <https://example.org/ns/type#One> .
81
+ <file1.ttl > a <https://example.org/ns/type#One> .
79
82
```
80
83
81
- For * res2* :
82
-
83
84
``` ttl
84
- <> a <https://example.org/ns/type#Two> .
85
- ```
86
-
87
- If one would like to fetch all resources of a container beginning with ` res `
88
- (e.g. ` /data/res1 ` , ` /data/res2 ` ) in one request, they could do a GET on
89
- ` /data/res* ` as follows.
90
-
91
- REQUEST:
92
-
93
- ``` http
94
- GET /data/res* HTTP/1.1
95
- Host: example.org
85
+ <file2.ttl> a <https://example.org/ns/type#Two> .
96
86
```
97
87
98
- RESPONSE:
99
-
100
- ``` http
101
- HTTP/1.1 200 OK
102
- ```
103
- ``` ttl
104
- <res1>
105
- a <https://example.org/ns/type#One> .
106
-
107
- <res2>
108
- a <https://example.org/ns/type#Two> .
109
- ```
110
-
111
- Alternatively, one could ask the server to inline * all* resources of a
112
- container, which includes the triples corresponding to the container itself:
113
-
114
- REQUEST:
88
+ Then a request to ` /data/* `
89
+ will return the union of the datasets in ` file1.ttl ` and ` file2.ttl ` :
115
90
116
91
``` http
117
92
GET /data/* HTTP/1.1
118
93
Host: example.org
119
94
```
120
95
121
- RESPONSE:
122
-
123
96
``` http
124
97
HTTP/1.1 200 OK
125
98
```
126
99
``` ttl
127
100
<>
128
101
a <http://www.w3.org/ns/ldp#BasicContainer> ;
129
- <http://www.w3.org/ns/ldp#contains> <res1 >, <res2 > .
102
+ <http://www.w3.org/ns/ldp#contains> <file1.ttl >, <file2.ttl > .
130
103
131
- <res1 >
104
+ <file1.ttl >
132
105
a <https://example.org/ns/type#One> .
133
106
134
- <res2 >
107
+ <file2.ttl >
135
108
a <https://example.org/ns/type#Two> .
136
109
```
137
110
0 commit comments