lutaml-sysml 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +22 -0
- data/Gemfile +1 -4
- data/README.adoc +6 -0
- data/Rakefile +2 -5
- data/lutaml-sysml.gemspec +19 -29
- metadata +18 -132
- data/.gitignore +0 -11
- data/.rspec +0 -3
- data/.travis.yml +0 -6
- data/CODE_OF_CONDUCT.md +0 -74
- data/README.md +0 -40
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/exe/lutaml-sysml +0 -20
- data/lib/lutaml/sysml/allocate.rb +0 -8
- data/lib/lutaml/sysml/allocated.rb +0 -7
- data/lib/lutaml/sysml/binding_connector.rb +0 -7
- data/lib/lutaml/sysml/block.rb +0 -27
- data/lib/lutaml/sysml/constraint_block.rb +0 -12
- data/lib/lutaml/sysml/copy.rb +0 -6
- data/lib/lutaml/sysml/derive_requirement.rb +0 -7
- data/lib/lutaml/sysml/nested_connector_end.rb +0 -11
- data/lib/lutaml/sysml/refine.rb +0 -7
- data/lib/lutaml/sysml/requirement.rb +0 -34
- data/lib/lutaml/sysml/requirement_related.rb +0 -7
- data/lib/lutaml/sysml/satisfy.rb +0 -7
- data/lib/lutaml/sysml/test_case.rb +0 -22
- data/lib/lutaml/sysml/trace.rb +0 -7
- data/lib/lutaml/sysml/verify.rb +0 -6
- data/lib/lutaml/sysml/version.rb +0 -5
- data/lib/lutaml/sysml/xmi_file.rb +0 -417
- data/lib/lutaml/sysml.rb +0 -10
- data/spec/lutaml/sysml_spec.rb +0 -9
- data/spec/spec_helper.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff9d567bfad79fb988fea40f0924443a134186f6c36db1cf538848a360c6f5b7
|
4
|
+
data.tar.gz: 4b7ea544b765f30e0932e8832ce1b98e5877c268b91fba9f41f3d594ba5b97b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b2728b74b2f6f6da64cb44722c66f88d8f3d7c34eac6b9864bf075d08d0d142ce542af6fbb4d021cc0b3c69194fc80cdb6766acde3a133613f220a727394f7f
|
7
|
+
data.tar.gz: 9ed92089150ce2029b843599ffd18304f6b242fb6c7d56cc77fb48f7bc6c6c6d4d8f062da468c3712acac3158954fbde6638d91381ecf662557ce05ef5524e1a
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: release
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
inputs:
|
6
|
+
next_version:
|
7
|
+
description: |
|
8
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
9
|
+
required: true
|
10
|
+
default: 'skip'
|
11
|
+
push:
|
12
|
+
tags: [ v* ]
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
release:
|
16
|
+
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
17
|
+
with:
|
18
|
+
next_version: ${{ github.event.inputs.next_version }}
|
19
|
+
secrets:
|
20
|
+
rubygems-api-key: ${{ secrets.LUTAML_CI_RUBYGEMS_API_KEY }}
|
21
|
+
pat_token: ${{ secrets.LUTAML_CI_PAT_TOKEN }}
|
22
|
+
|
data/Gemfile
CHANGED
data/README.adoc
ADDED
data/Rakefile
CHANGED
data/lutaml-sysml.gemspec
CHANGED
@@ -1,34 +1,24 @@
|
|
1
|
-
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
|
-
Gem::Specification.new do |
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "lutaml-sysml"
|
5
|
+
s.version = "1.0.0"
|
6
|
+
s.authors = ["Ribose Inc."]
|
7
|
+
s.email = ["open.source@ribose.com"]
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
s.homepage = "http://github.com/lutaml/lutaml"
|
10
|
+
s.summary = "Lutaml stub gem for lutaml-sysml"
|
11
|
+
s.description = "Lutaml stub gem for lutaml-sysml"
|
12
|
+
s.license = "BSD-2-Clause"
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- exe/*`.split("\n").map do |f|
|
17
|
+
File.basename(f)
|
18
|
+
end
|
19
|
+
s.bindir = "exe"
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
17
22
|
|
18
|
-
|
19
|
-
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
20
|
-
|
21
|
-
spec.bindir = "exe"
|
22
|
-
spec.require_paths = ["lib"]
|
23
|
-
spec.executables = %w[lutaml-sysml]
|
24
|
-
|
25
|
-
spec.add_runtime_dependency "thor", "~> 1.0"
|
26
|
-
spec.add_runtime_dependency "activesupport", "~> 5.0"
|
27
|
-
# spec.add_runtime_dependency "lutaml-uml"
|
28
|
-
spec.add_development_dependency "nokogiri", "~> 1.10"
|
29
|
-
|
30
|
-
spec.add_development_dependency "bundler", "~> 2.0"
|
31
|
-
spec.add_development_dependency "pry", "~> 0.12.2"
|
32
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
33
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
23
|
+
s.add_dependency "lutaml", "> 0.7.7"
|
34
24
|
end
|
metadata
CHANGED
@@ -1,159 +1,45 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml-sysml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: lutaml
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.7.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
-
|
28
|
-
name: activesupport
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '5.0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '5.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: nokogiri
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.10'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '1.10'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.12.2
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.12.2
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rake
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '10.0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '10.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '3.0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '3.0'
|
111
|
-
description: SysML model module for LutaML.
|
26
|
+
version: 0.7.7
|
27
|
+
description: Lutaml stub gem for lutaml-sysml
|
112
28
|
email:
|
113
|
-
- open.source@ribose.com
|
114
|
-
executables:
|
115
|
-
- lutaml-sysml
|
29
|
+
- open.source@ribose.com
|
30
|
+
executables: []
|
116
31
|
extensions: []
|
117
32
|
extra_rdoc_files: []
|
118
33
|
files:
|
119
|
-
- ".
|
120
|
-
- ".rspec"
|
121
|
-
- ".travis.yml"
|
122
|
-
- CODE_OF_CONDUCT.md
|
34
|
+
- ".github/workflows/release.yml"
|
123
35
|
- Gemfile
|
124
|
-
- README.
|
36
|
+
- README.adoc
|
125
37
|
- Rakefile
|
126
|
-
- bin/console
|
127
|
-
- bin/setup
|
128
|
-
- exe/lutaml-sysml
|
129
|
-
- lib/lutaml/sysml.rb
|
130
|
-
- lib/lutaml/sysml/allocate.rb
|
131
|
-
- lib/lutaml/sysml/allocated.rb
|
132
|
-
- lib/lutaml/sysml/binding_connector.rb
|
133
|
-
- lib/lutaml/sysml/block.rb
|
134
|
-
- lib/lutaml/sysml/constraint_block.rb
|
135
|
-
- lib/lutaml/sysml/copy.rb
|
136
|
-
- lib/lutaml/sysml/derive_requirement.rb
|
137
|
-
- lib/lutaml/sysml/nested_connector_end.rb
|
138
|
-
- lib/lutaml/sysml/refine.rb
|
139
|
-
- lib/lutaml/sysml/requirement.rb
|
140
|
-
- lib/lutaml/sysml/requirement_related.rb
|
141
|
-
- lib/lutaml/sysml/satisfy.rb
|
142
|
-
- lib/lutaml/sysml/test_case.rb
|
143
|
-
- lib/lutaml/sysml/trace.rb
|
144
|
-
- lib/lutaml/sysml/verify.rb
|
145
|
-
- lib/lutaml/sysml/version.rb
|
146
|
-
- lib/lutaml/sysml/xmi_file.rb
|
147
38
|
- lutaml-sysml.gemspec
|
148
|
-
|
149
|
-
- spec/spec_helper.rb
|
150
|
-
homepage: https://github.com/lutaml/lutaml-sysml
|
39
|
+
homepage: http://github.com/lutaml/lutaml
|
151
40
|
licenses:
|
152
|
-
-
|
153
|
-
metadata:
|
154
|
-
homepage_uri: https://github.com/lutaml/lutaml-sysml
|
155
|
-
source_code_uri: https://github.com/lutaml/lutaml-sysml
|
156
|
-
changelog_uri: https://github.com/lutaml/lutaml-sysml/releases
|
41
|
+
- BSD-2-Clause
|
42
|
+
metadata: {}
|
157
43
|
post_install_message:
|
158
44
|
rdoc_options: []
|
159
45
|
require_paths:
|
@@ -162,15 +48,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
48
|
requirements:
|
163
49
|
- - ">="
|
164
50
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
51
|
+
version: 2.7.0
|
166
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
53
|
requirements:
|
168
54
|
- - ">="
|
169
55
|
- !ruby/object:Gem::Version
|
170
56
|
version: '0'
|
171
57
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
58
|
+
rubygems_version: 3.3.27
|
173
59
|
signing_key:
|
174
60
|
specification_version: 4
|
175
|
-
summary:
|
61
|
+
summary: Lutaml stub gem for lutaml-sysml
|
176
62
|
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at ronald.tse@ribose.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: https://contributor-covenant.org
|
74
|
-
[version]: https://contributor-covenant.org/version/1/4/
|
data/README.md
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# Lutaml::Sysml
|
2
|
-
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/lutaml/sysml`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'lutaml-sysml'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle install
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install lutaml-sysml
|
22
|
-
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
|
-
|
27
|
-
## Development
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
-
|
33
|
-
## Contributing
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lutaml-sysml. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/lutaml-sysml/blob/master/CODE_OF_CONDUCT.md).
|
36
|
-
|
37
|
-
|
38
|
-
## Code of Conduct
|
39
|
-
|
40
|
-
Everyone interacting in the Lutaml::Sysml project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lutaml-sysml/blob/master/CODE_OF_CONDUCT.md).
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "lutaml/sysml"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/exe/lutaml-sysml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# encoding: UTF-8
|
3
|
-
|
4
|
-
# resolve bin path, ignoring symlinks
|
5
|
-
require "pathname"
|
6
|
-
bin_file = Pathname.new(__FILE__).realpath
|
7
|
-
|
8
|
-
# add self to libpath
|
9
|
-
$:.unshift File.expand_path("../../lib", bin_file)
|
10
|
-
|
11
|
-
# Fixes https://github.com/rubygems/rubygems/issues/1420
|
12
|
-
require "rubygems/specification"
|
13
|
-
|
14
|
-
class Gem::Specification
|
15
|
-
def this; self; end
|
16
|
-
end
|
17
|
-
|
18
|
-
# start up the CLI
|
19
|
-
require "reeper"
|
20
|
-
Reeper::Cli.start(ARGV)
|
data/lib/lutaml/sysml/block.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
module Lutaml::SysMl
|
2
|
-
|
3
|
-
class Block < Lutaml::Uml::Class
|
4
|
-
attr_accessor :base_class
|
5
|
-
def initialize
|
6
|
-
@xmi_id = nil
|
7
|
-
@nested_classifier = []
|
8
|
-
@stereotype = []
|
9
|
-
@namespace = nil
|
10
|
-
end
|
11
|
-
|
12
|
-
def name
|
13
|
-
if base_class != nil and base_class.name != nil
|
14
|
-
return base_class.name
|
15
|
-
end
|
16
|
-
return nil
|
17
|
-
end
|
18
|
-
|
19
|
-
def full_name
|
20
|
-
if base_class != nil and base_class.name != nil
|
21
|
-
return base_class.full_name
|
22
|
-
end
|
23
|
-
return nil
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
data/lib/lutaml/sysml/copy.rb
DELETED
data/lib/lutaml/sysml/refine.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
module Lutaml::Sysml
|
2
|
-
|
3
|
-
class Requirement < Lutaml::Uml::Class
|
4
|
-
attr_accessor :id, :text, :base_class, :refined_by, :traced_to, :derived_from, :satisfied_by
|
5
|
-
def initialize
|
6
|
-
@xmi_id = nil
|
7
|
-
@id = nil
|
8
|
-
@nested_classifier = []
|
9
|
-
@stereotype = []
|
10
|
-
@namespace = nil
|
11
|
-
end
|
12
|
-
def name
|
13
|
-
if base_class != nil and base_class.name != nil
|
14
|
-
return base_class.name
|
15
|
-
end
|
16
|
-
return nil
|
17
|
-
end
|
18
|
-
def full_name
|
19
|
-
if base_class != nil and base_class.name != nil
|
20
|
-
return base_class.full_name
|
21
|
-
end
|
22
|
-
return nil
|
23
|
-
end
|
24
|
-
## def name
|
25
|
-
## if base_class != nil and base_class.name != nil
|
26
|
-
## base_class.name
|
27
|
-
## else
|
28
|
-
## nil
|
29
|
-
## end
|
30
|
-
## end
|
31
|
-
## def full_name
|
32
|
-
## get_base_class_full_name ( self )
|
33
|
-
## end
|
34
|
-
end
|
data/lib/lutaml/sysml/satisfy.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
module Lutaml::SysMl
|
2
|
-
|
3
|
-
class TestCase < Lutaml::Uml::TopElement
|
4
|
-
attr_accessor :base_behavior, :verifies
|
5
|
-
|
6
|
-
def name
|
7
|
-
if base_behavior != nil and base_behavior.name != nil
|
8
|
-
return base_behavior.name
|
9
|
-
end
|
10
|
-
return nil
|
11
|
-
end
|
12
|
-
|
13
|
-
def full_name
|
14
|
-
if base_behavior != nil and base_behavior.name != nil
|
15
|
-
return base_behavior.full_name
|
16
|
-
end
|
17
|
-
return nil
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
data/lib/lutaml/sysml/trace.rb
DELETED
data/lib/lutaml/sysml/verify.rb
DELETED
data/lib/lutaml/sysml/version.rb
DELETED
@@ -1,417 +0,0 @@
|
|
1
|
-
module Lutaml::SysMl
|
2
|
-
|
3
|
-
class XmiFile
|
4
|
-
|
5
|
-
attr_accessor :package_list, :model_list, :class_list, :activity_list, :property_list, :port_list, :datatype_list, :instance_list,
|
6
|
-
:realization_list, :abstraction_list, :association_list , :connector_list, :connectorend_list, :constraint_list, :block_list , :constraintblock_list,
|
7
|
-
:requirement_list, :testcase_list, :binding_connector_list, :nested_connectorend_list, :derive_requirement_list,
|
8
|
-
:refine_requirement_list, :trace_requirement_list, :copy_requirement_list, :verify_requirement_list, :satisfy_requirement_list ,
|
9
|
-
:allocate_requirement_list, :element_hash
|
10
|
-
|
11
|
-
def initialize
|
12
|
-
@package_list = []
|
13
|
-
@model_list = []
|
14
|
-
@class_list = []
|
15
|
-
@activity_list = []
|
16
|
-
@property_list = []
|
17
|
-
@port_list = []
|
18
|
-
@datatype_list = []
|
19
|
-
@instance_list = []
|
20
|
-
@realization_list = []
|
21
|
-
@abstraction_list = []
|
22
|
-
@association_list = []
|
23
|
-
@connector_list = []
|
24
|
-
@connectorend_list = []
|
25
|
-
@constraint_list = []
|
26
|
-
|
27
|
-
@block_list = []
|
28
|
-
@constraintblock_list = []
|
29
|
-
@requirement_list = []
|
30
|
-
@testcase_list = []
|
31
|
-
@binding_connector_list = []
|
32
|
-
@nested_connectorend_list = []
|
33
|
-
@derive_requirement_list = []
|
34
|
-
@refine_requirement_list = []
|
35
|
-
@trace_requirement_list = []
|
36
|
-
@copy_requirement_list = []
|
37
|
-
@verify_requirement_list = []
|
38
|
-
@satisfy_requirement_list = []
|
39
|
-
@allocate_requirement_list = []
|
40
|
-
|
41
|
-
@element_hash = Hash.new
|
42
|
-
end
|
43
|
-
|
44
|
-
def parse (filename)
|
45
|
-
xmifile = File.new(filename, "r")
|
46
|
-
inxml = Nokogiri::XML(xmifile)
|
47
|
-
|
48
|
-
xmi_elements = inxml.xpath('//xmi:XMI')
|
49
|
-
if xmi_elements.size == 0
|
50
|
-
puts "ERROR : File contains no 'xmi:XMI' XML elements : #{filename}, may not be XMI file."
|
51
|
-
xmifile.close
|
52
|
-
exit
|
53
|
-
end
|
54
|
-
|
55
|
-
#setup xmi namespace
|
56
|
-
xmiNS = inxml.root.namespace_definitions.find{|ns| ns.prefix=="xmi"}
|
57
|
-
|
58
|
-
## Step 1: Find UML and SysML Core Objects in XMI file and create as instance of metamodel
|
59
|
-
|
60
|
-
for xml_node in inxml.xpath('//*' )
|
61
|
-
element_new = nil
|
62
|
-
|
63
|
-
if xml_node.name.to_s == 'packagedElement' and xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Package'
|
64
|
-
element_new = Lutaml::Uml::Package.new
|
65
|
-
package_list.push element_new
|
66
|
-
end
|
67
|
-
|
68
|
-
if xml_node.name.to_s == 'Model'
|
69
|
-
element_new = Lutaml::Uml::Model.new
|
70
|
-
model_list.push element_new
|
71
|
-
element_new.viewpoint = xml_node['viewpoint']
|
72
|
-
element_new.href = xml_node['href']
|
73
|
-
end
|
74
|
-
|
75
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Class'
|
76
|
-
element_new = Lutaml::Uml::Class.new
|
77
|
-
if xml_node['isAbstract'] != nil
|
78
|
-
element_new.is_abstract = xml_node['isAbstract'] == 'true'
|
79
|
-
end
|
80
|
-
class_list.push element_new
|
81
|
-
end
|
82
|
-
|
83
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Activity'
|
84
|
-
element_new = Lutaml::Uml::Activity.new
|
85
|
-
activity_list.push element_new
|
86
|
-
end
|
87
|
-
|
88
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Property'
|
89
|
-
element_new = Lutaml::Uml::Property.new
|
90
|
-
property_list.push element_new
|
91
|
-
end
|
92
|
-
|
93
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s== 'uml:InstanceSpecification'
|
94
|
-
element_new = Lutaml::Uml::Instance.new
|
95
|
-
instance_list.push element_new
|
96
|
-
end
|
97
|
-
|
98
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:DataType'
|
99
|
-
element_new = Lutaml::Uml::DataType.new
|
100
|
-
datatype_list.push element_new
|
101
|
-
end
|
102
|
-
|
103
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Port'
|
104
|
-
element_new = Lutaml::Uml::Port.new
|
105
|
-
port_list.push element_new
|
106
|
-
end
|
107
|
-
|
108
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Connector'
|
109
|
-
element_new = Lutaml::Uml::Connector.new
|
110
|
-
connector_list.push element_new
|
111
|
-
end
|
112
|
-
|
113
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:ConnectorEnd'
|
114
|
-
element_new = Lutaml::Uml::ConnectorEnd.new
|
115
|
-
connectorend_list.push element_new
|
116
|
-
end
|
117
|
-
|
118
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Constraint'
|
119
|
-
element_new = Lutaml::Uml::Constraint.new
|
120
|
-
constraint_list.push element_new
|
121
|
-
end
|
122
|
-
|
123
|
-
if xml_node.name.to_s == 'Block'
|
124
|
-
element_new = SYSML::Block.new
|
125
|
-
block_list.push element_new
|
126
|
-
end
|
127
|
-
|
128
|
-
if xml_node.name.to_s == 'Template'
|
129
|
-
element_new = SYSML::Block.new
|
130
|
-
block_list.push element_new
|
131
|
-
end
|
132
|
-
|
133
|
-
if xml_node.name.to_s == 'ConstraintBlock'
|
134
|
-
element_new = SYSML::ConstraintBlock.new
|
135
|
-
constraintblock_list.push element_new
|
136
|
-
end
|
137
|
-
|
138
|
-
if xml_node.name.to_s.index('Requirement') or xml_node.name.to_s == 'designConstraint'
|
139
|
-
if xml_node.name.to_s != 'RequirementRelated'
|
140
|
-
element_new = SYSML::Requirement.new
|
141
|
-
requirement_list.push element_new
|
142
|
-
element_new.id = xml_node.attribute_with_ns('id',xmiNS.href).to_s.strip
|
143
|
-
element_new.text = xml_node['Text']
|
144
|
-
if xml_node.name != 'Requirement'
|
145
|
-
element_new.stereotype.push xml_node.name
|
146
|
-
end
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
if xml_node.name.to_s == 'TestCase'
|
151
|
-
element_new = SYSML::TestCase.new
|
152
|
-
testcase_list.push element_new
|
153
|
-
end
|
154
|
-
|
155
|
-
if xml_node.name.to_s == 'BindingConnector'
|
156
|
-
element_new = SYSML::BindingConnector.new
|
157
|
-
binding_connector_list.push element_new
|
158
|
-
end
|
159
|
-
|
160
|
-
if xml_node.name.to_s == 'NestedConnectorEnd'
|
161
|
-
element_new = SYSML::NestedConnectorEnd.new
|
162
|
-
nested_connectorend_list.push element_new
|
163
|
-
end
|
164
|
-
|
165
|
-
if xml_node.name.to_s == 'DeriveReqt'
|
166
|
-
element_new = SYSML::DeriveRequirement.new
|
167
|
-
derive_requirement_list.push element_new
|
168
|
-
end
|
169
|
-
if xml_node.name.to_s == 'refine'
|
170
|
-
element_new = SYSML::Refine.new
|
171
|
-
refine_requirement_list.push element_new
|
172
|
-
end
|
173
|
-
if xml_node.name.to_s == 'trace'
|
174
|
-
element_new = SYSML::Trace.new
|
175
|
-
trace_requirement_list.push element_new
|
176
|
-
end
|
177
|
-
if xml_node.name.to_s == 'Copy'
|
178
|
-
element_new = SYSML::Copy.new
|
179
|
-
copy_requirement_list.push element_new
|
180
|
-
end
|
181
|
-
if xml_node.name.to_s == 'Verify'
|
182
|
-
element_new = SYSML::Verify.new
|
183
|
-
verify_requirement_list.push element_new
|
184
|
-
end
|
185
|
-
if xml_node.name.to_s == 'Allocate'
|
186
|
-
element_new = SYSML::Allocate.new
|
187
|
-
allocate_requirement_list.push element_new
|
188
|
-
end
|
189
|
-
|
190
|
-
if xml_node.name.to_s == 'Satisfy'
|
191
|
-
element_new = SYSML::Satisfy.new
|
192
|
-
satisfy_requirement_list.push element_new
|
193
|
-
end
|
194
|
-
|
195
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Abstraction'
|
196
|
-
element_new = Lutaml::Uml::Abstraction.new
|
197
|
-
abstraction_list.push element_new
|
198
|
-
end
|
199
|
-
|
200
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Realization'
|
201
|
-
element_new = Lutaml::Uml::Realization.new
|
202
|
-
realization_list.push element_new
|
203
|
-
end
|
204
|
-
|
205
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Association'
|
206
|
-
element_new = Lutaml::Uml::Association.new
|
207
|
-
association_list.push element_new
|
208
|
-
end
|
209
|
-
|
210
|
-
if element_new != nil
|
211
|
-
new_xmi_id_node = xml_node.attribute_with_ns('id',xmiNS.href)
|
212
|
-
new_xmi_uuid_node = xml_node.attribute_with_ns('uuid',xmiNS.href)
|
213
|
-
new_name_node = xml_node['name']
|
214
|
-
new_href_node = xml_node['href']
|
215
|
-
|
216
|
-
if new_xmi_id_node != nil
|
217
|
-
element_new.xmi_id = new_xmi_id_node.to_s
|
218
|
-
element_hash[element_new.xmi_id] = element_new
|
219
|
-
end
|
220
|
-
|
221
|
-
if new_xmi_uuid_node != nil
|
222
|
-
element_new.xmi_uuid = new_xmi_uuid_node.to_s
|
223
|
-
end
|
224
|
-
|
225
|
-
if new_name_node != nil
|
226
|
-
element_new.name = xml_node['name'].strip
|
227
|
-
end
|
228
|
-
|
229
|
-
if new_href_node != nil
|
230
|
-
element_new.href = new_href_node.to_s
|
231
|
-
if new_xmi_id_node == nil
|
232
|
-
element_hash[element_new.href] = element_new
|
233
|
-
end
|
234
|
-
if xml_node.at('xmi:Extension/referenceExtension') != nil
|
235
|
-
element_new.name = xml_node.at('xmi:Extension/referenceExtension')['referentPath']
|
236
|
-
end
|
237
|
-
end
|
238
|
-
|
239
|
-
if (xml_node.parent != nil and
|
240
|
-
xml_node.parent.attribute_with_ns('id',xmiNS.href) != nil and
|
241
|
-
element_hash[xml_node.parent.attribute_with_ns('id',xmiNS.href).to_s] != nil)
|
242
|
-
|
243
|
-
parent = element_hash[xml_node.parent.attribute_with_ns('id',xmiNS.href).to_s]
|
244
|
-
element_new.namespace = parent
|
245
|
-
if parent.kind_of? Lutaml::Uml::Package
|
246
|
-
parent.contents.push element_new
|
247
|
-
end
|
248
|
-
end
|
249
|
-
end
|
250
|
-
end
|
251
|
-
|
252
|
-
for xml_node in inxml.xpath('//*')
|
253
|
-
|
254
|
-
if (xml_node.attribute_with_ns('id',xmiNS.href) != nil and
|
255
|
-
element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s] != nil)
|
256
|
-
|
257
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
258
|
-
end
|
259
|
-
|
260
|
-
if xml_node.name.to_s == 'nestedClassifier' and xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Class'
|
261
|
-
owning_class_xmi_id = xml_node.parent.attribute_with_ns('id',xmiNS.href).to_s
|
262
|
-
owned_class_xmi_id = xml_node.attribute_with_ns('id',xmiNS.href).to_s
|
263
|
-
owning_class = element_hash[owning_class_xmi_id]
|
264
|
-
owned_class = element_hash[owned_class_xmi_id]
|
265
|
-
owning_class.nested_classifier.push owned_class
|
266
|
-
end
|
267
|
-
|
268
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Realization'
|
269
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
270
|
-
supplier_xmi_id = xml_node.at('supplier')['idref']
|
271
|
-
client_xmi_id = xml_node.at('client')['idref']
|
272
|
-
this_thing.supplier.push element_hash[supplier_xmi_id]
|
273
|
-
this_thing.client.push element_hash[client_xmi_id]
|
274
|
-
end
|
275
|
-
|
276
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Abstraction'
|
277
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
278
|
-
supplier_xmi_id = xml_node.at('supplier')['idref']
|
279
|
-
client_xmi_id = xml_node.at('client')['idref']
|
280
|
-
this_thing.supplier.push element_hash[supplier_xmi_id]
|
281
|
-
this_thing.client.push element_hash[client_xmi_id]
|
282
|
-
end
|
283
|
-
|
284
|
-
if xml_node.name.to_s == 'Block'
|
285
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
286
|
-
base_class_xmi_id = xml_node['base_Class']
|
287
|
-
this_thing.base_class = element_hash[base_class_xmi_id]
|
288
|
-
end
|
289
|
-
|
290
|
-
if xml_node.name.to_s == 'Template'
|
291
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
292
|
-
base_class_xmi_id = xml_node['base_Class']
|
293
|
-
this_thing.base_class = element_hash[base_class_xmi_id]
|
294
|
-
this_thing.base_class.stereotype.push 'Template'
|
295
|
-
end
|
296
|
-
|
297
|
-
if xml_node.name.to_s == 'ConstraintBlock'
|
298
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
299
|
-
base_class_xmi_id = xml_node['base_Class']
|
300
|
-
this_thing.base_class = element_hash[base_class_xmi_id]
|
301
|
-
end
|
302
|
-
|
303
|
-
if xml_node.name.to_s.index('Requirement') or xml_node.name.to_s == 'designConstraint'
|
304
|
-
if xml_node.name.to_s != 'RequirementRelated'
|
305
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
306
|
-
base_class_xmi_id = xml_node['base_Class']
|
307
|
-
this_thing.base_class = element_hash[base_class_xmi_id]
|
308
|
-
this_thing.refined_by = element_hash[xml_node['RefinedBy']]
|
309
|
-
this_thing.derived_from = element_hash[xml_node['DerivedFrom']]
|
310
|
-
this_thing.traced_to = element_hash[xml_node['TracedTo']]
|
311
|
-
end
|
312
|
-
end
|
313
|
-
|
314
|
-
if xml_node.name.to_s == 'TestCase'
|
315
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
316
|
-
this_thing.base_behavior = element_hash[xml_node['base_Behavior']]
|
317
|
-
this_thing.verifies = element_hash[xml_node['Verifies']]
|
318
|
-
end
|
319
|
-
|
320
|
-
if xml_node.name.to_s == 'BindingConnector'
|
321
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
322
|
-
base_connector_xmi_id = xml_node['base_Connector']
|
323
|
-
this_thing.base_connector = element_hash[base_connector_xmi_id]
|
324
|
-
end
|
325
|
-
|
326
|
-
if xml_node.name.to_s == 'NestedConnectorEnd'
|
327
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
328
|
-
base_connectorend_xmi_id = xml_node['base_ConnectorEnd']
|
329
|
-
this_thing.base_connectorend = element_hash[base_connectorend_xmi_id]
|
330
|
-
if xml_node['propertyPath'] != nil
|
331
|
-
this_thing.property_path.push element_hash[xml_node['propertyPath']]
|
332
|
-
else
|
333
|
-
for prop_path in xml_node.xpath('./propertyPath')
|
334
|
-
#to deal with href = '#xmi:id' i.e. local references
|
335
|
-
href_parts = prop_path['href'].split('#')
|
336
|
-
if href_parts[0].size == 0
|
337
|
-
prop = element_hash[href_parts[1]]
|
338
|
-
else
|
339
|
-
prop = element_hash[prop_path['href']]
|
340
|
-
end
|
341
|
-
this_thing.property_path.push prop
|
342
|
-
end
|
343
|
-
end
|
344
|
-
end
|
345
|
-
|
346
|
-
if xml_node.name.to_s == 'Satisfy'
|
347
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
348
|
-
base_realization_xmi_id = xml_node['base_Realization']
|
349
|
-
this_thing.base_realization = element_hash[base_realization_xmi_id]
|
350
|
-
end
|
351
|
-
|
352
|
-
if ['DeriveReqt', 'refine', 'trace', 'Copy', 'Verify', 'Allocate', ''].include? xml_node.name.to_s
|
353
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
354
|
-
base_abstraction_xmi_id = xml_node['base_Abstraction']
|
355
|
-
this_thing.base_abstraction = element_hash[base_abstraction_xmi_id]
|
356
|
-
end
|
357
|
-
|
358
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Association'
|
359
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
360
|
-
member_end_list = xml_node.xpath('./memberEnd')
|
361
|
-
for item in member_end_list
|
362
|
-
this_thing.member_end.push element_hash[item['idref']]
|
363
|
-
end
|
364
|
-
owned_end_list = xml_node.xpath('./ownedEnd')
|
365
|
-
for item in owned_end_list
|
366
|
-
this_thing.owned_end.push element_hash[item.attribute_with_ns('id',xmiNS.href).to_s]
|
367
|
-
end
|
368
|
-
end
|
369
|
-
|
370
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Property' or xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Port'
|
371
|
-
if not ['definingFeature', 'partWithPort', 'propertyPath', 'role'].include? xml_node.name.to_s
|
372
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
373
|
-
if xml_node['association'] != nil
|
374
|
-
this_thing.association = element_hash[xml_node['association']]
|
375
|
-
end
|
376
|
-
if xml_node['aggregation'] != nil
|
377
|
-
this_thing.aggregation = xml_node['aggregation']
|
378
|
-
end
|
379
|
-
if xml_node['visibility'] != nil
|
380
|
-
this_thing.visibility = xml_node['visibility']
|
381
|
-
end
|
382
|
-
|
383
|
-
if xml_node.at('lowerValue') != nil
|
384
|
-
|
385
|
-
if xml_node.at('lowerValue')['value'] != nil
|
386
|
-
this_thing.lowerValue = xml_node.at('lowerValue')['value']
|
387
|
-
else
|
388
|
-
this_thing.lowerValue = '0'
|
389
|
-
end
|
390
|
-
end
|
391
|
-
if xml_node.at('upperValue') != nil
|
392
|
-
this_thing.upperValue = xml_node.at('upperValue')['value']
|
393
|
-
end
|
394
|
-
end
|
395
|
-
end
|
396
|
-
|
397
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:Connector'
|
398
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
399
|
-
connector_end_list = xml_node.xpath('./end')
|
400
|
-
for end_xml_node in connector_end_list
|
401
|
-
this_thing.connector_end.push element_hash[end_xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
402
|
-
end
|
403
|
-
end
|
404
|
-
|
405
|
-
if xml_node.attribute_with_ns('type',xmiNS.href).to_s == 'uml:ConnectorEnd'
|
406
|
-
this_thing = element_hash[xml_node.attribute_with_ns('id',xmiNS.href).to_s]
|
407
|
-
this_thing.connector = element_hash[xml_node.parent.attribute_with_ns('id',xmiNS.href).to_s]
|
408
|
-
this_thing.role = element_hash[xml_node['role']]
|
409
|
-
if this_thing.role == nil
|
410
|
-
this_thing.role = element_hash[xml_node.at('role')['href']]
|
411
|
-
end
|
412
|
-
this_thing.part_with_port = element_hash[xml_node['part_with_port']]
|
413
|
-
end
|
414
|
-
end
|
415
|
-
end
|
416
|
-
end
|
417
|
-
end
|
data/lib/lutaml/sysml.rb
DELETED
data/spec/lutaml/sysml_spec.rb
DELETED
data/spec/spec_helper.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require "bundler/setup"
|
2
|
-
require "lutaml/sysml"
|
3
|
-
|
4
|
-
RSpec.configure do |config|
|
5
|
-
# Enable flags like --only-failures and --next-failure
|
6
|
-
config.example_status_persistence_file_path = ".rspec_status"
|
7
|
-
|
8
|
-
# Disable RSpec exposing methods globally on `Module` and `main`
|
9
|
-
config.disable_monkey_patching!
|
10
|
-
|
11
|
-
config.expect_with :rspec do |c|
|
12
|
-
c.syntax = :expect
|
13
|
-
end
|
14
|
-
end
|