Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
j.hoerdt
sensor2graph
Commits
500ba53c
Commit
500ba53c
authored
Oct 19, 2021
by
j.hoerdt
Browse files
fix quotation of description in pid
parent
9af97fae
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scripts/validate_handle_data.py
View file @
500ba53c
...
...
@@ -12,6 +12,7 @@ pid_to_test = "21.11138/c4c0f351-96e2-4e93-bf1f-0fd73e828300"
base_url
=
"https://hdl.handle.net/"
exit_code
=
0
pid_content
=
json
.
loads
(
urllib
.
request
.
urlopen
(
f
"
{
base_url
}
api/handles/
{
pid_to_test
}
"
).
read
())
for
record
in
pid_content
[
"values"
]:
if
record
[
"index"
]
not
in
[
100
,
9
]:
...
...
@@ -23,4 +24,6 @@ for record in pid_content["values"]:
jsonschema
.
validate
(
instance
=
data
,
schema
=
json
.
loads
(
type_info
[
"validationSchema"
]))
except
Exception
as
e
:
print
(
f
"could not validate due to exception:
{
e
}
"
)
exit_code
=
1
sys
.
exit
(
exit_code
);
\ No newline at end of file
src/main/java/sensor2graph/Sensor.java
View file @
500ba53c
...
...
@@ -110,7 +110,7 @@ class Sensor {
add_attribute
(
body
,
"8"
,
"21.T11148/55f8ebc805e65b5b71dd"
,
new
JsonPrimitive
(
"\""
+
rec
.
get
(
"type.description"
).
asString
()
+
"\""
)
new
JsonPrimitive
(
rec
.
get
(
"type.description"
).
asString
())
);
}
add_attribute
(
body
,
...
...
j.hoerdt
@j.hoerdt
mentioned in commit
3eee0686
·
Oct 19, 2021
mentioned in commit
3eee0686
mentioned in commit 3eee0686eb87de0088eddca081ab46dcd164f61c
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment