Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
Requirement Formalization Tool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thodoris Nestoridis
Requirement Formalization Tool
Commits
be8d3c1a
Commit
be8d3c1a
authored
Mar 24, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in find instances from ontology-graphical extra data
parent
33b637a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
main-details.component.html
...c/app/components/main-details/main-details.component.html
+1
-1
main-details.component.scss
...c/app/components/main-details/main-details.component.scss
+3
-0
main_req.py
reqtool/reqman/api/reqman/apps/reqtool/models/main_req.py
+2
-1
parse_ontologies.py
...reqman/apps/reqtool/rest_api/services/parse_ontologies.py
+6
-4
No files found.
reqtool/ReqmanAngular11/src/app/components/main-details/main-details.component.html
View file @
be8d3c1a
...
...
@@ -9,7 +9,7 @@
matInput
[
formControl
]="
subjectsControl
"
[
matAutocomplete
]="
automainsub
"
>
style=
"width: 100%;"
>
<mat-autocomplete
autoActiveFirstOption
#
automainsub=
"matAutocomplete"
>
<mat-option
*
ngFor=
"let option of subjectsfilteredOptions | async"
[
value
]="
option
"
>
{{option}}
...
...
reqtool/ReqmanAngular11/src/app/components/main-details/main-details.component.scss
View file @
be8d3c1a
example-full-width
{
width
:
100%
;
}
\ No newline at end of file
reqtool/reqman/api/reqman/apps/reqtool/models/main_req.py
View file @
be8d3c1a
...
...
@@ -32,6 +32,7 @@ MAIN_CHOICES = ( ("",""), ("M1", "M1"),
#to be updated with domains from DSO
SYSTEM_CHOICES
=
get_instances
(
"SAO#System"
)
#+get_i_instances("SAO#System")
print
(
get_instances
(
"SAO#System"
))
FUNCTION_CHOICES
=
get_instances
(
"SAO#Function"
)
SHALL_CHOICES
=
(
(
"shall"
,
"shall"
),
(
"shall not"
,
"shall not"
))
QUANTIFIER_CHOICES
=
(
(
"none"
,
"NONE"
),
(
"all"
,
"ALL"
),
(
"only"
,
"ONLY"
),
...
...
@@ -41,7 +42,7 @@ QUANTIFIER_CHOICES = ( ("none","NONE"), ("all", "ALL"), ("only", "ONLY"),
NUMBER_UNITS_CHOICES
=
((
""
,
""
),
(
"meters"
,
"METERS"
),
(
"kilometers"
,
"KILOMETERS"
),
(
"volt"
,
"VOLT"
))
ITEM_CHOICES
=
get_instances
(
"SAO#Item"
)
#NO ITEM returned
STATE_VALUE_CHOICES
=
get_i
_i
nstances
(
"SAO#StateValue"
)
STATE_VALUE_CHOICES
=
get_instances
(
"SAO#StateValue"
)
#print(STATE_VALUE_CHOICES)
STATE_CHOICES
=
get_instances
(
"SAO#State"
)
#nothing return get_instances
...
...
reqtool/reqman/api/reqman/apps/reqtool/rest_api/services/parse_ontologies.py
View file @
be8d3c1a
...
...
@@ -48,7 +48,8 @@ def get_i_instances(keyword):
'''Get Instaces - return tuple'''
def
get_instances
(
keyword
):
in_list
=
[]
keywordspl
=
keyword
.
split
(
"#"
)
in_list
=
[
keywordspl
[
len
(
keywordspl
)
-
1
]]
out_list
=
[]
with
open
(
'../../Ontologies/instances.txt'
)
as
f
:
for
data
in
f
:
...
...
@@ -60,9 +61,10 @@ def get_instances(keyword):
for
uri
in
list_of_DSO
:
p
=
URIRef
(
uri
+
extra
)
for
s
,
p
,
o
in
g
.
triples
((
None
,
RDF
.
type
,
p
)):
split
=
s
.
split
(
"#"
)
out_list
.
append
(
split
[
len
(
split
)
-
1
])
return
tuple
((
str
(
n
),
str
(
n
))
for
n
in
(
out_list
))
spl
=
s
.
split
(
"#"
)
uri
=
spl
[
len
(
spl
)
-
2
]
.
split
(
"/"
)
out_list
.
append
(
spl
[
len
(
spl
)
-
1
])
return
tuple
((
str
(
keywordspl
[
len
(
keywordspl
)
-
1
]
+
" : "
+
n
),
str
(
keywordspl
[
len
(
keywordspl
)
-
1
]
+
" : "
+
n
)
)
for
n
in
(
out_list
))
'''Get Instaces - return list'''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment