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