Skip to content

Commit 73fa5d6

Browse files
Base vocab (#48)
* Set theme jekyll-theme-slate * Create index.md Initialise GH pages * Add base vocab * Add base vocab to alias definition
1 parent a2798bf commit 73fa5d6

File tree

2 files changed

+130
-1
lines changed

2 files changed

+130
-1
lines changed

binary-array-ld-lib/src/main/kotlin/net/bald/alias/ModelAliasDefinition.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package net.bald.alias
22

33
import net.bald.vocab.BALD
44
import org.apache.jena.rdf.model.*
5+
import org.apache.jena.riot.RDFLanguages
56
import org.apache.jena.vocabulary.DCTerms
67
import org.apache.jena.vocabulary.OWL
78
import org.apache.jena.vocabulary.RDF
@@ -76,7 +77,13 @@ class ModelAliasDefinition(
7677
*/
7778
@JvmStatic
7879
fun create(model: Model): AliasDefinition {
79-
return ModelAliasDefinition(model)
80+
return ModelAliasDefinition(model.add(vocab))
81+
}
82+
83+
private val vocab: Model by lazy {
84+
this::class.java.getResourceAsStream("/bald/vocab/bald.ttl")?.use { input ->
85+
ModelFactory.createDefaultModel().read(input, null, RDFLanguages.strLangTurtle)
86+
} ?: throw IllegalStateException("Failed to load base vocabulary.")
8087
}
8188
}
8289
}
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
@prefix cc: <http://creativecommons.org/ns#> .
2+
@prefix void: <http://rdfs.org/ns/void#> .
3+
@prefix org: <http://www.w3.org/ns/org#> .
4+
@prefix odrs: <http://schema.theodi.org/odrs#> .
5+
@prefix ssd: <http://www.w3.org/ns/sparql-service-description#> .
6+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
7+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
8+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
9+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
10+
@prefix version: <http://purl.org/linked-data/version#> .
11+
@prefix qb: <http://purl.org/linked-data/cube#> .
12+
@prefix dgu: <http://reference.data.gov.uk/def/reference/> .
13+
@prefix ui: <http://purl.org/linked-data/registry-ui#> .
14+
@prefix dct: <http://purl.org/dc/terms/> .
15+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
16+
@prefix reg: <http://purl.org/linked-data/registry#> .
17+
@prefix ldp: <http://www.w3.org/ns/ldp#> .
18+
@prefix time: <http://www.w3.org/2006/time#> .
19+
@prefix api: <http://purl.org/linked-data/api/vocab#> .
20+
@prefix vann: <http://purl.org/vocab/vann/> .
21+
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
22+
@prefix prov: <http://www.w3.org/ns/prov#> .
23+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
24+
@prefix dc: <http://purl.org/dc/elements/1.1/> .
25+
@prefix dcat: <http://www.w3.org/ns/dcat#>.
26+
27+
<https://www.opengis.net/def/binary-array-ld/isPrefixedBy>
28+
a owl:ObjectProperty ;
29+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Container> ;
30+
rdfs:label "isPrefixedBy" ;
31+
rdfs:range <https://www.opengis.net/def/binary-array-ld/Resource> ;
32+
dct:description "This Container has prefixes defined by that Resource, a list of prefix definitions." .
33+
34+
<https://www.opengis.net/def/binary-array-ld/Array>
35+
a owl:Class ;
36+
rdfs:label "Array" ;
37+
rdfs:subClassOf <https://www.opengis.net/def/binary-array-ld/Resource> ;
38+
dct:description "A multi-dimensional array of literals." .
39+
40+
<https://www.opengis.net/def/binary-array-ld/contains>
41+
a owl:ObjectProperty ;
42+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Container> ;
43+
rdfs:label "contains" ;
44+
rdfs:range <https://www.opengis.net/def/binary-array-ld/Resource> ;
45+
dct:description "The Container contains the Resource. " .
46+
47+
<https://www.opengis.net/def/binary-array-ld/target>
48+
a owl:ObjectProperty ;
49+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Reference> ;
50+
rdfs:label "target" ;
51+
rdfs:range <https://www.opengis.net/def/binary-array-ld/Array> ;
52+
dct:description "The Array a Reference targets." .
53+
54+
<https://www.opengis.net/def/binary-array-ld/Reference>
55+
a owl:Class ;
56+
rdfs:label "Reference" ;
57+
rdfs:subClassOf <https://www.opengis.net/def/binary-array-ld/Resource> ;
58+
dct:description "The definition of a reference from one Array to another." .
59+
60+
<https://www.opengis.net/def/binary-array-ld/Resource>
61+
a owl:Class ;
62+
rdfs:label "Resource" ;
63+
rdfs:subClassOf rdfs:Resource ;
64+
dct:description "A resource being described by metadata." .
65+
66+
<https://www.opengis.net/def/binary-array-ld/sourceRefShape>
67+
a owl:DatatypeProperty ;
68+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Reference> ;
69+
rdfs:label "source reference shape" ;
70+
dct:description "The shape of the source Array in the array reference relation. Only expected if this shape differs from the source Array's own shape." .
71+
72+
<https://www.opengis.net/def/binary-array-ld/shape>
73+
a owl:DatatypeProperty ;
74+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Array> ;
75+
rdfs:label "shape" ;
76+
dct:description "The shape of the Array." .
77+
78+
<https://www.opengis.net/def/binary-array-ld/references>
79+
a owl:ObjectProperty ;
80+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Array> ;
81+
rdfs:label "references" ;
82+
rdfs:range <https://www.opengis.net/def/binary-array-ld/Reference> ;
83+
dct:description "This Array references that Reference. " .
84+
85+
<https://www.opengis.net/def/binary-array-ld/isAliasedBy>
86+
a owl:ObjectProperty ;
87+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Container> ;
88+
rdfs:label "isAliasedBy" ;
89+
rdfs:range <https://www.opengis.net/def/binary-array-ld/Resource> ;
90+
dct:description "This Container is aliased by this Resource, an alias graph." .
91+
92+
<https://www.opengis.net/def/binary-array-ld>
93+
a reg:Register , owl:Ontology , ldp:Container ;
94+
rdfs:label "Binary Array LD" ;
95+
rdfs:member <https://www.opengis.net/def/binary-array-ld/shape> , <https://www.opengis.net/def/binary-array-ld/Resource> , <https://www.opengis.net/def/binary-array-ld/contains> , <https://www.opengis.net/def/binary-array-ld/targetRefShape> , <https://www.opengis.net/def/binary-array-ld/isPrefixedBy> , <https://www.opengis.net/def/binary-array-ld/Reference> , <https://www.opengis.net/def/binary-array-ld/target> , <https://www.opengis.net/def/binary-array-ld/sourceRefShape> , <https://www.opengis.net/def/binary-array-ld/references> , <https://www.opengis.net/def/binary-array-ld/Container> , <https://www.opengis.net/def/binary-array-ld/isAliasedBy> , <https://www.opengis.net/def/binary-array-ld/Array>, <https://www.opengis.net/def/binary-array-ld/arrayFirstValue>, <https://www.opengis.net/def/binary-array-ld/arrayLastValue> ;
96+
dct:description "Binary Array Linked Data Ontology" ;
97+
ldp:hasMemberRelation rdfs:member .
98+
99+
<https://www.opengis.net/def/binary-array-ld/Container>
100+
a owl:Class ;
101+
rdfs:subClassOf dcat:Dataset ;
102+
rdfs:label "Container" ;
103+
rdfs:subClassOf <https://www.opengis.net/def/binary-array-ld/Resource> ;
104+
dct:description "A Resource which may contain other Resources." .
105+
106+
<https://www.opengis.net/def/binary-array-ld/targetRefShape>
107+
a owl:DatatypeProperty ;
108+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Reference> ;
109+
rdfs:label "target reference shape" ;
110+
dct:description "The shape of the target array in the array reference relation. Only expected if this shape differs from the target array's own shape." .
111+
112+
<https://www.opengis.net/def/binary-array-ld/arrayFirstValue>
113+
a owl:DatatypeProperty ;
114+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Array> ;
115+
rdfs:label "first value" ;
116+
dct:description "The first value in the data payload of a 1 dimensional array. " .
117+
118+
<https://www.opengis.net/def/binary-array-ld/arrayLastValue>
119+
a owl:DatatypeProperty ;
120+
rdfs:domain <https://www.opengis.net/def/binary-array-ld/Array> ;
121+
rdfs:label "last value" ;
122+
dct:description "The last value in the data payload of a 1 dimensional array. " .

0 commit comments

Comments
 (0)