glycobook 0.1.0.alpha.13-java → 0.1.0.alpha.15-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 +18 -10
- 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: 266139c1c0cdebb3ba554239f8fcd00afda150498fb5b2281737d3f916343f3e
|
4
|
+
data.tar.gz: 98556dec8b69a3d2bbbb1cee31dbc8931da0a8ba900cbb965eb361625f4d9b78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f703da361247b437e32740c80f649147789336568adacfc81a3de119096eb46cb14cb285179c4b90393ae3453d633fb38f50178c597f48e32560f5c607cb0783
|
7
|
+
data.tar.gz: 446ada4b6b9e22d6f603313153ef1f7d38faf22971ab98c74b05ab4f16c1bd7f916858755b8ac5ddd7ed4c962b68a9e09b1a962703835b710025c87f86127e93
|
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,31 @@
|
|
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
|
|
6
8
|
class JRubySLF4JLogger < Logger
|
7
9
|
def initialize(name)
|
8
|
-
super(STDOUT) # STDOUT
|
10
|
+
super(STDOUT) # STDOUT is dummy
|
9
11
|
@java_logger = LoggerFactory.getLogger(name)
|
10
12
|
end
|
13
|
+
def add(severity, message , progname , &block)
|
14
|
+
|
15
|
+
message = block.call if block
|
16
|
+
message = message.to_s
|
11
17
|
|
12
|
-
|
13
|
-
#
|
14
|
-
|
15
|
-
when Logger::INFO
|
18
|
+
case severity
|
19
|
+
when 0 # Logger::DEBUG
|
20
|
+
@java_logger.debug(message)
|
21
|
+
when 1 # Logger::INFO
|
22
|
+
@java_logger.info(message)
|
23
|
+
when 2 # Logger::WARN
|
24
|
+
@java_logger.warn(message)
|
25
|
+
when 3, 4# Logger::ERROR, Logger::FATAL
|
26
|
+
@java_logger.error(message)
|
27
|
+
else
|
16
28
|
@java_logger.info(message)
|
17
|
-
# 他のログレベルについても同様に実装
|
18
29
|
end
|
19
30
|
end
|
20
|
-
end
|
21
|
-
|
22
|
-
logger = JRubySLF4JLogger.new("MyLogger")
|
23
|
-
logger.info("This is an info message from JRuby with SLF4J")
|
31
|
+
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
|