Skip to content

Commit

Permalink
fix: use rdf:type instead of rdfs:subClassOf for subtop, resolves #57
Browse files Browse the repository at this point in the history
  • Loading branch information
Yagnap committed Nov 4, 2024
1 parent 7cc5d4e commit 32557fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/eu/snik/tag/Clazz.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.vocabulary.OWL;
import org.apache.jena.vocabulary.RDF;
import org.apache.jena.vocabulary.RDFS;
import org.apache.jena.vocabulary.SKOS;
import org.json.JSONObject;
Expand Down Expand Up @@ -140,7 +141,8 @@ public String toString() {
public Model rdfModel() {
var model = ModelFactory.createDefaultModel();
Resource clazz = model.createResource(uri(), OWL.Class);
model.add(clazz, RDFS.subClassOf, subtop.resource);
// Theoretically a subclass, but we use it like this for better compatibility
model.add(clazz, RDF.type, subtop.resource);

// labels as rdfs:label and skos:altLabel
Iterator<String> labelIterator = this.labels().iterator();
Expand Down

0 comments on commit 32557fa

Please sign in to comment.