glycobook 0.1.0.alpha.13-java → 0.1.0.alpha.14-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/jar.yml +3 -1
- data/lib/glycobook/Loggerinit.rb +19 -9
- data/lib/glycobook/gly_tou_can.rb +0 -2
- data/lib/glycobook/glycan_builder.rb +0 -1
- data/lib/glycobook/glycan_format_converter.rb +0 -1
- data/lib/glycobook/subsumption.rb +0 -1
- data/lib/glycobook/wurcs_frame_work.rb +16 -15
- 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: 9783edf50dd8884c859bd729245b8db2bfd1b460f9d492decb8b53b888aed05d
|
4
|
+
data.tar.gz: 763879fa7da8fd5d0d846eaa327970d426f689fe5426540616889742dc15f6fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2226714ccd56a84dd8c5977140011983ffc9f5d27c934a78de632e72f2ffbd593e41d6117f0b73575aa88a69526e0d27219849917964f0370b3fac8714f0c379
|
7
|
+
data.tar.gz: d8cac73b68d01d07a22a1d90a5188fb987c24253f8d5dec048feee76260892dbd4879714677b8b9fd67d1288e05bde674f0e6ff92b8e9e25ed27010a53e621d8
|
data/jar.yml
CHANGED
@@ -10,8 +10,10 @@ list:
|
|
10
10
|
file: "jar/wurcsframework-1.2.14.jar"
|
11
11
|
- url: "https://gitlab.com/glycoinfo/wurcsframework/-/package_files/70458150/download"
|
12
12
|
file: "jar/wurcsframework-1.0.1.jar"
|
13
|
-
- url: "https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.
|
13
|
+
- url: "https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.9/slf4j-api-2.0.9.jar"
|
14
14
|
file: "jar/slf4j-api.jar"
|
15
|
+
- url: "https://repo1.maven.org/maven2/org/slf4j/slf4j-simple/2.0.9/slf4j-simple-2.0.9.jar"
|
16
|
+
file: "jar/slf4j-simple-2.0.9.jar"
|
15
17
|
- url: "https://gitlab.glyco.info/glycosmos/subsumption/subsumption/-/package_files/567/download"
|
16
18
|
file: "jar/subsumption.jar"
|
17
19
|
- url: "https://gitlab.glyco.info/glycosmos/glytoucangroup/archetype/lib/-/package_files/489/download"
|
data/lib/glycobook/Loggerinit.rb
CHANGED
@@ -1,23 +1,33 @@
|
|
1
1
|
require 'java'
|
2
2
|
require 'logger'
|
3
3
|
require_relative '../jar/slf4j-api.jar'
|
4
|
+
require_relative '../jar/slf4j-simple.jar'
|
5
|
+
|
4
6
|
java_import 'org.slf4j.LoggerFactory'
|
5
7
|
|
8
|
+
module GlycoBook
|
6
9
|
class JRubySLF4JLogger < Logger
|
7
10
|
def initialize(name)
|
8
|
-
super(STDOUT) # STDOUT
|
11
|
+
super(STDOUT) # STDOUT is dummy
|
9
12
|
@java_logger = LoggerFactory.getLogger(name)
|
10
13
|
end
|
14
|
+
def add(severity, message , progname , &block)
|
15
|
+
|
16
|
+
message = block.call if block
|
17
|
+
message = message.to_s
|
11
18
|
|
12
|
-
|
13
|
-
#
|
14
|
-
|
15
|
-
when Logger::INFO
|
19
|
+
case severity
|
20
|
+
when 0 # Logger::DEBUG
|
21
|
+
@java_logger.debug(message)
|
22
|
+
when 1 # Logger::INFO
|
23
|
+
@java_logger.info(message)
|
24
|
+
when 2 # Logger::WARN
|
25
|
+
@java_logger.warn(message)
|
26
|
+
when 3, 4# Logger::ERROR, Logger::FATAL
|
27
|
+
@java_logger.error(message)
|
28
|
+
else
|
16
29
|
@java_logger.info(message)
|
17
|
-
# 他のログレベルについても同様に実装
|
18
30
|
end
|
19
31
|
end
|
20
32
|
end
|
21
|
-
|
22
|
-
logger = JRubySLF4JLogger.new("MyLogger")
|
23
|
-
logger.info("This is an info message from JRuby with SLF4J")
|
33
|
+
end
|
@@ -7,8 +7,6 @@ require_relative '../jar/slf4j-api.jar'
|
|
7
7
|
java_import 'org.glytoucan.Archetype'
|
8
8
|
java_import 'org.glycoinfo.WURCSFramework.wurcs.graph.WURCSGraph'
|
9
9
|
java_import 'org.glycoinfo.WURCSFramework.util.WURCSException'
|
10
|
-
java_import 'org.slf4j.Logger'
|
11
|
-
java_import 'org.slf4j.LoggerFactory'
|
12
10
|
|
13
11
|
module GlycoBook
|
14
12
|
class GlyTouCan
|
@@ -2,7 +2,6 @@ require 'java'
|
|
2
2
|
|
3
3
|
require_relative '../jar/glycanformatconverter.jar'
|
4
4
|
require_relative '../jar/wurcsframework.jar'
|
5
|
-
require_relative '../jar/slf4j-api.jar'
|
6
5
|
require_relative "../jar/MolecularFramework.jar"
|
7
6
|
|
8
7
|
java_import 'org.glycoinfo.GlycanFormatconverter.io.GlycoCT.WURCSToGlycoCT'
|
@@ -2,7 +2,6 @@ require 'java'
|
|
2
2
|
|
3
3
|
require_relative '../jar/subsumption.jar'
|
4
4
|
require_relative '../jar/wurcsframework.jar'
|
5
|
-
require_relative '../jar/slf4j-api.jar'
|
6
5
|
|
7
6
|
java_import 'org.glycoinfo.subsumption.manipulation.GraphManager'
|
8
7
|
java_import 'org.glycoinfo.WURCSFramework.wurcs.graph.WURCSGraph'
|
@@ -1,22 +1,23 @@
|
|
1
|
-
# lib/my_gem.rb
|
2
1
|
require 'java'
|
3
|
-
|
2
|
+
|
4
3
|
module GlycoBook
|
5
|
-
|
4
|
+
|
5
|
+
class WurcsFrameWork
|
6
6
|
require_relative '../jar/wurcsframework.jar'
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
validator
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
java_import 'org.glycoinfo.WURCSFramework.util.validation.WURCSValidator'
|
8
|
+
java_import 'org.slf4j.Logger'
|
9
|
+
|
10
|
+
def validator(w)
|
11
|
+
validator = WURCSValidator.new
|
12
|
+
validator.start(w)
|
13
|
+
reports = {}
|
14
|
+
reports["VALIDATOR"] = ["WURCSFramework-1.2.14"]
|
15
|
+
reports["WARNING"] = validator.getReport().hasWarning()
|
16
|
+
reports["ERROR"] = validator.getReport().hasError()
|
17
|
+
reports["UNVERIFIABLE"] = validator.getReport().hasUnverifiable()
|
18
|
+
return {"message" => reports,
|
18
19
|
"StandardWURCS" => validator.getReport().standard_string(),
|
19
20
|
"RESULTS" => validator.getReport().getResults() }
|
21
|
+
end
|
20
22
|
end
|
21
23
|
end
|
22
|
-
end
|