bolognese 1.5.13 → 1.5.14
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bolognese/metadata_utils.rb +8 -0
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/rdf_xml_writer.rb +0 -8
- data/lib/bolognese/writers/turtle_writer.rb +0 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5de9f57a9ed6c40f7187f42cfc979ab6fb0c565f4e2ebcb4f80279163befcad
|
|
4
|
+
data.tar.gz: 0f78b0cb00691d1a4b01943022956105e4fe0e4da03333b21a1f0757496fdf93
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ba85d8b48378f9dbc69a58818f5e7684a8677e4b3f114ae1981f59928d0c4df9b9644bc010354cb59357ef0d8cf77e2778c41d96d9a4a501726770738d61a54
|
|
7
|
+
data.tar.gz: 221ed783cb5430be487099f3e386dc3bbcce1251f4d7d65cca9d35d763be1907da23032dbeebd8a7fdfd6cf35d89489c443ed2044efcf8dabda7a725b86da0bb
|
data/Gemfile.lock
CHANGED
|
@@ -121,7 +121,15 @@ module Bolognese
|
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
def graph
|
|
124
|
+
# preload schema_org context
|
|
125
|
+
JSON::LD::Context.add_preloaded(
|
|
126
|
+
'http://schema.org/',
|
|
127
|
+
JSON::LD::Context.new.parse('resources/schema_org/jsonldcontext.json')
|
|
128
|
+
)
|
|
129
|
+
|
|
124
130
|
RDF::Graph.new << JSON::LD::API.toRdf(schema_hsh)
|
|
131
|
+
rescue NameError
|
|
132
|
+
nil
|
|
125
133
|
end
|
|
126
134
|
|
|
127
135
|
def citeproc_hsh
|
data/lib/bolognese/version.rb
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "json/ld"
|
|
4
|
-
|
|
5
3
|
module Bolognese
|
|
6
4
|
module Writers
|
|
7
5
|
module RdfXmlWriter
|
|
8
|
-
# preload schema_org context
|
|
9
|
-
::JSON::LD::Context.add_preloaded(
|
|
10
|
-
'http://schema.org/',
|
|
11
|
-
::JSON::LD::Context.new.parse('resources/schema_org/jsonldcontext.json')
|
|
12
|
-
)
|
|
13
|
-
|
|
14
6
|
def rdf_xml
|
|
15
7
|
graph.dump(:rdfxml, prefixes: { schema: "http://schema.org/" })
|
|
16
8
|
end
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "json/ld"
|
|
4
|
-
|
|
5
3
|
module Bolognese
|
|
6
4
|
module Writers
|
|
7
5
|
module TurtleWriter
|
|
8
|
-
# preload schema_org context
|
|
9
|
-
::JSON::LD::Context.add_preloaded(
|
|
10
|
-
'http://schema.org/',
|
|
11
|
-
::JSON::LD::Context.new.parse('resources/schema_org/jsonldcontext.json')
|
|
12
|
-
)
|
|
13
|
-
|
|
14
6
|
def turtle
|
|
15
7
|
graph.dump(:ttl, prefixes: { schema: "http://schema.org/" })
|
|
16
8
|
end
|