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) {
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.createLiteral(t)))
medium.map(t => model.add(iri(id),DCTERMS.MEDIUM,factory.createIRI(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.createLiteral(t)))
edmRights.map(t => model.add(iri(id),EDMVocab.RIGHTS,factory.createIRI(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.createLiteral(a))
model.add(iri(id),EDMVocab.IS_SHOWN_AT,factory.createIRI(a))
} 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}"))
}
......@@ -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.createLiteral(a))
model.add(iri(id),EDMVocab.IS_SHOWN_BY,factory.createIRI(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.createLiteral(a))
model.add(iri(id),EDMVocab.OBJECT,factory.createIRI(a))
} else {
model.add(iri(id),EDMVocab.OBJECT,factory.createLiteral(
s"https://media.memobase.ch/memo/${a}/master"))
model.add(iri(id),EDMVocab.OBJECT,factory.createIRI(
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.createLiteral(a))
model.add(iri(id),EDMVocab.OBJECT,factory.createIRI(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.createLiteral(t)))
edmRights.map(t => model.add(iri(id),EDMVocab.RIGHTS,factory.createIRI( 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}")
}
......
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