jekyll-rdf 2.1.1.pre.develop.225 → 2.1.1.pre.develop.230
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/filters/rdf_container.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 752518fd2436e3e8638e0771b3bdf33e5c742782
|
4
|
+
data.tar.gz: a8397566af53efcb6f98c38353c41c3a9eb6d4fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ccaa1e9c7f4c90afe5a12d8472ba93dad7a5e24823ce6d3f64fd52a07fbdf8e3520215643bf7d365cb1467349c9f08a194310065b45bed5ff950d55c9349f7e
|
7
|
+
data.tar.gz: abaee80d5303b989578a3b27eab41b04c1ff8e5f2581883819efb1c14d63944bc5aad8c133eff0e8a0409d4c4439cda541163e33fce49addcab96e3a8c501b39
|
@@ -32,7 +32,7 @@ module Jekyll
|
|
32
32
|
Jekyll.logger.error "#{input.term.to_ntriples} is not recognized as a container"
|
33
33
|
return []
|
34
34
|
end
|
35
|
-
query = "SELECT ?p ?o WHERE{ #{input.term.to_ntriples} ?p ?o }"
|
35
|
+
query = "SELECT ?p ?o WHERE{ #{input.term.to_ntriples} ?p ?o #{query_additions(input, sparql_client)}"
|
36
36
|
solutions = sparql_client.query(query).each_with_object([]) {|solution, array|
|
37
37
|
if(/^http:\/\/www\.w3\.org\/1999\/02\/22-rdf-syntax-ns#_\d+$/.match(solution.p.to_s))
|
38
38
|
array << Jekyll::Drops::RdfTerm.build_term_drop(solution.o, input.sparql, input.site).add_necessities(input.site, input.page)
|
@@ -41,6 +41,10 @@ module Jekyll
|
|
41
41
|
return solutions
|
42
42
|
end
|
43
43
|
|
44
|
+
def query_additions(input, sparql_client)
|
45
|
+
return "BIND((<http://www.w3.org/2001/XMLSchema#integer>(SUBSTR(str(?p), 45))) AS ?order) } ORDER BY ASC(?order)"
|
46
|
+
end
|
47
|
+
|
44
48
|
def valid_container?(input, sparql_client, type = nil)
|
45
49
|
ask_query1 = "ASK WHERE {VALUES ?o {<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt>} #{input.term.to_ntriples} <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o}"
|
46
50
|
ask_query2 = "ASK WHERE {#{input.term.to_ntriples} <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o. ?o <http://www.w3.org/2000/01/rdf-schema#subClassOf>* <http://www.w3.org/2000/01/rdf-schema#Container>}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-rdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.1.pre.develop.
|
4
|
+
version: 2.1.1.pre.develop.230
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elias Saalmann
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2017-08-
|
19
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: linkeddata
|