Commit 65675ffb authored by Günter Hipler's avatar Günter Hipler
Browse files

remove no longer needed Helper type

parent 9c2197c8
......@@ -34,7 +34,7 @@ import ujson.{Arr => JArr, Obj => JObj}
class EDM {
private val edmRdfModel = new EDMRdf4jModel
//private val edmRdfModel = new EDMRdf4jModel
//quite a lot of examples with datetimeformatter
//https://www.dariawan.com/tutorials/java/java-datetimeformatter-tutorial-examples/
//decide which is more appropriate for OAI
......
......@@ -27,7 +27,7 @@ import org.eclipse.rdf4j.rio.{RDFFormat, Rio}
import java.io.StringWriter
class EDMRdf4jModel {
object EDMRdf4jModel {
private val edmModel = getModelWithEDMNamespaces
......@@ -68,16 +68,16 @@ class EDMRdf4jModel {
val builder = new ModelBuilder
builder
.setNamespace("dc","http://purl.org/dc/elements/1.1/")
.setNamespace("dcterms","http://purl.org/dc/terms/")
.setNamespace("edm","http://www.europeana.eu/schemas/edm/")
.setNamespace("ore","http://www.openarchives.org/ore/terms/")
.setNamespace("owl","http://www.w3.org/2002/07/owl#")
.setNamespace("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#")
.setNamespace("foaf","http://xmlns.com/foaf/0.1/")
.setNamespace("wgs84_pos","http://www.w3.org/2004/02/skos/core#")
.setNamespace("crm","http://www.cidoc-crm.org/cidoc-crm/")
.setNamespace("cc","http://creativecommons.org/ns#")
.setNamespace("dc", "http://purl.org/dc/elements/1.1/")
.setNamespace("dcterms", "http://purl.org/dc/terms/")
.setNamespace("edm", "http://www.europeana.eu/schemas/edm/")
.setNamespace("ore", "http://www.openarchives.org/ore/terms/")
.setNamespace("owl", "http://www.w3.org/2002/07/owl#")
.setNamespace("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
.setNamespace("foaf", "http://xmlns.com/foaf/0.1/")
.setNamespace("wgs84_pos", "http://www.w3.org/2004/02/skos/core#")
.setNamespace("crm", "http://www.cidoc-crm.org/cidoc-crm/")
.setNamespace("cc", "http://creativecommons.org/ns#")
.build()
......
......@@ -20,6 +20,7 @@
package ch.memobase.rico2edm.edm.subjects
import ch.memobase.rico2edm.edm.EDMRdf4jModel
import ch.memobase.rico2edm.rdf.Helper
import ch.memobase.rico2edm.rdf.vocabularies.{EDMVocab, OreVocab}
import org.eclipse.rdf4j.model.Model
......@@ -31,7 +32,7 @@ class ProvidedCHO (val id: String) {
import org.eclipse.rdf4j.model.util.Values.iri
//import org.eclipse.rdf4j.model.util.Values.literal
private val model = Helper.getModelWithEDMNamespaces
private val model = EDMRdf4jModel.getModelWithEDMNamespaces
model.add(iri(id),RDF.TYPE, EDMVocab.ProvidedCHO)
private val factory = SimpleValueFactory.getInstance()
......@@ -101,7 +102,7 @@ class ProvidedCHO (val id: String) {
}
class WebResource (private val id: String) {
private val model = Helper.getModelWithEDMNamespaces
private val model = EDMRdf4jModel.getModelWithEDMNamespaces
private val factory = SimpleValueFactory.getInstance()
......@@ -131,7 +132,7 @@ object WebResource {
class Aggregation(private val id: String) {
private val model = Helper.getModelWithEDMNamespaces
private val model = EDMRdf4jModel.getModelWithEDMNamespaces
model.add(iri(id),RDF.TYPE, OreVocab.AGGREGATION)
private val identValue = "^https.*".r
......@@ -215,7 +216,7 @@ object Aggregation {
class Concept(val id: String) {
private val model = Helper.getModelWithEDMNamespaces
private val model = EDMRdf4jModel.getModelWithEDMNamespaces
model.add(iri(id),RDF.TYPE, SKOS.CONCEPT)
private val factory = SimpleValueFactory.getInstance()
......@@ -231,7 +232,7 @@ class Concept(val id: String) {
class TimeSpan(val id: String) {
//not used so far in Silvia mapping
private val model = Helper.getModelWithEDMNamespaces
private val model = EDMRdf4jModel.getModelWithEDMNamespaces
model.add(iri(id),RDF.TYPE, EDMVocab.TIMESPAN)
private val factory = SimpleValueFactory.getInstance()
......@@ -245,7 +246,7 @@ class TimeSpan(val id: String) {
class Place(val id: String) {
//not used so far in Silvia mapping
private val model = Helper.getModelWithEDMNamespaces
private val model = EDMRdf4jModel.getModelWithEDMNamespaces
model.add(iri(id),RDF.TYPE, EDMVocab.PLACE)
private val factory = SimpleValueFactory.getInstance()
......
......@@ -25,6 +25,7 @@ import org.eclipse.rdf4j.model.util.ModelBuilder
object Helper {
/*
def getModelWithEDMNamespaces:Model = {
val builder = new ModelBuilder
builder
......@@ -40,4 +41,6 @@ object Helper {
.setNamespace("cc", "http://creativecommons.org/ns#")
.build()
}
*/
}
\ No newline at end of file
......@@ -83,14 +83,6 @@ class ExtractorSpec extends AnyFunSuite with Matchers{
test ("simple test") {
val edm = new EDM()
val rdfModel = new EDMRdf4jModel
//val s = t.get.obj._1
//val resource = rdfModel.createResource("#UEDIN:214")
//println(rdfModel.serializeModel(new ProvidedCHO))
}
test ("read raw rico from @graph") {
......
Supports Markdown
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