glydevkit 0.2.beta.1-java → 0.2.0.pre.beta.2-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/lib/glydevkit/gly_tou_can.rb +13 -4
- data/lib/glydevkit/glycan_format_converter.rb +122 -55
- data/lib/glydevkit/wurcs_frame_work.rb +34 -4
- data/lib/glydevkit.rb +1 -1
- data/lib/init.rb +36 -27
- data/lib/wurcsverify.rb +53 -21
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d379ce557d17df7d8d4252253ed401ba2fd8efdcccd085d02e57d2761d073939
|
4
|
+
data.tar.gz: 26c01118b88face8d7e17f55e314d449e47f292d29c18bd3e876cd93045c5206
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 341ed6c0cb336433fc427e04dfb807b983c04e4feff356db9f598024f83df577dea5d8bd51033ca1cf2cd73aaf580abef8f6386ae810c810aa7d9c63f327d760
|
7
|
+
data.tar.gz: 04613f824cac68e2fc989f0dff84d271bcd25f09de2b5cefab8aea44b4f8c857176ac95ab2eb53b0eee3378ec6116fb5a2b8bffc8677feca395fbcb968b5fd02
|
@@ -8,9 +8,18 @@ java_import 'org.glycoinfo.WURCSFramework.wurcs.graph.WURCSGraph'
|
|
8
8
|
java_import 'org.glycoinfo.WURCSFramework.util.WURCSException'
|
9
9
|
|
10
10
|
module GlyDevKit
|
11
|
-
class GlyTouCan
|
12
|
-
|
13
|
-
|
11
|
+
class GlyTouCan
|
12
|
+
# Converts a WURCS string to its archetype representation.
|
13
|
+
#
|
14
|
+
# @param w [String] The WURCS string.
|
15
|
+
# @return [Hash] The archetype representation of the WURCS string.
|
16
|
+
#
|
17
|
+
# @example
|
18
|
+
# require glydevkit
|
19
|
+
# glytoucan = GlyDevKit::GlyTouCan.new
|
20
|
+
# archetype = glytoucan.archetype("WURCS=2.0/...")
|
21
|
+
def archetype(w)
|
22
|
+
Hash[Archetype.beBorn(w)]
|
23
|
+
end
|
14
24
|
end
|
15
25
|
end
|
16
|
-
end
|
@@ -8,69 +8,136 @@ java_import 'org.glycoinfo.GlycanFormatconverter.io.GlycoCT.WURCSToGlycoCT'
|
|
8
8
|
java_import 'org.glycoinfo.GlycanFormatconverter.io.IUPAC.IUPACStyleDescriptor'
|
9
9
|
java_import 'org.glycoinfo.GlycanFormatconverter.io.WURCS.WURCSImporter'
|
10
10
|
java_import 'org.glycoinfo.GlycanFormatconverter.util.ExporterEntrance'
|
11
|
-
|
11
|
+
java_import 'org.glycoinfo.GlycanFormatconverter.Glycan.GlyContainer'
|
12
|
+
java_import 'org.glycoinfo.GlycanFormatconverter.Glycan.GlycanException'
|
13
|
+
java_import 'org.glycoinfo.GlycanFormatconverter.io.GlyCoExporterException'
|
14
|
+
java_import 'org.glycoinfo.GlycanFormatconverter.io.GlyCoImporterException'
|
15
|
+
java_import 'org.glycoinfo.GlycanFormatconverter.io.IUPAC.IUPACStyleDescriptor'
|
16
|
+
java_import 'org.glycoinfo.GlycanFormatconverter.io.IUPAC.condensed.IUPACCondensedImporter'
|
17
|
+
java_import 'org.glycoinfo.GlycanFormatconverter.io.IUPAC.extended.IUPACExtendedImporter'
|
18
|
+
|
12
19
|
module GlyDevKit
|
13
|
-
class GlycanFormatConverter
|
20
|
+
class GlycanFormatConverter
|
14
21
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
22
|
+
# Converts a WURCS string to IUPAC format.
|
23
|
+
#
|
24
|
+
# @param wurcs [String] The WURCS string to be converted.
|
25
|
+
# @param style [String] The desired IUPAC style ("condensed", "extended", or "glycam").
|
26
|
+
# @return [Hash] A hash containing the input WURCS string and the resulting IUPAC format.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# converter = GlyDevKit::GlycanFormatConverter.new
|
30
|
+
# result = converter.wurcs2iupac("WURCS=2.0/...", "condensed")
|
31
|
+
def wurcs2iupac(wurcs, style)
|
32
|
+
ret = {}
|
33
|
+
ret["input"] = wurcs
|
23
34
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
iupacextended = ee.toIUPAC(IUPACStyleDescriptor::GREEK)
|
29
|
-
ret["IUPACextended"] = iupacextended
|
30
|
-
else
|
31
|
-
glycam = ee.toIUPAC(IUPACStyleDescriptor::GLYCANWEB)
|
32
|
-
ret["GLYCAM"] = glycam
|
33
|
-
end
|
35
|
+
begin
|
36
|
+
wi = WURCSImporter.new
|
37
|
+
gc = wi.start(wurcs)
|
38
|
+
ee = ExporterEntrance.new(gc)
|
34
39
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
if style == "condensed"
|
41
|
+
iupaccondensed = ee.toIUPAC(IUPACStyleDescriptor::CONDENSED)
|
42
|
+
ret["IUPACcondensed"] = iupaccondensed
|
43
|
+
elsif style == "extended"
|
44
|
+
iupacextended = ee.toIUPAC(IUPACStyleDescriptor::GREEK)
|
45
|
+
ret["IUPACextended"] = iupacextended
|
46
|
+
else
|
47
|
+
glycam = ee.toIUPAC(IUPACStyleDescriptor::GLYCANWEB)
|
48
|
+
ret["GLYCAM"] = glycam
|
49
|
+
end
|
44
50
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
ret["GlycoCT"] = converter.getGlycoCT
|
54
|
-
ret["message"] = ""
|
55
|
-
else
|
56
|
-
ret["GlycoCT"] = ""
|
57
|
-
ret["message"] = message
|
51
|
+
rescue GlyCoExporterException, GlycanException, TrivialNameException, WURCSException => e
|
52
|
+
logger.error("{}", e)
|
53
|
+
ret["message"] = e.to_s
|
54
|
+
rescue Exception => e
|
55
|
+
logger.error("{}", e)
|
56
|
+
ret["message"] = e.to_s
|
57
|
+
end
|
58
|
+
return ret
|
58
59
|
end
|
60
|
+
|
61
|
+
# Converts a WURCS string to GlycoCT format.
|
62
|
+
#
|
63
|
+
# @param wurcs [String] The WURCS string to be converted.
|
64
|
+
# @return [Hash] A hash containing the input WURCS string and the resulting GlycoCT format.
|
65
|
+
#
|
66
|
+
# @example
|
67
|
+
# converter = GlyDevKit::GlycanFormatConverter.new
|
68
|
+
# result = converter.wurcs2glycoct("WURCS=2.0/...")
|
69
|
+
def wurcs2glycoct(wurcs)
|
70
|
+
ret = {}
|
71
|
+
ret["input"] = wurcs
|
72
|
+
begin
|
73
|
+
converter = WURCSToGlycoCT.new
|
74
|
+
converter.start(wurcs)
|
75
|
+
message = converter.getErrorMessages
|
76
|
+
if message.empty?
|
77
|
+
ret["GlycoCT"] = converter.getGlycoCT
|
78
|
+
ret["message"] = ""
|
79
|
+
else
|
80
|
+
ret["GlycoCT"] = ""
|
81
|
+
ret["message"] = message
|
82
|
+
end
|
59
83
|
rescue Exception => e
|
60
|
-
|
61
|
-
|
84
|
+
ret["GlycoCT"] = ""
|
85
|
+
ret["message"] = e.to_s
|
86
|
+
end
|
87
|
+
return ret
|
88
|
+
end
|
89
|
+
|
90
|
+
# Converts a WURCS string to GLYCAM format.
|
91
|
+
#
|
92
|
+
# @param wurcs [String] The WURCS string to be converted.
|
93
|
+
# @return [String] The resulting GLYCAM format string.
|
94
|
+
#
|
95
|
+
# @example
|
96
|
+
# converter = GlyDevKit::GlycanFormatConverter.new
|
97
|
+
# result = converter.wurcs2glycam("WURCS=2.0/...")
|
98
|
+
def wurcs2glycam(wurcs)
|
99
|
+
wi = WURCSImporter.new
|
100
|
+
ee = ExporterEntrance.new(wi.start(wurcs))
|
101
|
+
begin
|
102
|
+
ee.toIUPAC(IUPACStyleDescriptor::GLYCANWEB)
|
103
|
+
rescue => e
|
104
|
+
e.printStackTrace()
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Converts an IUPAC string to WURCS format.
|
109
|
+
#
|
110
|
+
# @param iupac [String] The IUPAC string to be converted.
|
111
|
+
# @param style [String] The style of the IUPAC string ("condensed" or "extended").
|
112
|
+
# @return [Hash] A hash containing the input IUPAC string and the resulting WURCS format.
|
113
|
+
#
|
114
|
+
# @example
|
115
|
+
# converter = GlyDevKit::GlycanFormatConverter.new
|
116
|
+
# result = converter.iupac2wurcs("Man(a1-3)[Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1-", "condensed")
|
117
|
+
def iupac2wurcs(iupac, style)
|
118
|
+
ret = {}
|
119
|
+
ret["input"] = iupac
|
120
|
+
|
121
|
+
begin
|
122
|
+
if style == "condensed"
|
123
|
+
ici = IUPACCondensedImporter.new
|
124
|
+
gc = ici.start(iupac)
|
125
|
+
else
|
126
|
+
iei = IUPACExtendedImporter.new
|
127
|
+
gc = iei.start(iupac)
|
128
|
+
end
|
129
|
+
|
130
|
+
ee = ExporterEntrance.new(gc)
|
131
|
+
wurcs = ee.toWURCS
|
132
|
+
ret["wurcs"] = wurcs
|
133
|
+
|
134
|
+
rescue GlyCoImporterException, GlycanException, WURCSException => e
|
135
|
+
ret["message"] = e.to_s
|
136
|
+
rescue StandardError => e
|
137
|
+
ret["message"] = e.to_s
|
138
|
+
end
|
139
|
+
return ret
|
62
140
|
end
|
63
|
-
return ret
|
64
|
-
end
|
65
141
|
|
66
|
-
def wurcs2glycam(wurcs)
|
67
|
-
wi = WURCSImporter.new
|
68
|
-
ee = ExporterEntrance.new(wi.start(wurcs))
|
69
|
-
begin
|
70
|
-
ee.toIUPAC(IUPACStyleDescriptor::GLYCANWEB)
|
71
|
-
rescue => e
|
72
|
-
e.printStackTrace()
|
73
142
|
end
|
74
143
|
end
|
75
|
-
end
|
76
|
-
end
|
@@ -2,12 +2,22 @@ require 'java'
|
|
2
2
|
|
3
3
|
module GlyDevKit
|
4
4
|
|
5
|
-
class
|
5
|
+
class WURCSFramework
|
6
6
|
|
7
|
-
|
7
|
+
# Import the JAR file
|
8
|
+
require_relative '../jar/wurcsframework.jar'
|
8
9
|
java_import 'org.glycoinfo.WURCSFramework.util.validation.WURCSValidator'
|
9
|
-
|
10
|
-
|
10
|
+
|
11
|
+
# Validates a WURCS data string.
|
12
|
+
#
|
13
|
+
# @param w [String] The WURCS string to be validated.
|
14
|
+
# @param maxbranch [Integer] The maximum allowed branch count for validation.
|
15
|
+
# @return [Hash] A hash containing the validation results, including any warnings, errors, and unverifiable issues.
|
16
|
+
#
|
17
|
+
# @example
|
18
|
+
# wurcs = "WURCS=2.0/3,5,4/[a2122h-1b_1-5_2*NCC/3=O][a1122h-1b_1-5][a1122h-1a_1-5]/1-1-2-3-3/a4-b1_b4-c1_c3-d1_c6-e1"
|
19
|
+
# result = validator(wurcs, 10)
|
20
|
+
def validator(w, maxbranch)
|
11
21
|
validator = WURCSValidator.new
|
12
22
|
validator.setMaxBranchCount(maxbranch)
|
13
23
|
validator.start(w)
|
@@ -25,6 +35,11 @@ module GlyDevKit
|
|
25
35
|
}
|
26
36
|
end
|
27
37
|
|
38
|
+
|
39
|
+
# Converts WURCS data to a graph object.
|
40
|
+
#
|
41
|
+
# @param w [String] WURCS format data
|
42
|
+
# @return [Object, nil] Graph object or nil if an error occurs
|
28
43
|
def to_graph(w)
|
29
44
|
wgn = WURCSGraphNormalizer.new
|
30
45
|
begin
|
@@ -38,6 +53,12 @@ module GlyDevKit
|
|
38
53
|
end
|
39
54
|
end
|
40
55
|
|
56
|
+
# Retrieves the anomeric status of a backbone.
|
57
|
+
# @param a_o_backbone [Backbone] The backbone object to evaluate.
|
58
|
+
# @return [String, nil] A string representing the anomeric status, or nil if it cannot be determined.
|
59
|
+
#
|
60
|
+
# @example
|
61
|
+
# status = get_anomeric_status(backbone)
|
41
62
|
def get_anomeric_status(a_o_backbone)
|
42
63
|
a_o_backbone.get_backbone_carbons.each do |t_o_bc|
|
43
64
|
return "archetype_anomer" if %w[u U].include?(t_o_bc.get_descriptor.get_char.chr)
|
@@ -55,6 +76,11 @@ module GlyDevKit
|
|
55
76
|
end
|
56
77
|
end
|
57
78
|
|
79
|
+
|
80
|
+
# Retrieves the ring type of a backbone.
|
81
|
+
#
|
82
|
+
# @param a_o_backbone [Object] Backbone object
|
83
|
+
# @return [String, nil] Ring type as a string or nil if not applicable
|
58
84
|
def get_ring_type(a_o_backbone)
|
59
85
|
a_o_backbone.get_backbone_carbons.each do |t_o_bc|
|
60
86
|
return "archetype_ringtype" if %w[u U].include?(t_o_bc.get_descriptor.get_char.chr)
|
@@ -79,6 +105,10 @@ module GlyDevKit
|
|
79
105
|
nil
|
80
106
|
end
|
81
107
|
|
108
|
+
# Calculates the mass of a WURCS data string.
|
109
|
+
#
|
110
|
+
# @param w [String] WURCS format data
|
111
|
+
# @return [Float, nil] Mass or nil if an error occurs
|
82
112
|
def getWURCSMass(w)
|
83
113
|
importer = WURCSImporter.new
|
84
114
|
wurcs_array = importer.extractWURCSArray(w)
|
data/lib/glydevkit.rb
CHANGED
data/lib/init.rb
CHANGED
@@ -4,32 +4,11 @@ require 'fileutils'
|
|
4
4
|
require 'yaml'
|
5
5
|
|
6
6
|
module Init
|
7
|
-
def self.load_settings(file_path, flag)
|
8
|
-
downloads = []
|
9
|
-
|
10
|
-
unless Dir.exist?(ENV['HOME'] + "/.glycobook")
|
11
|
-
Dir.mkdir(ENV['HOME'] + "/.glycobook")
|
12
|
-
end
|
13
|
-
|
14
|
-
folder_path = File.dirname(__FILE__) + "/jar"
|
15
|
-
unless Dir.exist?(folder_path)
|
16
|
-
FileUtils.mkdir_p(folder_path)
|
17
|
-
end
|
18
|
-
|
19
|
-
if File.exist?(file_path)
|
20
|
-
downloads = YAML.load_file(file_path)
|
21
|
-
else
|
22
|
-
FileUtils.cp(File.dirname(File.expand_path(__FILE__)) + "/../jar.yml", file_path)
|
23
|
-
end
|
24
|
-
|
25
|
-
if flag
|
26
|
-
FileUtils.cp(File.dirname(File.expand_path(__FILE__)) + "/../jar.yml", file_path)
|
27
|
-
downloads = YAML.load_file(file_path)
|
28
|
-
end
|
29
|
-
|
30
|
-
downloads
|
31
|
-
end
|
32
7
|
|
8
|
+
# Runs the initialization process to resolve Java dependencies.
|
9
|
+
#
|
10
|
+
# Prompts the user for input on whether to resolve dependencies and set recommended versions.
|
11
|
+
# Downloads the necessary libraries based on the settings in the YAML file.
|
33
12
|
def self.run
|
34
13
|
puts <<-EOT
|
35
14
|
Would you like to resolve Java dependencies? (No/yes)
|
@@ -56,7 +35,7 @@ Set recommended Java library version? (No/yes)
|
|
56
35
|
|
57
36
|
downloads = load_settings(ENV['HOME'] + "/.glycobook/jar.yml", flag)
|
58
37
|
|
59
|
-
#
|
38
|
+
# Execute the downloads
|
60
39
|
downloads["libraries"].each do |download|
|
61
40
|
url = URI(download["url"])
|
62
41
|
http = Net::HTTP.new(url.host, url.port)
|
@@ -88,5 +67,35 @@ Set recommended Java library version? (No/yes)
|
|
88
67
|
end
|
89
68
|
end
|
90
69
|
end
|
91
|
-
end
|
92
70
|
|
71
|
+
# Loads the settings from a YAML file and prepares the environment.
|
72
|
+
#
|
73
|
+
# @param file_path [String] The path to the settings file.
|
74
|
+
# @param flag [Boolean] Whether to use the recommended Java library version.
|
75
|
+
# @return [Array<Hash>] The list of downloads specified in the settings file.
|
76
|
+
def self.load_settings(file_path, flag)
|
77
|
+
downloads = []
|
78
|
+
|
79
|
+
unless Dir.exist?(ENV['HOME'] + "/.glycobook")
|
80
|
+
Dir.mkdir(ENV['HOME'] + "/.glycobook")
|
81
|
+
end
|
82
|
+
|
83
|
+
folder_path = File.dirname(__FILE__) + "/jar"
|
84
|
+
unless Dir.exist?(folder_path)
|
85
|
+
FileUtils.mkdir_p(folder_path)
|
86
|
+
end
|
87
|
+
|
88
|
+
if File.exist?(file_path)
|
89
|
+
downloads = YAML.load_file(file_path)
|
90
|
+
else
|
91
|
+
FileUtils.cp(File.dirname(File.expand_path(__FILE__)) + "/../jar.yml", file_path)
|
92
|
+
end
|
93
|
+
|
94
|
+
if flag
|
95
|
+
FileUtils.cp(File.dirname(File.expand_path(__FILE__)) + "/../jar.yml", file_path)
|
96
|
+
downloads = YAML.load_file(file_path)
|
97
|
+
end
|
98
|
+
|
99
|
+
downloads
|
100
|
+
end
|
101
|
+
end
|
data/lib/wurcsverify.rb
CHANGED
@@ -17,6 +17,10 @@ class WurcsVerify
|
|
17
17
|
@@v130 = "1.3.0"
|
18
18
|
@@v131 = "1.3.1"
|
19
19
|
|
20
|
+
# Initializes the WurcsVerify class.
|
21
|
+
#
|
22
|
+
# Sets up custom class loaders for different versions of the WURCS Framework.
|
23
|
+
# Loads the WURCSValidator classes for each version.
|
20
24
|
def initialize
|
21
25
|
@wfw_glytoucan_loader = self.create_custom_classloader("jar/wurcsframework-" + @@gtc_version + ".jar")
|
22
26
|
@wfw_v131_loader = self.create_custom_classloader("jar/wurcsframework-" + @@v131 + ".jar")
|
@@ -30,13 +34,22 @@ class WurcsVerify
|
|
30
34
|
@validator_v1215 = java.lang.Class.forName("org.glycoinfo.WURCSFramework.util.validation.WURCSValidator", true, @wfw_v1215_loader)
|
31
35
|
end
|
32
36
|
|
37
|
+
# Creates a custom class loader for a given JAR file.
|
38
|
+
#
|
39
|
+
# @param jar_path [String] The path to the JAR file.
|
40
|
+
# @return [URLClassLoader] The custom class loader.
|
33
41
|
def create_custom_classloader(jar_path)
|
34
42
|
absolute_path = File.dirname(File.expand_path(__FILE__)) + "/" + jar_path
|
35
43
|
url = URL.new("file:#{absolute_path}")
|
36
44
|
URLClassLoader.newInstance([url].to_java(URL), java.lang.Thread.currentThread.getContextClassLoader)
|
37
45
|
end
|
38
46
|
|
39
|
-
|
47
|
+
# Verifies the WURCS string using different versions of the WURCS Framework.
|
48
|
+
#
|
49
|
+
# @param w [String] The WURCS string to verify.
|
50
|
+
# @param style [String] The verification style ("v3" or "wfw").
|
51
|
+
# @return [Hash] The verification results.
|
52
|
+
def validatorVerify(w, style)
|
40
53
|
v_glytoucan = @validator_glytoucan.new_instance
|
41
54
|
v_glytoucan.start(w)
|
42
55
|
|
@@ -53,18 +66,20 @@ class WurcsVerify
|
|
53
66
|
v_1215.start(w)
|
54
67
|
|
55
68
|
if (style == "v3")
|
56
|
-
ret = {
|
57
|
-
@@
|
58
|
-
@@
|
69
|
+
ret = {
|
70
|
+
@@gtc_version => self.dovalidatorv3(v_glytoucan, @@gtc_version),
|
71
|
+
@@v131 => self.dovalidatorv3(v_131, @@v131),
|
72
|
+
@@v130 => self.dovalidatorv3(v_130, @@v130),
|
59
73
|
@@v1215 => self.dovalidatorv3(v_1215, @@v1215),
|
60
74
|
@@v1216 => self.dovalidatorv3(v_1216, @@v1216)
|
61
75
|
}
|
62
76
|
elsif (style == "wfw")
|
63
|
-
ret = {
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
77
|
+
ret = {
|
78
|
+
@@gtc_version => self.dovalidator(v_glytoucan, @@gtc_version),
|
79
|
+
@@v131 => self.dovalidator(v_131, @@v131),
|
80
|
+
@@v130 => self.dovalidator(v_130, @@v130),
|
81
|
+
@@v1215 => self.dovalidator(v_1215, @@v1215),
|
82
|
+
@@v1216 => self.dovalidator(v_1216, @@v1216)
|
68
83
|
}
|
69
84
|
else
|
70
85
|
pp "strange second paramerters"
|
@@ -72,23 +87,40 @@ class WurcsVerify
|
|
72
87
|
return ret
|
73
88
|
end
|
74
89
|
|
75
|
-
|
90
|
+
# Performs validation and returns detailed reports for v3 style.
|
91
|
+
#
|
92
|
+
# @param validator [Object] The validator instance.
|
93
|
+
# @param version [String] The version of the WURCS Framework.
|
94
|
+
# @return [Hash] The validation report.
|
95
|
+
def dovalidatorv3(validator, version)
|
76
96
|
if validator.getReport().respond_to?(:isStandardized)
|
77
97
|
flag = validator.getReport().isStandardized()
|
78
98
|
else
|
79
99
|
flag = "undef"
|
80
100
|
end
|
81
|
-
reports = {
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
101
|
+
reports = {
|
102
|
+
"VALIDATOR" => ["WURCSFramework-" + version],
|
103
|
+
"WARNING" => validator.getReport().hasWarning(),
|
104
|
+
"FLAG" => flag,
|
105
|
+
"ERROR" => validator.getReport().hasError(),
|
106
|
+
"UNVERIFIABLE" => validator.getReport().hasUnverifiable()
|
107
|
+
}
|
108
|
+
return {
|
109
|
+
"message" => reports,
|
110
|
+
"StandardWURCS" => validator.getReport().standard_string(),
|
111
|
+
"RESULTS" => validator.getReport().getResults()
|
112
|
+
}
|
89
113
|
end
|
90
|
-
|
91
|
-
|
92
|
-
|
114
|
+
|
115
|
+
# Performs validation and returns basic reports.
|
116
|
+
#
|
117
|
+
# @param validator [Object] The validator instance.
|
118
|
+
# @param version [String] The version of the WURCS Framework.
|
119
|
+
# @return [Hash] The validation report.
|
120
|
+
def dovalidator(validator, version)
|
121
|
+
return {
|
122
|
+
"VALIDATOR" => ["WURCSFramework-" + version],
|
123
|
+
"Report" => validator.getReport().getResults()
|
124
|
+
}
|
93
125
|
end
|
94
126
|
end
|
metadata
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glydevkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.beta.
|
4
|
+
version: 0.2.0.pre.beta.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Akihiro Fujita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: java
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - "~>"
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: 0.0.2
|
19
|
-
name: java
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -48,7 +48,7 @@ licenses:
|
|
48
48
|
metadata:
|
49
49
|
source_code_uri: https://github.com/akihirof0005/glydevkit
|
50
50
|
homepage_uri: https://github.com/akihirof0005/glydevkit/blob/main/README.md
|
51
|
-
changelog_uri: https://github.com/akihirof0005/
|
51
|
+
changelog_uri: https://github.com/akihirof0005/glydevkit
|
52
52
|
post_install_message:
|
53
53
|
rdoc_options: []
|
54
54
|
require_paths:
|
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
|
-
rubygems_version: 3.5.
|
67
|
+
rubygems_version: 3.5.18
|
68
68
|
signing_key:
|
69
69
|
specification_version: 4
|
70
70
|
summary: The Glycoscience Development Kit (GlyDevKit) is a JRuby library for glycaninformatics
|