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
memoriav
Memobase 2020
libraries
Normalizer Service Configuration
Commits
db3ccfa7
Commit
db3ccfa7
authored
Aug 12, 2021
by
Jonas Waeber
Browse files
Add step name as param
parent
a207318c
Changes
7
Show whitespace changes
Inline
Side-by-side
src/main/kotlin/ch/memobase/configs/GlobalTransformsLoader.kt
View file @
db3ccfa7
/*
Copyright 2020 Jonas Waeber
Copyright 2020
-2021
Jonas Waeber
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
...
...
src/main/kotlin/ch/memobase/configs/LocalTransformsLoader.kt
View file @
db3ccfa7
/*
Copyright 2020 Jonas Waeber
Copyright 2020
-2021
Jonas Waeber
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
...
...
@@ -15,7 +15,6 @@
*/
package
ch.memobase.configs
import
ch.memobase.helpers.KEYS
import
ch.memobase.helpers.ValidationError
import
ch.memobase.model.LocalTransform
import
ch.memobase.reporting.Report
...
...
@@ -25,11 +24,11 @@ import com.fasterxml.jackson.databind.ObjectMapper
import
com.fasterxml.jackson.databind.exc.MismatchedInputException
import
com.fasterxml.jackson.dataformat.yaml.YAMLFactory
import
com.fasterxml.jackson.module.kotlin.registerKotlinModule
import
org.apache.logging.log4j.LogManager
import
java.io.ByteArrayInputStream
import
java.util.regex.PatternSyntaxException
import
org.apache.logging.log4j.LogManager
class
LocalTransformsLoader
(
private
val
data
:
ByteArray
)
{
class
LocalTransformsLoader
(
private
val
data
:
ByteArray
,
private
val
step
:
String
)
{
private
val
log
=
LogManager
.
getLogger
(
this
::
class
.
java
)
private
val
objectMapper
=
ObjectMapper
(
YAMLFactory
()).
registerKotlinModule
()
private
val
transforms
=
mutableListOf
<
ITransformer
>()
...
...
@@ -41,7 +40,7 @@ class LocalTransformsLoader(private val data: ByteArray) {
key
,
ReportStatus
.
ignored
,
"[Local Transform] Ignored empty local transformation file."
,
KEYS
.
step
step
)
else
{
val
results
=
objectMapper
.
readValue
(
ByteArrayInputStream
(
data
),
LocalTransform
::
class
.
java
)
...
...
@@ -53,24 +52,24 @@ class LocalTransformsLoader(private val data: ByteArray) {
transforms
.
addAll
(
it
)
}
}
Report
(
key
,
ReportStatus
.
success
,
""
,
KEYS
.
step
)
Report
(
key
,
ReportStatus
.
success
,
""
,
step
)
}
}
catch
(
ex
:
MismatchedInputException
)
{
val
message
=
"[Local Transform] YamlParserError: ${ex.localizedMessage}"
log
.
error
(
message
)
Report
(
key
,
ReportStatus
.
fatal
,
message
,
KEYS
.
step
)
Report
(
key
,
ReportStatus
.
fatal
,
message
,
step
)
}
catch
(
ex
:
ValidationError
)
{
val
message
=
"[Local Transform] ValidationError: ${ex.localizedMessage}"
log
.
error
(
message
)
Report
(
key
,
ReportStatus
.
fatal
,
message
,
KEYS
.
step
)
Report
(
key
,
ReportStatus
.
fatal
,
message
,
step
)
}
catch
(
ex
:
PatternSyntaxException
)
{
val
message
=
"[Local Transform] RegexError: ${ex.localizedMessage}"
log
.
error
(
message
)
Report
(
key
,
ReportStatus
.
fatal
,
message
,
KEYS
.
step
)
Report
(
key
,
ReportStatus
.
fatal
,
message
,
step
)
}
catch
(
ex
:
Exception
)
{
val
message
=
"[Local Transform] ${ex.javaClass.name}: ${ex.localizedMessage}"
log
.
error
(
message
)
Report
(
key
,
ReportStatus
.
fatal
,
message
,
KEYS
.
step
)
Report
(
key
,
ReportStatus
.
fatal
,
message
,
step
)
}
}
...
...
src/main/kotlin/ch/memobase/helpers/KEYS.kt
View file @
db3ccfa7
...
...
@@ -28,6 +28,4 @@ object KEYS {
const
val
missingLabelDe
=
"FEHLENDES LABEL"
const
val
missingLabelFr
=
"L'ÉTIQUETTE MANQUANTE"
const
val
missingLabelIt
=
"GALATEO MANCANTE"
const
val
step
=
"normalization-service"
}
src/test/kotlin/ch/memobase/LocalTestRun.kt
View file @
db3ccfa7
...
...
@@ -49,7 +49,7 @@ class LocalTestRun {
val
mappingFile
=
"localTransform.yml"
val
global
=
GlobalTransformsLoader
(
"src/test/resources/global/transforms.yml"
)
global
.
parse
()
val
local
=
LocalTransformsLoader
(
File
(
folder
+
mappingFile
).
readBytes
())
val
local
=
LocalTransformsLoader
(
File
(
folder
+
mappingFile
).
readBytes
()
,
"test"
)
local
.
parse
(
"test-key"
)
val
transformConfigs
=
local
.
get
()
+
global
.
get
()
File
(
folder
+
"test-item.nt"
)
...
...
@@ -87,7 +87,7 @@ class LocalTestRun {
val
mappingFile
=
"/config/localTransforms.yml"
val
global
=
GlobalTransformsLoader
(
"src/test/resources/global/transforms.yml"
)
global
.
parse
()
val
local
=
LocalTransformsLoader
(
File
(
folder
+
mappingFile
).
readBytes
())
val
local
=
LocalTransformsLoader
(
File
(
folder
+
mappingFile
).
readBytes
()
,
"test"
)
local
.
parse
(
"test-key"
)
val
transformConfigs
=
local
.
get
()
+
global
.
get
()
File
(
inputFolder
)
...
...
src/test/kotlin/ch/memobase/TestLocalTransformLoader.kt
View file @
db3ccfa7
...
...
@@ -36,7 +36,7 @@ class TestLocalTransformLoader {
@Test
fun
`test
empty
local
transform`
()
{
val
localTransformsLoader
=
LocalTransformsLoader
(
byteArrayOf
())
val
localTransformsLoader
=
LocalTransformsLoader
(
byteArrayOf
()
,
"test"
)
val
report
=
localTransformsLoader
.
parse
(
"key"
)
assertThat
(
report
.
status
)
.
isEqualTo
(
ReportStatus
.
ignored
)
...
...
@@ -44,7 +44,7 @@ class TestLocalTransformLoader {
@Test
fun
`test
yml
parse
error`
()
{
val
localTransformsLoader
=
LocalTransformsLoader
(
readYml
(
"invalid"
))
val
localTransformsLoader
=
LocalTransformsLoader
(
readYml
(
"invalid"
)
,
"test"
)
val
report
=
localTransformsLoader
.
parse
(
"key"
)
assertAll
(
""
,
...
...
@@ -66,7 +66,7 @@ class TestLocalTransformLoader {
@Test
fun
`test
valid
input`
()
{
val
localTransformsLoader
=
LocalTransformsLoader
(
readYml
(
"valid"
))
val
localTransformsLoader
=
LocalTransformsLoader
(
readYml
(
"valid"
)
,
"test"
)
val
report
=
localTransformsLoader
.
parse
(
"key"
)
assertAll
(
""
,
...
...
@@ -83,7 +83,7 @@ class TestLocalTransformLoader {
@Test
fun
`test
invalid
entity
splitter
input`
()
{
val
localTransformsLoader
=
LocalTransformsLoader
(
readYml
(
"invalidEntitySplitter"
))
val
localTransformsLoader
=
LocalTransformsLoader
(
readYml
(
"invalidEntitySplitter"
)
,
"test"
)
val
report
=
localTransformsLoader
.
parse
(
"key"
)
assertAll
(
""
,
...
...
src/test/resources/single-item/output.nt
View file @
db3ccfa7
...
...
@@ -7,33 +7,44 @@ _:b0 a <https://www.ica.org/standards/RiC/ontology#
<https://www.ica.org/standards/RiC/ontology#type>
"content" .
_:b2 a <https://www.ica.org/standards/RiC/ontology#Language> ;
<https://www.ica.org/standards/RiC/ontology#name>
"GALATEO MANCANTE"@it , "L'ÉTIQUETTE MANQUANTE"@fr , "FEHLENDES LABEL"@de ;
<https://www.ica.org/standards/RiC/ontology#resultsFrom>
_:b3 ;
<https://www.ica.org/standards/RiC/ontology#type>
"content" .
_:b4 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
_:b1 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
<https://www.ica.org/standards/RiC/ontology#affects>
_:b
5
;
_:b
2
;
<https://www.ica.org/standards/RiC/ontology#beginningDate>
"2021-
10
-1
5
T0
8:10:49
+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
"2021-
43
-1
2
T0
7:43:28
+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#endDate>
"2021-
10
-1
5
T0
8:10:49
+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
"2021-
43
-1
2
T0
7:43:28
+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#performedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Mechanism> ;
<https://www.ica.org/standards/RiC/ontology#name>
"
Genre
Normalizer" ;
"
Languages
Normalizer" ;
<https://www.ica.org/standards/RiC/ontology#performs>
_:b
4
_:b
1
] ;
<https://www.ica.org/standards/RiC/ontology#resultsIn>
_:b
6
;
_:b
0
;
<https://www.ica.org/standards/RiC/ontology#type>
"enrichment" .
_:b3 a <https://www.ica.org/standards/RiC/ontology#CreationRelation> ;
<https://www.ica.org/standards/RiC/ontology#creationRelationHasSource>
<https://memobase.ch/record/soz-007-Sozarch_F_1030-094A> ;
<https://www.ica.org/standards/RiC/ontology#creationRelationHasTarget>
[ a <https://www.ica.org/standards/RiC/ontology#Person> ;
<http://xmlns.com/foaf/0.1/firstName>
"Stefan" ;
<http://xmlns.com/foaf/0.1/lastName>
"Schmid" ;
<https://www.ica.org/standards/RiC/ontology#agentIsTargetOfCreationRelation>
_:b3 ;
<https://www.ica.org/standards/RiC/ontology#name>
"Stefan Schmid"
] ;
<https://www.ica.org/standards/RiC/ontology#name>
"Moderation" ;
<https://www.ica.org/standards/RiC/ontology#type>
"contributor" .
<https://memobase.ch/record/soz-007-Sozarch_F_1030-094A>
a <https://www.ica.org/standards/RiC/ontology#Record> ;
<http://purl.org/dc/terms/abstract>
...
...
@@ -72,7 +83,7 @@ _:b4 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
] ;
<http://schema.org/sameAs> "http://www.bild-video-ton.ch/bestand/objekt/Sozarch_F_1030-094A" ;
<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#hasGenre>
_:b
6
, _:b5 ;
_:b
4
, _:b5 ;
<https://memobase.ch/internal/isPublished>
false ;
<https://www.ica.org/standards/RiC/ontology#conditionsOfUse>
...
...
@@ -80,50 +91,50 @@ _:b4 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
<https://www.ica.org/standards/RiC/ontology#hasInstantiation>
<https://memobase.ch/physical/soz-007-Sozarch_F_1030-094A-1> , <https://memobase.ch/digital/soz-007-Sozarch_F_1030-094A-1> ;
<https://www.ica.org/standards/RiC/ontology#hasLanguage>
_:b
0
, _:b
2
, _:b
7
;
_:b
2
, _:b
6
, _:b
0
;
<https://www.ica.org/standards/RiC/ontology#hasTitle>
[ a <https://www.ica.org/standards/RiC/ontology#Title> ;
<https://www.ica.org/standards/RiC/ontology#title>
"Radio Riesbach: Sendung vom 06.11.1988
, \"Mosaik\" - Teil 1/2, Moderation: Stefan Schmid
" ;
"Radio Riesbach: Sendung vom 06.11.1988" ;
<https://www.ica.org/standards/RiC/ontology#type>
"
main
"
"
broadcast
"
] ;
<https://www.ica.org/standards/RiC/ontology#hasTitle>
[ a <https://www.ica.org/standards/RiC/ontology#Title> ;
<https://www.ica.org/standards/RiC/ontology#title>
"
Radio Riesbach: Sendung vom 06.11.1988
" ;
"
Mosaik
" ;
<https://www.ica.org/standards/RiC/ontology#type>
"
broadcast
"
"
series
"
] ;
<https://www.ica.org/standards/RiC/ontology#hasTitle>
[ a <https://www.ica.org/standards/RiC/ontology#Title> ;
<https://www.ica.org/standards/RiC/ontology#title>
"
Mosaik
" ;
"
Radio Riesbach: Sendung vom 06.11.1988, \"Mosaik\" - Teil 1/2, Moderation: Stefan Schmid
" ;
<https://www.ica.org/standards/RiC/ontology#type>
"
series
"
"
main
"
] ;
<https://www.ica.org/standards/RiC/ontology#heldBy>
<https://memobase.ch/institution/soz> ;
<https://www.ica.org/standards/RiC/ontology#identifiedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Identifier> ;
<https://www.ica.org/standards/RiC/ontology#identifier>
"Sozarch_F_1030-094A" ;
"
soz-007-
Sozarch_F_1030-094A" ;
<https://www.ica.org/standards/RiC/ontology#type>
"
original
"
"
main
"
] ;
<https://www.ica.org/standards/RiC/ontology#identifiedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Identifier> ;
<https://www.ica.org/standards/RiC/ontology#identifier>
"
SozArch-
Sozarch_F_1030-094A" ;
"Sozarch_F_1030-094A" ;
<https://www.ica.org/standards/RiC/ontology#type>
"o
ldMemobase
"
"o
riginal
"
] ;
<https://www.ica.org/standards/RiC/ontology#identifiedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Identifier> ;
<https://www.ica.org/standards/RiC/ontology#identifier>
"
s
oz
-007
-Sozarch_F_1030-094A" ;
"
S
oz
Arch
-Sozarch_F_1030-094A" ;
<https://www.ica.org/standards/RiC/ontology#type>
"
main
"
"
oldMemobase
"
] ;
<https://www.ica.org/standards/RiC/ontology#isPartOf>
<https://memobase.ch/recordSet/soz-007> ;
...
...
@@ -133,7 +144,7 @@ _:b4 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
"Verein Radio Riesbach"
] ;
<https://www.ica.org/standards/RiC/ontology#recordResourceOrInstantiationIsSourceOfCreationRelation>
_:b
8
, _:b
9
;
_:b
3
, _:b
7
;
<https://www.ica.org/standards/RiC/ontology#regulatedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Rule> ;
<https://www.ica.org/standards/RiC/ontology#name>
...
...
@@ -148,104 +159,61 @@ _:b4 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
<https://www.ica.org/standards/RiC/ontology#type>
"Radio" .
_:b3 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
<https://www.ica.org/standards/RiC/ontology#affects>
_:b7 ;
<https://www.ica.org/standards/RiC/ontology#beginningDate>
"2021-10-15T08:10:49+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#endDate>
"2021-10-15T08:10:49+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#performedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Mechanism> ;
_:b6 a <https://www.ica.org/standards/RiC/ontology#Language> ;
<https://www.ica.org/standards/RiC/ontology#name>
"LanguagesNormalizer" ;
<https://www.ica.org/standards/RiC/ontology#performs>
_:b3
] ;
<https://www.ica.org/standards/RiC/ontology#resultsIn>
_:b2 ;
"GALATEO MANCANTE"@it , "L'ÉTIQUETTE MANQUANTE"@fr , "FEHLENDES LABEL"@de ;
<https://www.ica.org/standards/RiC/ontology#resultsFrom>
_:b8 ;
<https://www.ica.org/standards/RiC/ontology#type>
"
enrichm
ent" .
"
cont
ent" .
_:b1 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
<https://www.ica.org/standards/RiC/ontology#affects>
_:b7 ;
<https://www.ica.org/standards/RiC/ontology#beginningDate>
"2021-10-15T08:10:49+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#endDate>
"2021-10-15T08:10:49+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#performedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Mechanism> ;
_:b9 a <https://www.ica.org/standards/RiC/ontology#CarrierType> ;
<https://www.ica.org/standards/RiC/ontology#name>
"LanguagesNormalizer" ;
<https://www.ica.org/standards/RiC/ontology#performs>
_:b1
] ;
<https://www.ica.org/standards/RiC/ontology#resultsIn>
_:b0 ;
<https://www.ica.org/standards/RiC/ontology#type>
"enrichment" .
"Kompaktkassette" .
_:b10 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
_:b10 a <https://www.ica.org/standards/RiC/ontology#CarrierType> ;
<http://schema.org/sameAs> "http://www.wikidata.org/entity/Q149757" ;
<https://www.ica.org/standards/RiC/ontology#name>
"musicassetta"@it , "cassette audio"@fr , "Compact Cassette"@de ;
<https://www.ica.org/standards/RiC/ontology#resultsFrom>
_:b11 .
_:b4 a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Trasmissione radio"@it , "Émission de radio"@fr , "Radiosendung"@de ;
<https://www.ica.org/standards/RiC/ontology#resultsFrom>
_:b12 .
_:b11 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
<https://www.ica.org/standards/RiC/ontology#affects>
_:b
11
;
_:b
9
;
<https://www.ica.org/standards/RiC/ontology#beginningDate>
"2021-
10
-1
5
T0
8:10:49
+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
"2021-
43
-1
2
T0
7:43:28
+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#endDate>
"2021-
10
-1
5
T0
8:10:49
+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
"2021-
43
-1
2
T0
7:43:28
+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#performedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Mechanism> ;
<https://www.ica.org/standards/RiC/ontology#name>
"CarrierTypeNormalizer" ;
<https://www.ica.org/standards/RiC/ontology#performs>
_:b1
0
_:b1
1
] ;
<https://www.ica.org/standards/RiC/ontology#resultsIn>
_:b1
2
;
_:b1
0
;
<https://www.ica.org/standards/RiC/ontology#type>
"enrichment" .
_:b12 a <https://www.ica.org/standards/RiC/ontology#CarrierType> ;
<http://schema.org/sameAs> "http://www.wikidata.org/entity/Q149757" ;
<https://www.ica.org/standards/RiC/ontology#name>
"musicassetta"@it , "cassette audio"@fr , "Compact Cassette"@de ;
<https://www.ica.org/standards/RiC/ontology#resultsFrom>
_:b10 .
_:b9 a <https://www.ica.org/standards/RiC/ontology#CreationRelation> ;
<https://www.ica.org/standards/RiC/ontology#creationRelationHasSource>
<https://memobase.ch/record/soz-007-Sozarch_F_1030-094A> ;
<https://www.ica.org/standards/RiC/ontology#creationRelationHasTarget>
[ a <https://www.ica.org/standards/RiC/ontology#Person> ;
<http://xmlns.com/foaf/0.1/firstName>
"Stefan" ;
<http://xmlns.com/foaf/0.1/lastName>
"Schmid" ;
<https://www.ica.org/standards/RiC/ontology#agentIsTargetOfCreationRelation>
_:b9 ;
<https://www.ica.org/standards/RiC/ontology#name>
"Stefan Schmid"
] ;
<https://www.ica.org/standards/RiC/ontology#name>
"Moderation" ;
<https://www.ica.org/standards/RiC/ontology#type>
"contributor" .
_:b11 a <https://www.ica.org/standards/RiC/ontology#CarrierType> ;
<https://www.ica.org/standards/RiC/ontology#name>
"Kompaktkassette" .
_:b5 a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Quartierradio" .
_:b
8
a <https://www.ica.org/standards/RiC/ontology#CreationRelation> ;
_:b
7
a <https://www.ica.org/standards/RiC/ontology#CreationRelation> ;
<https://www.ica.org/standards/RiC/ontology#creationRelationHasSource>
<https://memobase.ch/record/soz-007-Sozarch_F_1030-094A> ;
<https://www.ica.org/standards/RiC/ontology#creationRelationHasTarget>
[ a <https://www.ica.org/standards/RiC/ontology#CorporateBody> ;
<https://www.ica.org/standards/RiC/ontology#agentIsTargetOfCreationRelation>
_:b
8
;
_:b
7
;
<https://www.ica.org/standards/RiC/ontology#name>
"Verein Radio Riesbach"
] ;
...
...
@@ -254,6 +222,25 @@ _:b8 a <https://www.ica.org/standards/RiC/ontology#CreationRelation> ;
<https://www.ica.org/standards/RiC/ontology#type>
"creator" .
_:b8 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
<https://www.ica.org/standards/RiC/ontology#affects>
_:b2 ;
<https://www.ica.org/standards/RiC/ontology#beginningDate>
"2021-43-12T07:43:28+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#endDate>
"2021-43-12T07:43:28+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#performedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Mechanism> ;
<https://www.ica.org/standards/RiC/ontology#name>
"LanguagesNormalizer" ;
<https://www.ica.org/standards/RiC/ontology#performs>
_:b8
] ;
<https://www.ica.org/standards/RiC/ontology#resultsIn>
_:b6 ;
<https://www.ica.org/standards/RiC/ontology#type>
"enrichment" .
<https://memobase.ch/digital/soz-007-Sozarch_F_1030-094A-1>
a <https://www.ica.org/standards/RiC/ontology#Instantiation> ;
<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator>
...
...
@@ -291,24 +278,37 @@ _:b8 a <https://www.ica.org/standards/RiC/ontology#CreationRelation> ;
<https://www.ica.org/standards/RiC/ontology#type>
"digitalObject" .
_:b
7
a <https://www.ica.org/standards/RiC/ontology#Language> ;
_:b
2
a <https://www.ica.org/standards/RiC/ontology#Language> ;
<https://www.ica.org/standards/RiC/ontology#name>
"schweizerdeutsch" ;
<https://www.ica.org/standards/RiC/ontology#type>
"content" .
_:b6 a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Trasmissione radio"@it , "Émission de radio"@fr , "Radiosendung"@de ;
<https://www.ica.org/standards/RiC/ontology#resultsFrom>
_:b4 .
_:b12 a <https://www.ica.org/standards/RiC/ontology#Activity> ;
<https://www.ica.org/standards/RiC/ontology#affects>
_:b5 ;
<https://www.ica.org/standards/RiC/ontology#beginningDate>
"2021-43-12T07:43:28+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#endDate>
"2021-43-12T07:43:28+0000"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://www.ica.org/standards/RiC/ontology#performedBy>
[ a <https://www.ica.org/standards/RiC/ontology#Mechanism> ;
<https://www.ica.org/standards/RiC/ontology#name>
"GenreNormalizer" ;
<https://www.ica.org/standards/RiC/ontology#performs>
_:b12
] ;
<https://www.ica.org/standards/RiC/ontology#resultsIn>
_:b4 ;
<https://www.ica.org/standards/RiC/ontology#type>
"enrichment" .
<https://memobase.ch/physical/soz-007-Sozarch_F_1030-094A-1>
a <https://www.ica.org/standards/RiC/ontology#Instantiation> ;
<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#duration>
"00:45:58" ;
<https://www.ica.org/standards/RiC/ontology#hasCarrierType>
_:b1
2
, _:b
11
;
_:b1
0
, _:b
9
;
<https://www.ica.org/standards/RiC/ontology#hasDerivedInstantiation>
<https://memobase.ch/digital/soz-007-Sozarch_F_1030-094A-1> ;
<https://www.ica.org/standards/RiC/ontology#identifiedBy>
...
...
src/test/resources/tmp/turtle-output-language-normalization.ttl
View file @
db3ccfa7
...
...
@@ -23,26 +23,26 @@
@prefix
dc:
<http://purl.org/dc/elements/1.1/>
.
_:
b0
a
rico:
Language
;
rico:
name
"Deutsch"
;
rico:
type
"caption"
.
_:
b1
a
rico:
Language
;
schema:
sameAs
"http://www.wikidata.org/entity/Q188"
;
rico:
name
"tedesco"
@it
,
"allemand"
@fr
,
"Deutsch"
@de
;
rico:
resultsFrom
_:
b
2
;
rico:
resultsFrom
_:
b
1
;
rico:
type
"caption"
.
[
a
rico:
Record
;
rico:
hasLanguage
_:
b1
,
_:
b0
]
.
_:
b2
a
rico:
Activity
;
rico:
affects
_:
b0
;
rico:
beginningDate
"2021-11-15T08:11:01+0000"
^^
xsd:
dateTime
;
rico:
endDate
"2021-11-15T08:11:01+0000"
^^
xsd:
dateTime
;
_:
b1
a
rico:
Activity
;
rico:
affects
_:
b2
;
rico:
beginningDate
"2021-43-12T07:43:51+0000"
^^
xsd:
dateTime
;
rico:
endDate
"2021-43-12T07:43:51+0000"
^^
xsd:
dateTime
;
rico:
performedBy
[
a
rico:
Mechanism
;
rico:
name
"LanguagesNormalizer"
;
rico:
performs
_:
b
2
rico:
performs
_:
b
1
]
;
rico:
resultsIn
_:
b
1
;
rico:
resultsIn
_:
b
0
;
rico:
type
"enrichment"
.
[
a
rico:
Record
;
rico:
hasLanguage
_:
b0
,
_:
b2
]
.
_:
b2
a
rico:
Language
;
rico:
name
"Deutsch"
;
rico:
type
"caption"
.
Write
Preview
Supports
Markdown
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