Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
OWL2YAMS
Commits
adde8e53979b
Commit
adde8e53
authored
Oct 29, 2021
by
Fabien Amarger
Browse files
feat: owl_model_to_yams returns a mapping from yams to owl
parent
e16b693ade88
Pipeline
#91061
failed with stages
in 2 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
owl2yams/__init__.py
View file @
adde8e53
...
...
@@ -192,7 +192,7 @@
cw_uri_type
=
schema
.
add_relation_type
(
RelationType
(
"cw_uri"
))
schema
.
add_relation_def
(
RelationDefinition
(
cwuri_entitytype
,
cw_uri_type
,
"String"
))
return
schema
return
schema
,
entitytype_fragment_to_uri
,
relationtype_fragment_to_uri
def
run_and_print_if_error
(
command
):
...
...
@@ -237,7 +237,11 @@
owl_model
=
Graph
()
owl_model
.
parse
(
args
.
owl_model
,
format
=
args
.
parse_format
)
schema
=
owl_model_to_yams
(
owl_model
,
args
.
instance_name
)
(
schema
,
entitytype_fragment_to_uri
,
relationtype_fragment_to_uri
,
)
=
owl_model_to_yams
(
owl_model
,
args
.
instance_name
)
if
args
.
dry_run
:
print
(
serialize_to_python
(
schema
))
...
...
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