spread2rdf 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +8 -6
- data/VERSION +1 -1
- data/lib/spread2rdf/mapping/cell.rb +2 -0
- data/lib/spread2rdf/schema/column.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGMzNGI2MGE5ZDdhNmQxYTQ2OGJjYjcwMGIzYjJmOTViMDEyZTY0Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWM4ZTc4OGViOTYzMmNkMWIyZWY2ZGFkNTlhYjY4NTJmYjM2NzI0Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmVmNmNjYjUxMjJkNmY5NDNkNDZmNGI2NTg2MWVhNTVmMmZjYjFhMmFlOTdl
|
10
|
+
OGUzOTZiN2I0M2M0NThiMjA4NDk0ZGYzN2E5YmI2NmZmM2NlNjZhNzQ0N2Vi
|
11
|
+
MGE0ODdhNzY1MzhjMDA1MTM5OGIxM2Y4ZGZhMmRiOWNmNTA5YmE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTNiMmIzOTdlMTlmZDMyMGQyZGVjMzhiMDFkNGE1NTAyOGE0MDA4MmY5MzBi
|
14
|
+
OTgwNjhlMDFhZjZjY2ZkMmQ3MGVlYzMyNzkwOTMxYmMwMGNjNzkwOTEzYTU1
|
15
|
+
NDIwYjA1NDg0Nzk0MDA0NGM2OGY2YjE2NDA3ZTU0NDc2ZTQwNTA=
|
data/README.md
CHANGED
@@ -96,11 +96,11 @@ module Spread2RDF
|
|
96
96
|
column :name, predicate: RDFS.label
|
97
97
|
column :uri
|
98
98
|
|
99
|
-
column :
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
99
|
+
column :modified, predicate: DC.modified,
|
100
|
+
object: { datatype: XSD.date }
|
101
|
+
|
102
|
+
column :type, predicate: RDF.type,
|
103
|
+
object: { from: :MaterialElementClasses }
|
104
104
|
|
105
105
|
column_block :parameter, subject: { uri: :bnode, type: PSM.Parameter },
|
106
106
|
predicate: PSM.materialParameter do
|
@@ -253,8 +253,10 @@ to ```:none``` (see below).
|
|
253
253
|
This parameter specifies the construction of an object resource or value for a
|
254
254
|
row and expects a hash with further sub-parameters as its value:
|
255
255
|
- ```language```:
|
256
|
-
A string or Ruby symbol with a language to be used to tag the
|
256
|
+
A string or Ruby symbol with a language to be used to tag the object value of
|
257
257
|
the generated triple.
|
258
|
+
- ```datatype```:
|
259
|
+
An URI to be used as the datatype for the object value of the generated triple.
|
258
260
|
- ```uri```:
|
259
261
|
Specifies the rule for the generation of a resource for the object
|
260
262
|
of a triple. Currently, the following values are possible:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
@@ -50,6 +50,8 @@ module Spread2RDF
|
|
50
50
|
def map_to_literal(value)
|
51
51
|
if language = schema.try(:object).try(:fetch, :language, nil)
|
52
52
|
RDF::Literal.new(value, language: language.to_sym)
|
53
|
+
elsif datatype = schema.try(:object).try(:fetch, :datatype, nil)
|
54
|
+
RDF::Literal.new(value, datatype: datatype)
|
53
55
|
else
|
54
56
|
value
|
55
57
|
end
|
@@ -59,6 +59,7 @@ module Spread2RDF
|
|
59
59
|
when !object[:uri].nil? then :new_resource
|
60
60
|
when !object[:from].nil? then :resource_ref
|
61
61
|
when !object[:language].nil? then :to_string
|
62
|
+
when !object[:datatype].nil? then :to_string
|
62
63
|
else
|
63
64
|
raise "mapping specification error: don't know how to map #{self}"
|
64
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spread2rdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcel Otto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|