ldp 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,57 +0,0 @@
1
- module Ldp
2
- module Response::Paging
3
- ##
4
- # Statements about the page
5
- def page
6
- @page_graph ||= begin
7
- g = RDF::Graph.new
8
-
9
- if resource?
10
- res = graph.query RDF::Statement.new(page_subject, nil, nil)
11
-
12
- res.each_statement do |s|
13
- g << s
14
- end
15
- end
16
-
17
- g
18
- end
19
- end
20
-
21
- ##
22
- # Get the subject for the response
23
- def subject
24
- @subject ||= if has_page?
25
- graph.first_object [page_subject, Ldp.page_of, nil]
26
- else
27
- page_subject
28
- end
29
- end
30
-
31
- ##
32
- # Is there a next page?
33
- def has_next?
34
- next_page != nil
35
- end
36
-
37
- ##
38
- # Get the URI for the next page
39
- def next_page
40
- graph.first_object [page_subject, Ldp.nextPage, nil]
41
- end
42
-
43
- ##
44
- # Get the URI to the first page
45
- def first_page
46
- if links['first']
47
- RDF::URI.new links['first']
48
- elsif graph.has_statement? RDf::Statement.new(page_subject, Ldp.nextPage, nil)
49
- subject
50
- end
51
- end
52
-
53
- def sort
54
-
55
- end
56
- end
57
- end