use of org.eclipse.rdf4j.model.IRI in project opentheso by miledrousset.
the class WriteRdf4j method writeRelation.
private void writeRelation(SKOSResource resource) {
int prop;
for (SKOSRelation relation : resource.getRelationsList()) {
IRI uri = vf.createIRI(relation.getTargetUri());
prop = relation.getProperty();
switch(prop) {
case SKOSProperty.member:
builder.add(SKOS.MEMBER, uri);
break;
case SKOSProperty.broader:
builder.add(SKOS.BROADER, uri);
break;
case SKOSProperty.broaderGeneric:
builder.add("skos:broaderGeneric", uri);
break;
case SKOSProperty.broaderInstantive:
builder.add("skos:broaderInstantive", uri);
break;
case SKOSProperty.broaderPartitive:
builder.add("skos:broaderPartitive", uri);
break;
case SKOSProperty.narrower:
builder.add(SKOS.NARROWER, uri);
break;
case SKOSProperty.narrowerGeneric:
builder.add("skos:narrowerGeneric", uri);
break;
case SKOSProperty.narrowerInstantive:
builder.add("skos:narrowerInstantive", uri);
break;
case SKOSProperty.narrowerPartitive:
builder.add("skos:narrowerPartitive", uri);
break;
case SKOSProperty.related:
builder.add(SKOS.RELATED, uri);
break;
case SKOSProperty.relatedHasPart:
builder.add("skos:relatedHasPart", uri);
break;
case SKOSProperty.relatedPartOf:
builder.add("skos:relatedPartOf", uri);
break;
case SKOSProperty.hasTopConcept:
builder.add(SKOS.HAS_TOP_CONCEPT, uri);
break;
case SKOSProperty.inScheme:
builder.add(SKOS.IN_SCHEME, uri);
break;
case SKOSProperty.topConceptOf:
builder.add(SKOS.TOP_CONCEPT_OF, uri);
break;
case SKOSProperty.subGroup:
builder.add("iso-thes:subGroup", uri);
break;
case SKOSProperty.microThesaurusOf:
builder.add("iso-thes:microThesaurusOf", uri);
break;
case SKOSProperty.superGroup:
builder.add("iso-thes:superGroup", uri);
break;
}
}
}
Aggregations