Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
nomad-lab
nomad-FAIR
Commits
a4a52f07
Commit
a4a52f07
authored
4 years ago
by
Maja-Olivia Lenz
Committed by
Markus Scheidgen
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix pycodestyle
parent
5310f3da
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!254
Merging these two branches concerning the encylopedia complex search
,
!246
Merge for release
,
!238
Add dcat API for stream project.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nomad/app/dcat/mapping.py
+6
-6
6 additions, 6 deletions
nomad/app/dcat/mapping.py
with
6 additions
and
6 deletions
nomad/app/dcat/mapping.py
+
6
−
6
View file @
a4a52f07
...
@@ -80,22 +80,22 @@ class Mapping():
...
@@ -80,22 +80,22 @@ class Mapping():
# DataService: API
# DataService: API
service
=
BNode
()
service
=
BNode
()
self
.
g
.
add
((
service
,
RDF
.
type
,
DCAT
.
DataService
))
self
.
g
.
add
((
service
,
RDF
.
type
,
DCAT
.
DataService
))
self
.
g
.
add
((
service
,
DCT
.
title
,
Literal
(
'
NOMAD API
'
)))
# How to include terms from swagger document here?
self
.
g
.
add
((
service
,
DCT
.
title
,
Literal
(
'
NOMAD API
'
)))
# How to include terms from swagger document here?
self
.
g
.
add
((
service
,
DCT
.
description
,
Literal
(
'
Official NOMAD API
'
)))
# same question
self
.
g
.
add
((
service
,
DCT
.
description
,
Literal
(
'
Official NOMAD API
'
)))
# same question
self
.
g
.
add
((
service
,
DCAT
.
endpointURL
,
URIRef
(
'
https://nomad-lab.eu/prod/rae/api/
'
)))
# config.api_url() ?
self
.
g
.
add
((
service
,
DCAT
.
endpointURL
,
URIRef
(
'
https://nomad-lab.eu/prod/rae/api/
'
)))
# config.api_url() ?
# not sure if the following needs to be dataset specific:
# not sure if the following needs to be dataset specific:
self
.
g
.
add
((
service
,
DCAT
.
endpointDescription
,
URIRef
(
'
https://nomad-lab.eu/prod/rae/api/swagger.json
'
)))
self
.
g
.
add
((
service
,
DCAT
.
endpointDescription
,
URIRef
(
'
https://nomad-lab.eu/prod/rae/api/swagger.json
'
)))
# Distribution over API
# Distribution over API
dist
=
BNode
()
dist
=
BNode
()
self
.
g
.
add
((
dist
,
DCT
.
title
,
Literal
(
'
unavailable
'
if
entry
.
formula
is
None
else
entry
.
formula
+
'
api
'
)))
self
.
g
.
add
((
dist
,
DCT
.
title
,
Literal
(
'
unavailable
'
if
entry
.
formula
is
None
else
entry
.
formula
+
'
api
'
)))
self
.
g
.
add
((
dist
,
RDF
.
type
,
DCAT
.
Distribution
))
self
.
g
.
add
((
dist
,
RDF
.
type
,
DCAT
.
Distribution
))
self
.
g
.
add
((
dist
,
DCAT
.
accessService
,
service
))
self
.
g
.
add
((
dist
,
DCAT
.
accessService
,
service
))
elif
dist_kind
==
'
json
'
:
elif
dist_kind
==
'
json
'
:
# Distribution as JSON
# Distribution as JSON
dist
=
BNode
()
dist
=
BNode
()
self
.
g
.
add
((
dist
,
RDF
.
type
,
DCAT
.
Distribution
))
self
.
g
.
add
((
dist
,
RDF
.
type
,
DCAT
.
Distribution
))
self
.
g
.
add
((
dist
,
DCT
.
title
,
Literal
(
'
unavailable
'
if
entry
.
formula
is
None
else
entry
.
formula
+
'
json
'
)))
self
.
g
.
add
((
dist
,
DCT
.
title
,
Literal
(
'
unavailable
'
if
entry
.
formula
is
None
else
entry
.
formula
+
'
json
'
)))
self
.
g
.
add
((
dist
,
DCAT
.
mediaType
,
URIRef
(
'
https://www.iana.org/assignments/media-types/application/json
'
)))
self
.
g
.
add
((
dist
,
DCAT
.
mediaType
,
URIRef
(
'
https://www.iana.org/assignments/media-types/application/json
'
)))
self
.
g
.
add
((
dist
,
DCAT
.
packageFormat
,
URIRef
(
'
https://www.iana.org/assignments/media-types/application/zip
'
)))
self
.
g
.
add
((
dist
,
DCAT
.
packageFormat
,
URIRef
(
'
https://www.iana.org/assignments/media-types/application/zip
'
)))
self
.
g
.
add
((
dist
,
DCAT
.
downloadURL
,
URIRef
(
self
.
g
.
add
((
dist
,
DCAT
.
downloadURL
,
URIRef
(
...
@@ -106,7 +106,7 @@ class Mapping():
...
@@ -106,7 +106,7 @@ class Mapping():
# Distribution of the raw data
# Distribution of the raw data
dist
=
BNode
()
dist
=
BNode
()
self
.
g
.
add
((
dist
,
RDF
.
type
,
DCAT
.
Distribution
))
self
.
g
.
add
((
dist
,
RDF
.
type
,
DCAT
.
Distribution
))
self
.
g
.
add
((
dist
,
DCT
.
title
,
Literal
(
'
unavailable
'
if
entry
.
formula
is
None
else
entry
.
formula
+
'
raw
'
)))
self
.
g
.
add
((
dist
,
DCT
.
title
,
Literal
(
'
unavailable
'
if
entry
.
formula
is
None
else
entry
.
formula
+
'
raw
'
)))
self
.
g
.
add
((
dist
,
DCAT
.
accessURL
,
URIRef
(
'
https://nomad-lab.eu/prod/rae/api/raw/calc/%s/%s
'
%
(
self
.
g
.
add
((
dist
,
DCAT
.
accessURL
,
URIRef
(
'
https://nomad-lab.eu/prod/rae/api/raw/calc/%s/%s
'
%
(
entry
.
upload_id
,
entry
.
calc_id
))))
entry
.
upload_id
,
entry
.
calc_id
))))
self
.
g
.
add
((
dist
,
DCAT
.
packageFormat
,
URIRef
(
'
https://www.iana.org/assignments/media-types/application/zip
'
)))
self
.
g
.
add
((
dist
,
DCAT
.
packageFormat
,
URIRef
(
'
https://www.iana.org/assignments/media-types/application/zip
'
)))
...
...
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