jekyll-rdf 3.0.0.pre.develop.303 → 3.0.0.pre.develop.319
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d3dc451cb7b1f81e9f9563acb874b8a5eda3e519cccbbdf851831dd7971fdea6
|
4
|
+
data.tar.gz: f68ac51b1c7f183987a40d7acf60dac7fbd9cd8626daad8343ebf0d52e433e4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a1b11b325f3350ab62eefddee4ac875ae01f92bd2909fae491c386b6bea36fc0c9c9255912b39c8dde31fd2ef7a1d88697de9bbd5ea2747e6933196d829c7b0
|
7
|
+
data.tar.gz: a399c06949172657bbe8bc567560e90680f529f77dbe8d1f014e868eef039bf76771a287e93eacc7e8d723bf53091068ea0bda49710385aaa887ad6aa1871209
|
@@ -27,6 +27,7 @@
|
|
27
27
|
module Jekyll
|
28
28
|
module RdfCollection
|
29
29
|
def rdf_collection(input, predicate = nil)
|
30
|
+
input = Jekyll::RdfHelper::page.data['rdf'] if(input.nil? || input.class <= (Jekyll::RdfPageData))
|
30
31
|
query = "SELECT ?f WHERE{ #{input.term.to_ntriples} " <<
|
31
32
|
(predicate.nil? ? "" : " <#{rdf_resolve_prefix(predicate)}> ?coll . ?coll ") <<
|
32
33
|
" <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest>* ?r. ?r <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> ?f}"
|
@@ -27,6 +27,7 @@ module Jekyll
|
|
27
27
|
module RdfContainer
|
28
28
|
include Jekyll::RdfPrefixResolver
|
29
29
|
def rdf_container(input, type = nil)
|
30
|
+
input = Jekyll::RdfHelper::page.data['rdf'] if(input.nil? || input.class <= (Jekyll::RdfPageData))
|
30
31
|
sparql_client = Jekyll::RdfHelper::sparql
|
31
32
|
n_triples = input.term.to_ntriples
|
32
33
|
if(!(valid_container?(n_triples, type)))
|
@@ -31,6 +31,7 @@ module Jekyll
|
|
31
31
|
module RdfGet
|
32
32
|
include Jekyll::RdfPrefixResolver
|
33
33
|
def rdf_get(request_uri)
|
34
|
+
request_uri = "<#{Jekyll::RdfHelper::page.data['rdf'].term.to_s}>" if (request_uri.nil? || request_uri.class <= (Jekyll::RdfPageData))
|
34
35
|
request_uri = rdf_resolve_prefix(request_uri)
|
35
36
|
ask_exist = "ASK WHERE {{<#{request_uri}> ?p ?o}UNION{?s <#{request_uri}> ?o}UNION{?s ?p <#{request_uri}>}} "
|
36
37
|
return unless (Jekyll::RdfHelper::sparql.query(ask_exist).true?)
|
@@ -48,6 +48,7 @@ module Jekyll
|
|
48
48
|
|
49
49
|
private
|
50
50
|
def map_predicate(input, predicate, lang = nil, list = false, inverse = false)
|
51
|
+
input = Jekyll::RdfHelper::page.data['rdf'] if(input.nil? || input.class <= (Jekyll::RdfPageData))
|
51
52
|
return input unless input.is_a?(Jekyll::Drops::RdfResource)
|
52
53
|
predicate = rdf_resolve_prefix(predicate)
|
53
54
|
result = filter_statements(input.term.to_ntriples, predicate, inverse, lang)
|
@@ -37,8 +37,12 @@ module Jekyll
|
|
37
37
|
# * +input+ - the context RDF resource
|
38
38
|
# * +query+ - the SPARQL query
|
39
39
|
#
|
40
|
-
def sparql_query(query)
|
41
|
-
|
40
|
+
def sparql_query(resource = nil, query)
|
41
|
+
if(resource.nil? || resource.class <= (Jekyll::RdfPageData))
|
42
|
+
query.gsub!('?resourceUri', "<#{Jekyll::RdfHelper::page.data['rdf'].term}>")
|
43
|
+
else
|
44
|
+
query.gsub!('?resourceUri', "<#{resource}>")
|
45
|
+
end
|
42
46
|
if(!Jekyll::RdfHelper::page.data["rdf_prefixes"].nil?)
|
43
47
|
query = query.prepend(" ").prepend(Jekyll::RdfHelper::page.data["rdf_prefixes"])
|
44
48
|
end
|
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: 3.0.0.pre.develop.
|
4
|
+
version: 3.0.0.pre.develop.319
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elias Saalmann
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
|
-
date: 2017-
|
20
|
+
date: 2017-11-03 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: linkeddata
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: 1.3.1
|
201
201
|
requirements: []
|
202
202
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.
|
203
|
+
rubygems_version: 2.7.0
|
204
204
|
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: Hypertext Publication System for Templated Resource Rendering
|