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
39976286
Commit
39976286
authored
4 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed URL ports. Added creators to catalog in dcat api.
parent
069fc49f
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!357
Merge for release
,
!344
Dcat catalog full
Pipeline
#101321
passed
4 years ago
Stage: build
Stage: test
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nomad/app/flask/dcat/mapping.py
+9
-6
9 additions, 6 deletions
nomad/app/flask/dcat/mapping.py
nomad/config.py
+1
-2
1 addition, 2 deletions
nomad/config.py
with
10 additions
and
8 deletions
nomad/app/flask/dcat/mapping.py
+
9
−
6
View file @
39976286
...
@@ -40,12 +40,12 @@ def get_optional_entry_prop(entry, name):
...
@@ -40,12 +40,12 @@ def get_optional_entry_prop(entry, name):
class
Mapping
():
class
Mapping
():
def
__init__
(
self
):
def
__init__
(
self
):
self
.
g
=
Graph
()
self
.
g
=
Graph
()
self
.
g
.
namespace_manager
.
bind
(
'
rdf
'
,
RDF
)
self
.
g
.
bind
(
'
rdf
'
,
RDF
)
self
.
g
.
namespace_manager
.
bind
(
'
dcat
'
,
DCAT
)
self
.
g
.
bind
(
'
dcat
'
,
DCAT
)
self
.
g
.
namespace_manager
.
bind
(
'
dct
'
,
DCT
)
self
.
g
.
bind
(
'
dct
'
,
DCT
)
self
.
g
.
namespace_manager
.
bind
(
'
vcard
'
,
VCARD
)
self
.
g
.
bind
(
'
vcard
'
,
VCARD
)
self
.
g
.
namespace_manager
.
bind
(
'
foaf
'
,
FOAF
)
self
.
g
.
bind
(
'
foaf
'
,
FOAF
)
self
.
g
.
namespace_manager
.
bind
(
'
hydra
'
,
HYDRA
)
self
.
g
.
bind
(
'
hydra
'
,
HYDRA
)
self
.
persons
=
{}
self
.
persons
=
{}
...
@@ -76,6 +76,9 @@ class Mapping():
...
@@ -76,6 +76,9 @@ class Mapping():
self
.
g
.
add
((
hydra_collection
,
RDF
.
type
,
HYDRA
.
collection
))
self
.
g
.
add
((
hydra_collection
,
RDF
.
type
,
HYDRA
.
collection
))
for
person
in
self
.
persons
.
values
():
self
.
g
.
add
((
catalog
,
DCT
.
creator
,
person
))
def
map_entry
(
self
,
entry
:
EntryMetadata
,
slim
=
False
):
def
map_entry
(
self
,
entry
:
EntryMetadata
,
slim
=
False
):
dataset
=
URIRef
(
url
(
'
datasets
'
,
entry
.
calc_id
))
dataset
=
URIRef
(
url
(
'
datasets
'
,
entry
.
calc_id
))
...
...
This diff is collapsed.
Click to expand it.
nomad/config.py
+
1
−
2
View file @
39976286
...
@@ -177,8 +177,7 @@ tests = NomadConfig(
...
@@ -177,8 +177,7 @@ tests = NomadConfig(
def
api_url
(
ssl
:
bool
=
True
,
api
:
str
=
'
api
'
):
def
api_url
(
ssl
:
bool
=
True
,
api
:
str
=
'
api
'
):
protocol
=
'
https
'
if
services
.
https
and
ssl
else
'
http
'
protocol
=
'
https
'
if
services
.
https
and
ssl
else
'
http
'
host_and_port
=
services
.
api_host
.
strip
(
'
/
'
)
host_and_port
=
services
.
api_host
.
strip
(
'
/
'
)
standard_port
=
443
if
protocol
==
'
https
'
else
80
if
services
.
api_port
not
in
[
80
,
443
]:
if
services
.
api_port
!=
standard_port
:
host_and_port
+=
'
:
'
+
str
(
services
.
api_port
)
host_and_port
+=
'
:
'
+
str
(
services
.
api_port
)
base_path
=
services
.
api_base_path
.
strip
(
'
/
'
)
base_path
=
services
.
api_base_path
.
strip
(
'
/
'
)
return
f
'
{
protocol
}
://
{
host_and_port
}
/
{
base_path
}
/
{
api
}
'
return
f
'
{
protocol
}
://
{
host_and_port
}
/
{
base_path
}
/
{
api
}
'
...
...
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