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
services
postprocessing
rico-edm-transformer
Commits
9228d1f1
Commit
9228d1f1
authored
Apr 12, 2021
by
Günter Hipler
Browse files
change links to digital object in test phase and change literal to IRI for liks to resources
parent
ab44e34b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/scala/ch/memobase/rico2edm/edm/subjects/ProvidedCHO.scala
View file @
9228d1f1
...
...
@@ -84,7 +84,7 @@ class ProvidedCHO (val id: String) {
dctermsIssued
.
map
(
t
=>
model
.
add
(
iri
(
id
),
DCTERMS
.
ISSUED
,
factory
.
createLiteral
(
t
)))
def
addDcTermsMedium
(
medium
:
Option
[
String
])
:
Unit
=
medium
.
map
(
t
=>
model
.
add
(
iri
(
id
),
DCTERMS
.
MEDIUM
,
factory
.
create
Literal
(
t
)))
medium
.
map
(
t
=>
model
.
add
(
iri
(
id
),
DCTERMS
.
MEDIUM
,
factory
.
create
IRI
(
t
)))
def
addDcTermsSpatial
(
spatial
:
Option
[
String
])
:
Unit
=
spatial
.
map
(
t
=>
model
.
add
(
iri
(
id
),
DCTERMS
.
SPATIAL
,
factory
.
createLiteral
(
t
)))
...
...
@@ -113,7 +113,7 @@ class WebResource (private val id: String) {
def
addRights
(
edmRights
:
Option
[
String
])
:
Unit
=
edmRights
.
map
(
t
=>
model
.
add
(
iri
(
id
),
EDMVocab
.
RIGHTS
,
factory
.
create
Literal
(
t
)))
edmRights
.
map
(
t
=>
model
.
add
(
iri
(
id
),
EDMVocab
.
RIGHTS
,
factory
.
create
IRI
(
t
)))
def
addDcTermsExtent
(
dctermsExtent
:
Option
[
String
])
:
Unit
=
dctermsExtent
.
map
(
t
=>
model
.
add
(
iri
(
id
),
DCTERMS
.
EXTENT
,
factory
.
createLiteral
(
t
)))
...
...
@@ -132,7 +132,9 @@ class WebResource (private val id: String) {
object
WebResource
{
def
apply
(
shortID
:
String
)
:
WebResource
=
new
WebResource
(
s
"https://media.memobase.ch/memo/${shortID}/master"
)
//new WebResource(s"https://media.memobase.ch/memo/${shortID}/master")
new
WebResource
(
s
"https://media.memobase.k8s.unibas.ch/memo/${shortID}/master"
)
}
...
...
@@ -155,9 +157,9 @@ class Aggregation(private val id: String) {
def
addIsShownAt
(
edmIsShownAt
:
Option
[
String
])
:
Unit
=
{
edmIsShownAt
.
map
(
a
=>
{
if
(
identValue
.
matches
(
edmIsShownAt
.
get
))
{
model
.
add
(
iri
(
id
),
EDMVocab
.
IS_SHOWN_AT
,
factory
.
create
Literal
(
a
))
model
.
add
(
iri
(
id
),
EDMVocab
.
IS_SHOWN_AT
,
factory
.
create
IRI
(
a
))
}
else
{
model
.
add
(
iri
(
id
),
EDMVocab
.
IS_SHOWN_AT
,
factory
.
create
Literal
(
model
.
add
(
iri
(
id
),
EDMVocab
.
IS_SHOWN_AT
,
factory
.
create
IRI
(
s
"https://memobase.ch/object/${a}"
))
}
...
...
@@ -168,10 +170,11 @@ class Aggregation(private val id: String) {
def
addIsShownBy
(
edmIsShownBy
:
Option
[
String
])
:
Unit
=
{
edmIsShownBy
.
map
(
a
=>
{
if
(
identValue
.
matches
(
edmIsShownBy
.
get
))
{
model
.
add
(
iri
(
id
),
EDMVocab
.
IS_SHOWN_BY
,
factory
.
create
Literal
(
a
))
model
.
add
(
iri
(
id
),
EDMVocab
.
IS_SHOWN_BY
,
factory
.
create
IRI
(
a
))
}
else
{
model
.
add
(
iri
(
id
),
EDMVocab
.
IS_SHOWN_BY
,
factory
.
createLiteral
(
s
"https://media.memobase.ch/memo/${a}/master"
))
model
.
add
(
iri
(
id
),
EDMVocab
.
IS_SHOWN_BY
,
factory
.
createIRI
(
//s"https://media.memobase.ch/memo/${a}/master"))
s
"https://media.memobase.k8s.unibas.ch/memo/${a}/master"
))
}
})
}
...
...
@@ -179,10 +182,10 @@ class Aggregation(private val id: String) {
def
addEDMObjectFoto
(
edmObjectFoto
:
Option
[
String
])
:
Unit
=
{
edmObjectFoto
.
map
(
a
=>
{
if
(
identValue
.
matches
(
edmObjectFoto
.
get
))
{
model
.
add
(
iri
(
id
),
EDMVocab
.
OBJECT
,
factory
.
create
Literal
(
a
))
model
.
add
(
iri
(
id
),
EDMVocab
.
OBJECT
,
factory
.
create
IRI
(
a
))
}
else
{
model
.
add
(
iri
(
id
),
EDMVocab
.
OBJECT
,
factory
.
create
Literal
(
s
"https://media.memobase.ch/memo/${a}/master"
))
model
.
add
(
iri
(
id
),
EDMVocab
.
OBJECT
,
factory
.
create
IRI
(
s
"https://media.memobase.
k8s.unibas.
ch/memo/${a}/master"
))
}
})
}
...
...
@@ -203,16 +206,17 @@ class Aggregation(private val id: String) {
def
addEDMObjectNoFoto
(
edmObjectNoFoto
:
Option
[
String
])
:
Unit
=
{
edmObjectNoFoto
.
map
(
a
=>
{
if
(
identValue
.
matches
(
edmObjectNoFoto
.
get
))
{
model
.
add
(
iri
(
id
),
EDMVocab
.
OBJECT
,
factory
.
create
Literal
(
a
))
model
.
add
(
iri
(
id
),
EDMVocab
.
OBJECT
,
factory
.
create
IRI
(
a
))
}
else
{
model
.
add
(
iri
(
id
),
EDMVocab
.
OBJECT
,
factory
.
createLiteral
(
s
"https://media.memobase.ch/memo/${a}-poster"
))
model
.
add
(
iri
(
id
),
EDMVocab
.
OBJECT
,
factory
.
createIRI
(
//s"https://media.memobase.ch/memo/${a}-poster"))
s
"https://media.memobase.k8s.unibas.ch/memo/${a}-poster"
))
}
})
}
def
addRights
(
edmRights
:
Option
[
String
])
:
Unit
=
edmRights
.
map
(
t
=>
model
.
add
(
iri
(
id
),
EDMVocab
.
RIGHTS
,
factory
.
create
Literal
(
t
)))
edmRights
.
map
(
t
=>
model
.
add
(
iri
(
id
),
EDMVocab
.
RIGHTS
,
factory
.
create
IRI
(
t
)))
def
getModel
:
Model
=
model
...
...
@@ -222,7 +226,8 @@ class Aggregation(private val id: String) {
object
Aggregation
{
def
apply
(
shortID
:
String
)
:
Aggregation
=
new
Aggregation
(
s
"https://memobase.ch/object/${shortID}"
)
//def apply (shortID: String): Aggregation = new Aggregation(s"https://memobase.ch/object/${shortID}")
def
apply
(
shortID
:
String
)
:
Aggregation
=
new
Aggregation
(
s
"https://memobase-customer-live.outermedia.net/object/${shortID}"
)
}
...
...
Write
Preview
Markdown
is supported
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