bel-rdf-jena 0.4.0.beta1-java → 0.4.0.beta2-java
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/.gemspec +3 -2
- data/CHANGELOG.md +5 -2
- data/README.md +38 -2
- data/bin/bel-rdf-jena +33 -0
- metadata +30 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7bdb7f86acce1d8ee81eabbf6f33ed08b7a9472
|
4
|
+
data.tar.gz: c5e65d888fbb263fd87366e5f711f52aab0774aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38c578a976c375e9220af852af9522b3e52850b8e93a8f0b54442b8d7d29b9edf05e955deb288029e5f600bea6727656d947b3e42bd3b15cb834f459120e1670
|
7
|
+
data.tar.gz: 1936eed57dd13e94bedfa007ad1386803769856707627eb9d33e93e9b2ad9b2c596490e9a0d845e3066bdc153f92b93b17776a8ec8b99e102d4cfa025904ab9b
|
data/.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'bel-rdf-jena'
|
3
|
-
spec.version = '0.4.0.
|
3
|
+
spec.version = '0.4.0.beta2'
|
4
4
|
spec.summary = """
|
5
5
|
Rdf Repository plugin for bel.rb using Apache Jena.
|
6
6
|
""".gsub(%r{^\s+}, ' ').gsub(%r{\n}, '')
|
@@ -38,7 +38,8 @@ Gem::Specification.new do |spec|
|
|
38
38
|
]
|
39
39
|
|
40
40
|
spec.platform = 'java'
|
41
|
-
spec.add_runtime_dependency '
|
41
|
+
spec.add_runtime_dependency 'bel', '~> 0.4.0.beta'
|
42
|
+
spec.add_runtime_dependency 'rdf-jena', '~> 0.3.3'
|
42
43
|
spec.post_install_message = %Q{
|
43
44
|
******************************
|
44
45
|
* bel-rdf-jena plugin *
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,10 @@ All notable changes to bel-rdf-jena will be documented in this file. The curated
|
|
3
3
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [0.4.0.beta2][0.4.0.beta2] - 2015-12-11
|
7
|
+
### Added
|
8
|
+
- Added bel-rdf-jena executable that allows creation of Apache Jena TDB databases from RDF files.
|
9
|
+
|
6
10
|
## [0.4.0.beta1][0.4.0.beta1] - 2015-12-01
|
7
|
-
### Fixed
|
8
|
-
### Changed
|
9
11
|
### Added
|
12
|
+
- Added RDF Repository plugin for bel.rb using rdf-jena gem.
|
data/README.md
CHANGED
@@ -5,13 +5,49 @@ This implements an RdfRepository plugin for [bel.rb](https://github.com/OpenBEL/
|
|
5
5
|
## Features
|
6
6
|
|
7
7
|
- Plugs in rdf-jena as an Rdf Repository plugin.
|
8
|
+
- `rdf-jena` executable that allows creation of Apache Jena TDB database.
|
8
9
|
|
9
10
|
## Requirements
|
10
11
|
|
11
12
|
- JRuby 1.7 or 9k series (due to rdf-jena).
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
## Install
|
15
|
+
|
16
|
+
First install the gem using:
|
17
|
+
|
18
|
+
```bash
|
19
|
+
gem install bel-rdf-jena
|
20
|
+
```
|
21
|
+
|
22
|
+
Now the plugin is installed and can be used by bel.rb.
|
23
|
+
|
24
|
+
## Getting started
|
25
|
+
|
26
|
+
### bel-rdf-jena executable
|
27
|
+
|
28
|
+
This gem includes an executable that can create an RDF database (Apache Jena TDB) from one or more RDF files.
|
29
|
+
|
30
|
+
You will have the `bel-rdf-jena` executable available to you (i.e. on your `PATH`) once you install this gem. Keep in mind that you may have to add `$GEM_HOME/bin` to your `PATH` to pick up installed executables.
|
31
|
+
|
32
|
+
Now to create an Apache Jena TDB database provide a directory and one or more.
|
33
|
+
|
34
|
+
Example:
|
35
|
+
|
36
|
+
```bash
|
37
|
+
bel-rdf-jena --dir /opt/data/resources_rdf --file biological-concepts-rdf.ttl
|
38
|
+
```
|
39
|
+
|
40
|
+
Note: It may take a while to load your RDF data. Apache Jena does a good job of balancing performance and memory allocation. You can increase memory allocation for the process by specifying the `-J-Xmx4g` (i.e. max heap size of 4 Gb) option in `JRUBY_OPTS`.
|
41
|
+
|
42
|
+
Example:
|
43
|
+
|
44
|
+
```bash
|
45
|
+
JRUBY_OPTS="-J-Xmx4g" bel-rdf-jena --dir /opt/data/resources_rdf --file biological-concepts-rdf.ttl
|
46
|
+
```
|
47
|
+
|
48
|
+
Tip: For the `biological-concepts-rdf.ttl` file found on the [OpenBEL build server](http://build.openbel.org/browse/OR) try setting this to `-J-Xmx4g` or `-J-Xmx8g` if possible.
|
49
|
+
|
50
|
+
### Plugin to bel.rb for accessing Annotations and Namespaces
|
15
51
|
|
16
52
|
bel.rb provides an [approach to plugins](https://github.com/OpenBEL/bel.rb/wiki/Plugins-in-bel.rb) that is meant to be uncomplicated. The following steps will get you started:
|
17
53
|
|
data/bin/bel-rdf-jena
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
require 'optparse'
|
3
|
+
require 'rdf/jena'
|
4
|
+
require 'rdf/turtle'
|
5
|
+
|
6
|
+
# options; any default go here
|
7
|
+
options = {}
|
8
|
+
|
9
|
+
# parse options from cli
|
10
|
+
OptionParser.new do |opts|
|
11
|
+
opts.banner = %Q{
|
12
|
+
Builds an Apache Jena TDB database from RDF files.
|
13
|
+
|
14
|
+
Usage: bel-rdf-jena -d [DIR] -f [FILE] -f [FILE] ...
|
15
|
+
}.gsub(/^ +/, '')
|
16
|
+
|
17
|
+
opts.on('-d', '--dir DIR', 'The directory where the TDB database will live.') do |dir|
|
18
|
+
options[:dir] = dir
|
19
|
+
end
|
20
|
+
|
21
|
+
opts.on('-f', '--file FILE', 'An RDF file to load.', 'Can be used multiple times.') do |file|
|
22
|
+
(options[:files] ||= []) << file
|
23
|
+
end
|
24
|
+
end.parse!
|
25
|
+
|
26
|
+
tdb_repository = RDF::Jena::Repository.new(options[:dir])
|
27
|
+
|
28
|
+
options[:files].each do |file|
|
29
|
+
$stdout.puts %Q{Loading RDF from "#{file}".}
|
30
|
+
tdb_repository.insert_file(file)
|
31
|
+
end
|
32
|
+
|
33
|
+
$stdout.puts %Q{Created TDB database at "#{options[:dir]}".}
|
metadata
CHANGED
@@ -1,34 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bel-rdf-jena
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.
|
4
|
+
version: 0.4.0.beta2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Anthony Bargnesi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: rdf-jena
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
18
|
+
version: 0.4.0.beta
|
19
|
+
name: bel
|
20
|
+
prerelease: false
|
20
21
|
type: :runtime
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.4.0.beta
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.3.3
|
33
|
+
name: rdf-jena
|
21
34
|
prerelease: false
|
35
|
+
type: :runtime
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- - "
|
38
|
+
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
description: " An rdf repository plugin for bel.rb that uses Apache Jena's TDB data
|
28
|
-
storage to support default and named graphs. "
|
40
|
+
version: 0.3.3
|
41
|
+
description: " An rdf repository plugin for bel.rb that uses Apache Jena's TDB data\
|
42
|
+
\ storage to support default and named graphs. "
|
29
43
|
email:
|
30
44
|
- abargnesi@selventa.com
|
31
|
-
executables:
|
45
|
+
executables:
|
46
|
+
- bel-rdf-jena
|
32
47
|
extensions: []
|
33
48
|
extra_rdoc_files: []
|
34
49
|
files:
|
@@ -38,6 +53,7 @@ files:
|
|
38
53
|
- INSTALL_RUBY.md
|
39
54
|
- LICENSE
|
40
55
|
- README.md
|
56
|
+
- bin/bel-rdf-jena
|
41
57
|
- lib/bel/rdf_repository/plugins/jena.rb
|
42
58
|
homepage: https://github.com/OpenBEL/bel.rb-rdf-jena
|
43
59
|
licenses:
|
@@ -89,10 +105,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
105
|
- !ruby/object:Gem::Version
|
90
106
|
version: 1.3.1
|
91
107
|
requirements: []
|
92
|
-
rubyforge_project:
|
93
|
-
rubygems_version: 2.4.
|
94
|
-
signing_key:
|
108
|
+
rubyforge_project:
|
109
|
+
rubygems_version: 2.4.8
|
110
|
+
signing_key:
|
95
111
|
specification_version: 4
|
96
112
|
summary: Rdf Repository plugin for bel.rb using Apache Jena.
|
97
113
|
test_files: []
|
98
|
-
has_rdoc:
|