Due to a scheduled upgrade to version 14.10, GitLab will be unavailabe on Monday 30.05., from 19:00 until 20:00.

Commit 9228d1f1 authored by Günter Hipler's avatar Günter Hipler
Browse files

change links to digital object in test phase and change literal to IRI for liks to resources

parent ab44e34b
...@@ -84,7 +84,7 @@ class ProvidedCHO (val id: String) { ...@@ -84,7 +84,7 @@ class ProvidedCHO (val id: String) {
dctermsIssued.map(t => model.add(iri(id),DCTERMS.ISSUED,factory.createLiteral(t))) dctermsIssued.map(t => model.add(iri(id),DCTERMS.ISSUED,factory.createLiteral(t)))
def addDcTermsMedium(medium:Option[String]): Unit = def addDcTermsMedium(medium:Option[String]): Unit =
medium.map(t => model.add(iri(id),DCTERMS.MEDIUM,factory.createLiteral(t))) medium.map(t => model.add(iri(id),DCTERMS.MEDIUM,factory.createIRI(t)))
def addDcTermsSpatial(spatial:Option[String]): Unit = def addDcTermsSpatial(spatial:Option[String]): Unit =
spatial.map(t => model.add(iri(id),DCTERMS.SPATIAL,factory.createLiteral(t))) spatial.map(t => model.add(iri(id),DCTERMS.SPATIAL,factory.createLiteral(t)))
...@@ -113,7 +113,7 @@ class WebResource (private val id: String) { ...@@ -113,7 +113,7 @@ class WebResource (private val id: String) {
def addRights(edmRights:Option[String]): Unit = def addRights(edmRights:Option[String]): Unit =
edmRights.map(t => model.add(iri(id),EDMVocab.RIGHTS,factory.createLiteral(t))) edmRights.map(t => model.add(iri(id),EDMVocab.RIGHTS,factory.createIRI(t)))
def addDcTermsExtent(dctermsExtent:Option[String]): Unit = def addDcTermsExtent(dctermsExtent:Option[String]): Unit =
dctermsExtent.map(t => model.add(iri(id),DCTERMS.EXTENT,factory.createLiteral(t))) dctermsExtent.map(t => model.add(iri(id),DCTERMS.EXTENT,factory.createLiteral(t)))
...@@ -132,7 +132,9 @@ class WebResource (private val id: String) { ...@@ -132,7 +132,9 @@ class WebResource (private val id: String) {
object WebResource { object WebResource {
def apply (shortID: String): 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) { ...@@ -155,9 +157,9 @@ class Aggregation(private val id: String) {
def addIsShownAt(edmIsShownAt: Option[String]): Unit = { def addIsShownAt(edmIsShownAt: Option[String]): Unit = {
edmIsShownAt.map(a => { edmIsShownAt.map(a => {
if (identValue.matches(edmIsShownAt.get)) { if (identValue.matches(edmIsShownAt.get)) {
model.add(iri(id),EDMVocab.IS_SHOWN_AT,factory.createLiteral(a)) model.add(iri(id),EDMVocab.IS_SHOWN_AT,factory.createIRI(a))
} else { } else {
model.add(iri(id),EDMVocab.IS_SHOWN_AT,factory.createLiteral( model.add(iri(id),EDMVocab.IS_SHOWN_AT,factory.createIRI(
s"https://memobase.ch/object/${a}")) s"https://memobase.ch/object/${a}"))
} }
...@@ -168,10 +170,11 @@ class Aggregation(private val id: String) { ...@@ -168,10 +170,11 @@ class Aggregation(private val id: String) {
def addIsShownBy(edmIsShownBy: Option[String]): Unit = { def addIsShownBy(edmIsShownBy: Option[String]): Unit = {
edmIsShownBy.map(a => { edmIsShownBy.map(a => {
if (identValue.matches(edmIsShownBy.get)) { if (identValue.matches(edmIsShownBy.get)) {
model.add(iri(id),EDMVocab.IS_SHOWN_BY,factory.createLiteral(a)) model.add(iri(id),EDMVocab.IS_SHOWN_BY,factory.createIRI(a))
} else { } else {
model.add(iri(id),EDMVocab.IS_SHOWN_BY,factory.createLiteral( model.add(iri(id),EDMVocab.IS_SHOWN_BY,factory.createIRI(
s"https://media.memobase.ch/memo/${a}/master")) //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) { ...@@ -179,10 +182,10 @@ class Aggregation(private val id: String) {
def addEDMObjectFoto(edmObjectFoto: Option[String]): Unit = { def addEDMObjectFoto(edmObjectFoto: Option[String]): Unit = {
edmObjectFoto.map(a => { edmObjectFoto.map(a => {
if (identValue.matches(edmObjectFoto.get)) { if (identValue.matches(edmObjectFoto.get)) {
model.add(iri(id),EDMVocab.OBJECT,factory.createLiteral(a)) model.add(iri(id),EDMVocab.OBJECT,factory.createIRI(a))
} else { } else {
model.add(iri(id),EDMVocab.OBJECT,factory.createLiteral( model.add(iri(id),EDMVocab.OBJECT,factory.createIRI(
s"https://media.memobase.ch/memo/${a}/master")) s"https://media.memobase.k8s.unibas.ch/memo/${a}/master"))
} }
}) })
} }
...@@ -203,16 +206,17 @@ class Aggregation(private val id: String) { ...@@ -203,16 +206,17 @@ class Aggregation(private val id: String) {
def addEDMObjectNoFoto(edmObjectNoFoto: Option[String]): Unit = { def addEDMObjectNoFoto(edmObjectNoFoto: Option[String]): Unit = {
edmObjectNoFoto.map(a => { edmObjectNoFoto.map(a => {
if (identValue.matches(edmObjectNoFoto.get)) { if (identValue.matches(edmObjectNoFoto.get)) {
model.add(iri(id),EDMVocab.OBJECT,factory.createLiteral(a)) model.add(iri(id),EDMVocab.OBJECT,factory.createIRI(a))
} else { } else {
model.add(iri(id),EDMVocab.OBJECT,factory.createLiteral( model.add(iri(id),EDMVocab.OBJECT,factory.createIRI(
s"https://media.memobase.ch/memo/${a}-poster")) //s"https://media.memobase.ch/memo/${a}-poster"))
s"https://media.memobase.k8s.unibas.ch/memo/${a}-poster"))
} }
}) })
} }
def addRights(edmRights:Option[String]): Unit = def addRights(edmRights:Option[String]): Unit =
edmRights.map(t => model.add(iri(id),EDMVocab.RIGHTS,factory.createLiteral(t))) edmRights.map(t => model.add(iri(id),EDMVocab.RIGHTS,factory.createIRI( t)))
def getModel: Model = model def getModel: Model = model
...@@ -222,7 +226,8 @@ class Aggregation(private val id: String) { ...@@ -222,7 +226,8 @@ class Aggregation(private val id: String) {
object Aggregation { 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}")
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment