Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OWL2YAMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
OWL2YAMS
Commits
08d32cb3bc08
Commit
08d32cb3bc08
authored
3 years ago
by
Fabien Amarger
Browse files
Options
Downloads
Patches
Plain Diff
refactor(init): Define the owl_model_to_yams
parent
cb9e230dd43e
No related branches found
No related tags found
1 merge request
!1
Add-ci
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
owl2yams/__init__.py
+10
-4
10 additions, 4 deletions
owl2yams/__init__.py
with
10 additions
and
4 deletions
owl2yams/__init__.py
+
10
−
4
View file @
08d32cb3
...
...
@@ -29,10 +29,7 @@
return
url
.
path
.
split
(
"
/
"
)[
-
1
]
def
main
():
owl_model
=
Graph
()
owl_model
.
parse
(
"
./model.owl
"
,
format
=
"
turtle
"
)
def
owl_model_to_yams
(
owl_model
:
Graph
)
->
Schema
:
# 0. Create a new YAMS Schema
schema
=
Schema
(
"
LOUTRE
"
)
register_base_types
(
schema
)
...
...
@@ -79,4 +76,13 @@
)
)
return
schema
def
main
():
owl_model
=
Graph
()
owl_model
.
parse
(
"
./model.owl
"
,
format
=
"
turtle
"
)
schema
=
owl_model_to_yams
(
owl_model
)
print
(
serialize_to_python
(
schema
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment