From 7abcec9c8e5973b2f81ebf929c6d37fee1f86dc7 Mon Sep 17 00:00:00 2001 From: Mark Hale Date: Sun, 29 Oct 2023 02:19:26 +0000 Subject: [PATCH] Add SemOpenAlex and supporting namespaces. --- .../com/msd/gin/halyard/vocab/DBPEDIA.java | 21 +++++++++++++++++ .../java/com/msd/gin/halyard/vocab/PRISM.java | 13 +++++++++++ .../msd/gin/halyard/vocab/SEMOPENALEX.java | 23 +++++++++++++++++++ .../java/com/msd/gin/halyard/vocab/SPAR.java | 19 +++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 common/src/main/java/com/msd/gin/halyard/vocab/DBPEDIA.java create mode 100644 common/src/main/java/com/msd/gin/halyard/vocab/PRISM.java create mode 100644 common/src/main/java/com/msd/gin/halyard/vocab/SEMOPENALEX.java create mode 100644 common/src/main/java/com/msd/gin/halyard/vocab/SPAR.java diff --git a/common/src/main/java/com/msd/gin/halyard/vocab/DBPEDIA.java b/common/src/main/java/com/msd/gin/halyard/vocab/DBPEDIA.java new file mode 100644 index 000000000..1cc55d023 --- /dev/null +++ b/common/src/main/java/com/msd/gin/halyard/vocab/DBPEDIA.java @@ -0,0 +1,21 @@ +package com.msd.gin.halyard.vocab; + +import com.msd.gin.halyard.common.Vocabulary; + +import org.eclipse.rdf4j.model.Namespace; +import org.eclipse.rdf4j.model.impl.SimpleNamespace; +import org.kohsuke.MetaInfServices; + +@MetaInfServices(Vocabulary.class) +public final class DBPEDIA implements Vocabulary { + public static final String ONTOLOGY_NAMESPACE = "https://dbpedia.org/ontology/"; + public static final String PROPERTY_NAMESPACE = "https://dbpedia.org/property/"; + public static final String RESOURCE_NAMESPACE = "https://dbpedia.org/resource/"; + public static final String RESOURCE_TEMPLATE_NAMESPACE = "https://dbpedia.org/resource/Template:"; + public static final String YAGO_NAMESPACE = "https://dbpedia.org/class/yago/"; + public static final Namespace ONTOLOGY_NS = new SimpleNamespace("dbo", ONTOLOGY_NAMESPACE); + public static final Namespace PROPERTY_NS = new SimpleNamespace("dbp", PROPERTY_NAMESPACE); + public static final Namespace RESOURCE_NS = new SimpleNamespace("dbr", RESOURCE_NAMESPACE); + public static final Namespace RESOURCE_TEMPLATE_NS = new SimpleNamespace("dbt", RESOURCE_TEMPLATE_NAMESPACE); + public static final Namespace YAGO_NS = new SimpleNamespace("yago", YAGO_NAMESPACE); +} diff --git a/common/src/main/java/com/msd/gin/halyard/vocab/PRISM.java b/common/src/main/java/com/msd/gin/halyard/vocab/PRISM.java new file mode 100644 index 000000000..5d09854f5 --- /dev/null +++ b/common/src/main/java/com/msd/gin/halyard/vocab/PRISM.java @@ -0,0 +1,13 @@ +package com.msd.gin.halyard.vocab; + +import com.msd.gin.halyard.common.Vocabulary; + +import org.eclipse.rdf4j.model.Namespace; +import org.eclipse.rdf4j.model.impl.SimpleNamespace; +import org.kohsuke.MetaInfServices; + +@MetaInfServices(Vocabulary.class) +public final class PRISM implements Vocabulary { + public static final String NAMESPACE = "http://prismstandard.org/namespaces/basic/2.0/"; + public static final Namespace NS = new SimpleNamespace("prism", NAMESPACE); +} diff --git a/common/src/main/java/com/msd/gin/halyard/vocab/SEMOPENALEX.java b/common/src/main/java/com/msd/gin/halyard/vocab/SEMOPENALEX.java new file mode 100644 index 000000000..585f2e033 --- /dev/null +++ b/common/src/main/java/com/msd/gin/halyard/vocab/SEMOPENALEX.java @@ -0,0 +1,23 @@ +package com.msd.gin.halyard.vocab; + +import com.msd.gin.halyard.common.Vocabulary; + +import org.eclipse.rdf4j.model.Namespace; +import org.eclipse.rdf4j.model.impl.SimpleNamespace; +import org.kohsuke.MetaInfServices; + +@MetaInfServices(Vocabulary.class) +public final class SEMOPENALEX implements Vocabulary { + public static final String CLASS_NAMESPACE = "https://semopenalex.org/class/"; + public static final String PROPERTY_NAMESPACE = "https://semopenalex.org/property/"; + public static final String CONCEPT_NAMESPACE = "https://semopenalex.org/concept/"; + public static final String WORK_NAMESPACE = "https://semopenalex.org/work/"; + public static final String AUTHOR_NAMESPACE = "https://semopenalex.org/author/"; + public static final String INSTITUTION_NAMESPACE = "https://semopenalex.org/institution/"; + public static final Namespace CLASS_NS = new SimpleNamespace("soa_class", CLASS_NAMESPACE); + public static final Namespace PROPERTY_NS = new SimpleNamespace("soa_prop", PROPERTY_NAMESPACE); + public static final Namespace CONCEPT_NS = new PrefixedIntegerNamespace("soa_concept", CONCEPT_NAMESPACE, "C"); + public static final Namespace WORK_NS = new PrefixedIntegerNamespace("soa_work", WORK_NAMESPACE, "W"); + public static final Namespace AUTHOR_NS = new PrefixedIntegerNamespace("soa_auth", AUTHOR_NAMESPACE, "A"); + public static final Namespace INSTITUTION_NS = new PrefixedIntegerNamespace("soa_inst", INSTITUTION_NAMESPACE, "I"); +} diff --git a/common/src/main/java/com/msd/gin/halyard/vocab/SPAR.java b/common/src/main/java/com/msd/gin/halyard/vocab/SPAR.java new file mode 100644 index 000000000..cb6dbaea7 --- /dev/null +++ b/common/src/main/java/com/msd/gin/halyard/vocab/SPAR.java @@ -0,0 +1,19 @@ +package com.msd.gin.halyard.vocab; + +import com.msd.gin.halyard.common.Vocabulary; + +import org.eclipse.rdf4j.model.Namespace; +import org.eclipse.rdf4j.model.impl.SimpleNamespace; +import org.kohsuke.MetaInfServices; + +@MetaInfServices(Vocabulary.class) +public final class SPAR implements Vocabulary { + public static final String BIDO_NAMESPACE = "http://purl.org/spar/bido/"; + public static final Namespace BIDO_NS = new SimpleNamespace("bido", BIDO_NAMESPACE); + + public static final String CITO_NAMESPACE = "http://purl.org/spar/cito/"; + public static final Namespace CITO_NS = new SimpleNamespace("cito", CITO_NAMESPACE); + + public static final String FABIO_NAMESPACE = "http://purl.org/spar/fabio/"; + public static final Namespace FABIO_NS = new SimpleNamespace("fabio", FABIO_NAMESPACE); +}