glycobook 0.1.0.alpha.12-java → 0.1.0.alpha.13-java

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
2
  SHA256:
3
- metadata.gz: 7eab8ff3d569ae9e3b8ec9e8abee75dc146f893556508f0dbe73a332edf91cb3
4
- data.tar.gz: 107dbcb98ac4fa90c819743960c2218b458e5919cf0a8a112567f5d88642ecef
3
+ metadata.gz: b6597991ee22be9f80490074af766e649928da064481acc7cec61696beda9212
4
+ data.tar.gz: 84ff7fb0d1e34c14b2ba60e42870e96aa01080a9bd4aa96e9ac18610c93eadb2
5
5
  SHA512:
6
- metadata.gz: 6b74b896e0f673f7563cf3266bed4a083bb1d3d52076f8a4cc0df0b27c385d5f6cefe1dec6ff5255bc0c0d58514b19b49cec43f9986f3c3bf415340269ade19f
7
- data.tar.gz: e1b1fe8e756bda718aee3c965c51de801ba34f0a6b39cef5a1c246b026f839cfa403da344286c37bae32ca49e52969d2fede69ba3d8117fad34c10de275a2294
6
+ metadata.gz: 3d97a3ebcd70fac044adc0d16989da2f9ee8042f4d65b4f18977cd91df7e4216a724a6a9de34211ac22837b796ae69b6952589624060a392faae21b72d471316
7
+ data.tar.gz: 66c04e3a9fd53e7d5c5ae219664c0100b2fe18e7d3b31f5deb243d8abcca109c111dabbabfa58964af819c633b2a4caa0bf0d7355b100aca8d655c7881aaf587
@@ -0,0 +1,23 @@
1
+ require 'java'
2
+ require 'logger'
3
+ require_relative '../jar/slf4j-api.jar'
4
+ java_import 'org.slf4j.LoggerFactory'
5
+
6
+ class JRubySLF4JLogger < Logger
7
+ def initialize(name)
8
+ super(STDOUT) # STDOUTはダミー、実際のログはSLF4Jを通じて行われる
9
+ @java_logger = LoggerFactory.getLogger(name)
10
+ end
11
+
12
+ def add(severity, message = nil, progname = nil)
13
+ # Rubyのログレベルに応じてJavaのSLF4Jメソッドを呼び出す
14
+ case severity
15
+ when Logger::INFO
16
+ @java_logger.info(message)
17
+ # 他のログレベルについても同様に実装
18
+ end
19
+ end
20
+ end
21
+
22
+ logger = JRubySLF4JLogger.new("MyLogger")
23
+ logger.info("This is an info message from JRuby with SLF4J")
@@ -57,7 +57,7 @@ class Subsumption
57
57
  end
58
58
  end
59
59
 
60
- java_import 'org.glycoinfo.subsumption.generator.BaseComposition'
60
+ java_import 'org.glycoinfo.subsumption.generator.BaseCompositionWithoutLinkage'
61
61
  def baseComposition(w)
62
62
  g = nil
63
63
  begin
data/lib/glycobook.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  module GlycoBook
2
2
 
3
3
  end
4
+ require 'glycobook/Loggerinit'
4
5
  require 'glycobook/glycan_builder'
5
6
  require 'glycobook/glycan_format_converter'
6
7
  require 'glycobook/gly_tou_can'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glycobook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.alpha.12
4
+ version: 0.1.0.alpha.13
5
5
  platform: java
6
6
  authors:
7
7
  - Akihiro Fujita
@@ -34,6 +34,7 @@ files:
34
34
  - jar.yml
35
35
  - lib/bookinit.rb
36
36
  - lib/glycobook.rb
37
+ - lib/glycobook/Loggerinit.rb
37
38
  - lib/glycobook/gly_tou_can.rb
38
39
  - lib/glycobook/glycan_builder.rb
39
40
  - lib/glycobook/glycan_format_converter.rb