expressir 0.2.21-x64-mingw32 → 1.0.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +7 -6
- data/.github/workflows/release.yml +22 -6
- data/.gitignore +2 -2
- data/demo.rb +5 -5
- data/exe/format +10 -73
- data/exe/format-test +81 -0
- data/expressir.gemspec +0 -1
- data/lib/expressir.rb +0 -1
- data/lib/expressir/cli.rb +0 -6
- data/lib/expressir/express/2.4/express_parser.so +0 -0
- data/lib/expressir/express/2.5/express_parser.so +0 -0
- data/lib/expressir/express/2.6/express_parser.so +0 -0
- data/lib/expressir/express/2.7/express_parser.so +0 -0
- data/lib/expressir/express/3.0/express_parser.so +0 -0
- data/lib/expressir/{express_exp → express}/cache.rb +3 -6
- data/lib/expressir/{express_exp → express}/formatter.rb +84 -68
- data/lib/expressir/express/hyperlink_formatter.rb +22 -0
- data/lib/expressir/express/model_visitor.rb +23 -0
- data/lib/expressir/{express_exp → express}/parser.rb +16 -5
- data/lib/expressir/express/resolve_references_model_visitor.rb +29 -0
- data/lib/expressir/{express_exp → express}/schema_head_formatter.rb +1 -1
- data/lib/expressir/{express_exp → express}/visitor.rb +67 -44
- data/lib/expressir/model.rb +5 -3
- data/lib/expressir/model/attribute.rb +13 -6
- data/lib/expressir/model/cache.rb +2 -2
- data/lib/expressir/model/constant.rb +10 -3
- data/lib/expressir/model/entity.rb +18 -16
- data/lib/expressir/model/enumeration_item.rb +8 -1
- data/lib/expressir/model/expressions/aggregate_initializer.rb +2 -2
- data/lib/expressir/model/expressions/aggregate_item.rb +2 -2
- data/lib/expressir/model/expressions/attribute_reference.rb +2 -2
- data/lib/expressir/model/expressions/binary_expression.rb +3 -3
- data/lib/expressir/model/expressions/call.rb +3 -3
- data/lib/expressir/model/expressions/entity_constructor.rb +3 -3
- data/lib/expressir/model/expressions/group_reference.rb +2 -2
- data/lib/expressir/model/expressions/index_reference.rb +3 -3
- data/lib/expressir/model/expressions/interval.rb +5 -5
- data/lib/expressir/model/expressions/query_expression.rb +6 -4
- data/lib/expressir/model/expressions/simple_reference.rb +5 -1
- data/lib/expressir/model/expressions/unary_expression.rb +2 -2
- data/lib/expressir/model/function.rb +23 -21
- data/lib/expressir/model/identifier.rb +6 -3
- data/lib/expressir/model/interface.rb +4 -4
- data/lib/expressir/model/interface_item.rb +2 -2
- data/lib/expressir/model/interfaced_item.rb +10 -9
- data/lib/expressir/model/literals/binary.rb +1 -1
- data/lib/expressir/model/literals/integer.rb +1 -1
- data/lib/expressir/model/literals/logical.rb +1 -1
- data/lib/expressir/model/literals/real.rb +1 -1
- data/lib/expressir/model/literals/string.rb +2 -2
- data/lib/expressir/model/model_element.rb +39 -27
- data/lib/expressir/model/parameter.rb +10 -3
- data/lib/expressir/model/procedure.rb +22 -20
- data/lib/expressir/model/remark_item.rb +15 -0
- data/lib/expressir/model/repository.rb +2 -2
- data/lib/expressir/model/rule.rb +27 -25
- data/lib/expressir/model/schema.rb +24 -20
- data/lib/expressir/model/schema_version.rb +15 -0
- data/lib/expressir/model/schema_version_item.rb +15 -0
- data/lib/expressir/model/statements/alias.rb +7 -5
- data/lib/expressir/model/statements/assignment.rb +2 -2
- data/lib/expressir/model/statements/call.rb +3 -3
- data/lib/expressir/model/statements/case.rb +4 -4
- data/lib/expressir/model/statements/case_action.rb +3 -3
- data/lib/expressir/model/statements/compound.rb +2 -2
- data/lib/expressir/model/statements/if.rb +5 -5
- data/lib/expressir/model/statements/repeat.rb +11 -9
- data/lib/expressir/model/statements/return.rb +1 -1
- data/lib/expressir/model/subtype_constraint.rb +13 -6
- data/lib/expressir/model/type.rb +12 -10
- data/lib/expressir/model/types/aggregate.rb +9 -2
- data/lib/expressir/model/types/array.rb +5 -5
- data/lib/expressir/model/types/bag.rb +3 -3
- data/lib/expressir/model/types/binary.rb +2 -2
- data/lib/expressir/model/types/enumeration.rb +5 -7
- data/lib/expressir/model/types/generic.rb +8 -1
- data/lib/expressir/model/types/generic_entity.rb +8 -1
- data/lib/expressir/model/types/list.rb +4 -4
- data/lib/expressir/model/types/real.rb +1 -1
- data/lib/expressir/model/types/select.rb +6 -8
- data/lib/expressir/model/types/set.rb +3 -3
- data/lib/expressir/model/types/string.rb +2 -2
- data/lib/expressir/model/unique_rule.rb +26 -0
- data/lib/expressir/model/variable.rb +10 -3
- data/lib/expressir/model/where_rule.rb +26 -0
- data/lib/expressir/version.rb +1 -1
- data/rakelib/cross-ruby.rake +1 -1
- data/spec/expressir/{express_exp → express}/cache_spec.rb +9 -9
- data/spec/expressir/express/formatter_spec.rb +127 -0
- data/spec/expressir/{express_exp → express}/parser_spec.rb +24 -24
- data/spec/expressir/model/model_element_spec.rb +112 -60
- data/{original/examples → spec}/syntax/multiple.exp +1 -1
- data/{original/examples → spec}/syntax/multiple.yaml +19 -5
- data/{original/examples → spec}/syntax/multiple_formatted.exp +1 -1
- data/{original/examples → spec}/syntax/multiple_hyperlink_formatted.exp +4 -4
- data/{original/examples → spec}/syntax/multiple_schema_head_hyperlink_formatted.exp +1 -1
- data/{original/examples → spec}/syntax/remark.exp +12 -10
- data/{original/examples → spec}/syntax/remark.yaml +36 -16
- data/{original/examples → spec}/syntax/remark_formatted.exp +3 -1
- data/spec/syntax/single.exp +4 -0
- data/spec/syntax/single.yaml +18 -0
- data/spec/syntax/single_formatted.exp +10 -0
- data/spec/syntax/single_formatted.yaml +36 -0
- data/{original/examples → spec}/syntax/syntax.exp +11 -11
- data/{original/examples → spec}/syntax/syntax.yaml +205 -108
- data/{original/examples → spec}/syntax/syntax_formatted.exp +11 -11
- data/spec/syntax/syntax_hyperlink_formatted.exp +902 -0
- data/{original/examples → spec}/syntax/syntax_schema_head_formatted.exp +1 -1
- metadata +41 -83
- data/lib/expressir/express.rb +0 -11
- data/lib/expressir/express/aggregate_dimension.rb +0 -38
- data/lib/expressir/express/attribute.rb +0 -15
- data/lib/expressir/express/comment.rb +0 -7
- data/lib/expressir/express/defined_type.rb +0 -36
- data/lib/expressir/express/derived.rb +0 -65
- data/lib/expressir/express/derived_aggregate.rb +0 -43
- data/lib/expressir/express/entity.rb +0 -137
- data/lib/expressir/express/explicit.rb +0 -70
- data/lib/expressir/express/explicit_aggregate.rb +0 -46
- data/lib/expressir/express/explicit_or_derived.rb +0 -16
- data/lib/expressir/express/global_rule.rb +0 -44
- data/lib/expressir/express/interface_specification.rb +0 -51
- data/lib/expressir/express/interfaced_item.rb +0 -38
- data/lib/expressir/express/inverse.rb +0 -46
- data/lib/expressir/express/inverse_aggregate.rb +0 -37
- data/lib/expressir/express/model_element.rb +0 -7
- data/lib/expressir/express/named_type.rb +0 -19
- data/lib/expressir/express/remark.rb +0 -8
- data/lib/expressir/express/repository.rb +0 -306
- data/lib/expressir/express/schema_definition.rb +0 -96
- data/lib/expressir/express/subtype_constraint.rb +0 -14
- data/lib/expressir/express/type.rb +0 -26
- data/lib/expressir/express/type_aggregate.rb +0 -42
- data/lib/expressir/express/type_enum.rb +0 -29
- data/lib/expressir/express/type_parser.rb +0 -45
- data/lib/expressir/express/type_select.rb +0 -82
- data/lib/expressir/express/unique_rule.rb +0 -35
- data/lib/expressir/express/where_rule.rb +0 -32
- data/lib/expressir/express_exp/2.4/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.5/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.6/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.7/express_parser.so +0 -0
- data/lib/expressir/express_exp/3.0/express_parser.so +0 -0
- data/lib/expressir/express_exp/hyperlink_formatter.rb +0 -27
- data/lib/expressir/express_parser.rb +0 -30
- data/lib/expressir/model/informal_proposition.rb +0 -18
- data/lib/expressir/model/unique.rb +0 -19
- data/lib/expressir/model/where.rb +0 -19
- data/lib/expressir/parser.rb +0 -6
- data/lib/expressir/parser/owl_parser.rb +0 -8
- data/original/examples/syntax/single.exp +0 -3
- data/original/examples/syntax/single.yaml +0 -9
- data/original/examples/syntax/single_formatted.exp +0 -6
- data/original/examples/syntax/single_formatted.yaml +0 -19
- data/spec/acceptance/express_to_owl_spec.rb +0 -18
- data/spec/expressir/express/repository_spec.rb +0 -25
- data/spec/expressir/express_exp/formatter_spec.rb +0 -111
@@ -5,8 +5,6 @@ module Expressir
|
|
5
5
|
class ModelElement
|
6
6
|
CLASS_KEY = '_class'
|
7
7
|
FILE_KEY = 'file'
|
8
|
-
PARENT_KEY = 'parent'
|
9
|
-
CHILDREN_BY_ID_KEY = 'children_by_id'
|
10
8
|
SOURCE_KEY = 'source'
|
11
9
|
|
12
10
|
attr_accessor :parent
|
@@ -15,18 +13,14 @@ module Expressir
|
|
15
13
|
attach_parent_to_children
|
16
14
|
end
|
17
15
|
|
18
|
-
def model_instance_variables
|
19
|
-
skip_variables = [FILE_KEY, PARENT_KEY, CHILDREN_BY_ID_KEY].map{|x| "@#{x}".to_sym}
|
20
|
-
instance_variables.select{|x| !skip_variables.include?(x)}
|
21
|
-
end
|
22
|
-
|
23
16
|
def path
|
24
|
-
|
17
|
+
# this creates an implicit scope
|
18
|
+
return if is_a? Statements::Alias or is_a? Statements::Repeat or is_a? Expressions::QueryExpression
|
25
19
|
|
26
20
|
current_node = self
|
27
21
|
path_parts = []
|
28
22
|
loop do
|
29
|
-
if current_node.class.method_defined? :id
|
23
|
+
if current_node.class.method_defined? :id and !(current_node.is_a? Expressions::SimpleReference)
|
30
24
|
path_parts << current_node.id
|
31
25
|
end
|
32
26
|
|
@@ -34,12 +28,14 @@ module Expressir
|
|
34
28
|
break unless current_node
|
35
29
|
end
|
36
30
|
|
31
|
+
return if path_parts.empty?
|
32
|
+
|
37
33
|
path_parts.reverse.join(".")
|
38
34
|
end
|
39
35
|
|
40
36
|
def attach_parent_to_children
|
41
|
-
|
42
|
-
value =
|
37
|
+
self.class.model_attrs.each do |variable|
|
38
|
+
value = self.send(variable)
|
43
39
|
|
44
40
|
if value.is_a? Array
|
45
41
|
value.each do |value|
|
@@ -78,6 +74,10 @@ module Expressir
|
|
78
74
|
break unless current_scope
|
79
75
|
end
|
80
76
|
|
77
|
+
if target_node.is_a? Model::InterfacedItem
|
78
|
+
target_node = target_node.base_item
|
79
|
+
end
|
80
|
+
|
81
81
|
target_node
|
82
82
|
end
|
83
83
|
|
@@ -96,22 +96,18 @@ module Expressir
|
|
96
96
|
def to_hash(options = {})
|
97
97
|
root_path = options[:root_path]
|
98
98
|
formatter = options[:formatter]
|
99
|
-
include_empty = options[:include_empty]
|
99
|
+
include_empty = options[:include_empty]
|
100
100
|
|
101
101
|
hash = {}
|
102
102
|
hash[CLASS_KEY] = self.class.name
|
103
|
-
if self.is_a? Schema and file
|
104
|
-
hash[FILE_KEY] = root_path ? Pathname.new(file).relative_path_from(root_path).to_s : file
|
105
|
-
end
|
106
103
|
|
107
|
-
|
108
|
-
|
109
|
-
value = instance_variable_get(variable)
|
104
|
+
self.class.model_attrs.each do |variable|
|
105
|
+
value = self.send(variable)
|
110
106
|
empty = value.nil? || (value.is_a?(Array) && value.count == 0)
|
111
107
|
|
112
108
|
# skip empty values
|
113
109
|
if !empty or include_empty
|
114
|
-
hash[
|
110
|
+
hash[variable.to_s] = if value.is_a? Array
|
115
111
|
value.map do |value|
|
116
112
|
if value.is_a? ModelElement
|
117
113
|
value.to_hash(options)
|
@@ -127,6 +123,10 @@ module Expressir
|
|
127
123
|
end
|
128
124
|
end
|
129
125
|
|
126
|
+
if self.is_a? Schema and file
|
127
|
+
hash[FILE_KEY] = root_path ? Pathname.new(file).relative_path_from(root_path).to_s : file
|
128
|
+
end
|
129
|
+
|
130
130
|
if self.class.method_defined? :source and formatter
|
131
131
|
hash[SOURCE_KEY] = formatter.format(self)
|
132
132
|
end
|
@@ -137,16 +137,13 @@ module Expressir
|
|
137
137
|
def self.from_hash(hash, options = {})
|
138
138
|
root_path = options[:root_path]
|
139
139
|
|
140
|
-
node_class = hash[CLASS_KEY]
|
140
|
+
node_class = Object.const_get(hash[CLASS_KEY])
|
141
141
|
node_options = {}
|
142
|
-
if node_class == 'Expressir::Model::Schema' and hash[FILE_KEY]
|
143
|
-
node_options[FILE_KEY.to_sym] = root_path ? File.expand_path("#{root_path}/#{hash[FILE_KEY]}") : hash[FILE_KEY]
|
144
|
-
end
|
145
142
|
|
146
|
-
|
147
|
-
|
143
|
+
node_class.model_attrs.each do |variable|
|
144
|
+
value = hash[variable.to_s]
|
148
145
|
|
149
|
-
node_options[
|
146
|
+
node_options[variable] = if value.is_a? Array
|
150
147
|
value.map do |value|
|
151
148
|
if value.is_a? Hash
|
152
149
|
self.from_hash(value, options)
|
@@ -161,10 +158,25 @@ module Expressir
|
|
161
158
|
end
|
162
159
|
end
|
163
160
|
|
164
|
-
|
161
|
+
if node_class == Schema and hash[FILE_KEY]
|
162
|
+
node_options[FILE_KEY.to_sym] = root_path ? File.expand_path("#{root_path}/#{hash[FILE_KEY]}") : hash[FILE_KEY]
|
163
|
+
end
|
164
|
+
|
165
|
+
node = node_class.new(node_options)
|
165
166
|
|
166
167
|
node
|
167
168
|
end
|
169
|
+
|
170
|
+
def self.model_attrs
|
171
|
+
@model_attrs ||= []
|
172
|
+
end
|
173
|
+
|
174
|
+
def self.model_attr_accessor(*vars)
|
175
|
+
@model_attrs ||= []
|
176
|
+
@model_attrs.concat(vars)
|
177
|
+
|
178
|
+
attr_accessor *vars
|
179
|
+
end
|
168
180
|
end
|
169
181
|
end
|
170
182
|
end
|
@@ -3,12 +3,13 @@ module Expressir
|
|
3
3
|
class Parameter < ModelElement
|
4
4
|
include Identifier
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
model_attr_accessor :var
|
7
|
+
model_attr_accessor :type
|
8
8
|
|
9
9
|
def initialize(options = {})
|
10
10
|
@id = options[:id]
|
11
|
-
@remarks = options
|
11
|
+
@remarks = options[:remarks] || []
|
12
|
+
@remark_items = options[:remark_items] || []
|
12
13
|
@source = options[:source]
|
13
14
|
|
14
15
|
@var = options[:var]
|
@@ -16,6 +17,12 @@ module Expressir
|
|
16
17
|
|
17
18
|
super
|
18
19
|
end
|
20
|
+
|
21
|
+
def children
|
22
|
+
[
|
23
|
+
*remark_items
|
24
|
+
]
|
25
|
+
end
|
19
26
|
end
|
20
27
|
end
|
21
28
|
end
|
@@ -3,30 +3,31 @@ module Expressir
|
|
3
3
|
class Procedure < ModelElement
|
4
4
|
include Identifier
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
model_attr_accessor :parameters
|
7
|
+
model_attr_accessor :types
|
8
|
+
model_attr_accessor :entities
|
9
|
+
model_attr_accessor :subtype_constraints
|
10
|
+
model_attr_accessor :functions
|
11
|
+
model_attr_accessor :procedures
|
12
|
+
model_attr_accessor :constants
|
13
|
+
model_attr_accessor :variables
|
14
|
+
model_attr_accessor :statements
|
15
15
|
|
16
16
|
def initialize(options = {})
|
17
17
|
@id = options[:id]
|
18
|
-
@remarks = options
|
18
|
+
@remarks = options[:remarks] || []
|
19
|
+
@remark_items = options[:remark_items] || []
|
19
20
|
@source = options[:source]
|
20
21
|
|
21
|
-
@parameters = options
|
22
|
-
@types = options
|
23
|
-
@entities = options
|
24
|
-
@subtype_constraints = options
|
25
|
-
@functions = options
|
26
|
-
@procedures = options
|
27
|
-
@constants = options
|
28
|
-
@variables = options
|
29
|
-
@statements = options
|
22
|
+
@parameters = options[:parameters] || []
|
23
|
+
@types = options[:types] || []
|
24
|
+
@entities = options[:entities] || []
|
25
|
+
@subtype_constraints = options[:subtype_constraints] || []
|
26
|
+
@functions = options[:functions] || []
|
27
|
+
@procedures = options[:procedures] || []
|
28
|
+
@constants = options[:constants] || []
|
29
|
+
@variables = options[:variables] || []
|
30
|
+
@statements = options[:statements] || []
|
30
31
|
|
31
32
|
super
|
32
33
|
end
|
@@ -45,7 +46,8 @@ module Expressir
|
|
45
46
|
*functions,
|
46
47
|
*procedures,
|
47
48
|
*constants,
|
48
|
-
*variables
|
49
|
+
*variables,
|
50
|
+
*remark_items
|
49
51
|
]
|
50
52
|
end
|
51
53
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Expressir
|
2
|
+
module Model
|
3
|
+
class RemarkItem < ModelElement
|
4
|
+
model_attr_accessor :id
|
5
|
+
model_attr_accessor :remarks
|
6
|
+
|
7
|
+
def initialize(options = {})
|
8
|
+
@id = options[:id]
|
9
|
+
@remarks = options[:remarks] || []
|
10
|
+
|
11
|
+
super
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/expressir/model/rule.rb
CHANGED
@@ -3,34 +3,35 @@ module Expressir
|
|
3
3
|
class Rule < ModelElement
|
4
4
|
include Identifier
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
model_attr_accessor :applies_to
|
7
|
+
model_attr_accessor :types
|
8
|
+
model_attr_accessor :entities
|
9
|
+
model_attr_accessor :subtype_constraints
|
10
|
+
model_attr_accessor :functions
|
11
|
+
model_attr_accessor :procedures
|
12
|
+
model_attr_accessor :constants
|
13
|
+
model_attr_accessor :variables
|
14
|
+
model_attr_accessor :statements
|
15
|
+
model_attr_accessor :where_rules
|
16
|
+
model_attr_accessor :informal_propositions
|
17
17
|
|
18
18
|
def initialize(options = {})
|
19
19
|
@id = options[:id]
|
20
|
-
@remarks = options
|
20
|
+
@remarks = options[:remarks] || []
|
21
|
+
@remark_items = options[:remark_items] || []
|
21
22
|
@source = options[:source]
|
22
23
|
|
23
|
-
@applies_to = options
|
24
|
-
@types = options
|
25
|
-
@entities = options
|
26
|
-
@subtype_constraints = options
|
27
|
-
@functions = options
|
28
|
-
@procedures = options
|
29
|
-
@constants = options
|
30
|
-
@variables = options
|
31
|
-
@statements = options
|
32
|
-
@
|
33
|
-
@informal_propositions = options
|
24
|
+
@applies_to = options[:applies_to] || []
|
25
|
+
@types = options[:types] || []
|
26
|
+
@entities = options[:entities] || []
|
27
|
+
@subtype_constraints = options[:subtype_constraints] || []
|
28
|
+
@functions = options[:functions] || []
|
29
|
+
@procedures = options[:procedures] || []
|
30
|
+
@constants = options[:constants] || []
|
31
|
+
@variables = options[:variables] || []
|
32
|
+
@statements = options[:statements] || []
|
33
|
+
@where_rules = options[:where_rules] || []
|
34
|
+
@informal_propositions = options[:informal_propositions] || []
|
34
35
|
|
35
36
|
super
|
36
37
|
end
|
@@ -49,8 +50,9 @@ module Expressir
|
|
49
50
|
*procedures,
|
50
51
|
*constants,
|
51
52
|
*variables,
|
52
|
-
*
|
53
|
-
*informal_propositions
|
53
|
+
*where_rules,
|
54
|
+
*informal_propositions,
|
55
|
+
*remark_items
|
54
56
|
]
|
55
57
|
end
|
56
58
|
end
|
@@ -1,36 +1,37 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
class Schema < ModelElement
|
4
|
-
|
4
|
+
model_attr_accessor :file
|
5
5
|
|
6
6
|
include Identifier
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
model_attr_accessor :version
|
9
|
+
model_attr_accessor :interfaces
|
10
|
+
model_attr_accessor :constants
|
11
|
+
model_attr_accessor :types
|
12
|
+
model_attr_accessor :entities
|
13
|
+
model_attr_accessor :subtype_constraints
|
14
|
+
model_attr_accessor :functions
|
15
|
+
model_attr_accessor :rules
|
16
|
+
model_attr_accessor :procedures
|
17
17
|
|
18
18
|
def initialize(options = {})
|
19
19
|
@file = options[:file]
|
20
20
|
|
21
21
|
@id = options[:id]
|
22
|
-
@remarks = options
|
22
|
+
@remarks = options[:remarks] || []
|
23
|
+
@remark_items = options[:remark_items] || []
|
23
24
|
@source = options[:source]
|
24
25
|
|
25
26
|
@version = options[:version]
|
26
|
-
@interfaces = options
|
27
|
-
@constants = options
|
28
|
-
@types = options
|
29
|
-
@entities = options
|
30
|
-
@subtype_constraints = options
|
31
|
-
@functions = options
|
32
|
-
@rules = options
|
33
|
-
@procedures = options
|
27
|
+
@interfaces = options[:interfaces] || []
|
28
|
+
@constants = options[:constants] || []
|
29
|
+
@types = options[:types] || []
|
30
|
+
@entities = options[:entities] || []
|
31
|
+
@subtype_constraints = options[:subtype_constraints] || []
|
32
|
+
@functions = options[:functions] || []
|
33
|
+
@rules = options[:rules] || []
|
34
|
+
@procedures = options[:procedures] || []
|
34
35
|
|
35
36
|
super
|
36
37
|
end
|
@@ -45,6 +46,8 @@ module Expressir
|
|
45
46
|
end
|
46
47
|
|
47
48
|
def interfaced_items
|
49
|
+
return [] unless parent
|
50
|
+
|
48
51
|
interfaces.flat_map do |interface|
|
49
52
|
schema = parent.children_by_id[interface.schema.id.downcase]
|
50
53
|
if schema
|
@@ -81,7 +84,8 @@ module Expressir
|
|
81
84
|
*subtype_constraints,
|
82
85
|
*functions,
|
83
86
|
*rules,
|
84
|
-
*procedures
|
87
|
+
*procedures,
|
88
|
+
*remark_items
|
85
89
|
]
|
86
90
|
end
|
87
91
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Expressir
|
2
|
+
module Model
|
3
|
+
class SchemaVersion < ModelElement
|
4
|
+
model_attr_accessor :value
|
5
|
+
model_attr_accessor :items
|
6
|
+
|
7
|
+
def initialize(options = {})
|
8
|
+
@value = options[:value]
|
9
|
+
@items = options[:items] || []
|
10
|
+
|
11
|
+
super
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|