rdf-rdfxml 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rdf/rdfxml/writer.rb +17 -4
- data/lib/rdf/rdfxml/writer/haml_templates.rb +1 -1
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a008b5ac397b0ac5cc342613446159218c29f9d
|
4
|
+
data.tar.gz: 36447993bfa7903128d7a7c34a899c74fae497ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e666105b18bbeea340dc20da88f0cc5cf4526a6462612c576c8dfca2506062b4dc73c29b871d1a3a68127e73ab7f5b02b8412a7c6498e444a5051dc931ff3b39
|
7
|
+
data.tar.gz: bd87404140762049fc29b21d49373e5d408b9f679ada3ecc9c696652144f4b13e19f48702a5a3e5c9dfd5cb72d24554611fbf4cddbf21c7d18d4161720b4e0bf
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
data/lib/rdf/rdfxml/writer.rb
CHANGED
@@ -307,13 +307,26 @@ module RDF::RDFXML
|
|
307
307
|
# Perform any preprocessing of statements required
|
308
308
|
# @return [ignored]
|
309
309
|
def preprocess
|
310
|
+
# Load defined prefixes
|
311
|
+
(@options[:prefixes] || {}).each_pair do |k, v|
|
312
|
+
@uri_to_prefix[v.to_s] = k
|
313
|
+
end
|
314
|
+
@options[:prefixes] = {} # Will define actual used when matched
|
315
|
+
|
316
|
+
prefix(:rdf, RDF.to_uri)
|
317
|
+
@uri_to_prefix[RDF.to_uri.to_s] = :rdf
|
318
|
+
if base_uri || @options[:lang]
|
319
|
+
prefix(:xml, RDF::XML)
|
320
|
+
@uri_to_prefix[RDF::XML.to_s] = :xml
|
321
|
+
end
|
322
|
+
|
310
323
|
if @options[:default_namespace]
|
324
|
+
@uri_to_prefix[@options[:default_namespace]] = nil
|
311
325
|
prefix(nil, @options[:default_namespace])
|
312
326
|
end
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
prefix(:xml, RDF::XML) if base_uri || @options[:lang]
|
327
|
+
|
328
|
+
# Process each statement to establish CURIEs and Terms
|
329
|
+
@graph.each {|statement| preprocess_statement(statement)}
|
317
330
|
end
|
318
331
|
|
319
332
|
##
|
@@ -30,7 +30,7 @@ module RDF::RDFXML
|
|
30
30
|
- (types.unshift(first_type); first_type = nil) if first_type && (first_type.include?('/') || first_type.start_with?('_:'))
|
31
31
|
- first_type ||= get_qname(RDF.Description)
|
32
32
|
- first_type = first_type[1..-1] if first_type.to_s.start_with?(":")
|
33
|
-
- attr_props = attr_props.merge(get_qname(RDF.nodeID) => subject.id) if subject.node? && ref_count(subject)
|
33
|
+
- attr_props = attr_props.merge(get_qname(RDF.nodeID) => subject.id) if subject.node? && ref_count(subject) >= 1
|
34
34
|
- attr_props = attr_props.merge(get_qname(RDF.about) => relativize(subject)) if subject.uri?
|
35
35
|
- haml_tag(first_type, attr_props) do
|
36
36
|
- types.each do |type|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-rdfxml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -18,6 +18,9 @@ dependencies:
|
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.1'
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.1.6
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -25,6 +28,9 @@ dependencies:
|
|
25
28
|
- - "~>"
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: '1.1'
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.6
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: rdf-rdfa
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -32,6 +38,9 @@ dependencies:
|
|
32
38
|
- - "~>"
|
33
39
|
- !ruby/object:Gem::Version
|
34
40
|
version: '1.1'
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.1.4.1
|
35
44
|
type: :runtime
|
36
45
|
prerelease: false
|
37
46
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -39,6 +48,9 @@ dependencies:
|
|
39
48
|
- - "~>"
|
40
49
|
- !ruby/object:Gem::Version
|
41
50
|
version: '1.1'
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.1.4.1
|
42
54
|
- !ruby/object:Gem::Dependency
|
43
55
|
name: rdf-xsd
|
44
56
|
requirement: !ruby/object:Gem::Requirement
|