use of org.eclipse.rdf4j.model.Literal in project opentheso by miledrousset.
the class WriteRdf4j method writeDocumentation.
private void writeDocumentation(SKOSResource resource) {
int prop;
for (SKOSDocumentation doc : resource.getDocumentationsList()) {
prop = doc.getProperty();
Literal literal = vf.createLiteral(doc.getText(), doc.getLanguage());
switch(prop) {
case SKOSProperty.definition:
builder.add(SKOS.DEFINITION, literal);
break;
case SKOSProperty.scopeNote:
builder.add(SKOS.SCOPE_NOTE, literal);
break;
case SKOSProperty.example:
builder.add(SKOS.EXAMPLE, literal);
break;
case SKOSProperty.historyNote:
builder.add(SKOS.HISTORY_NOTE, literal);
break;
case SKOSProperty.editorialNote:
builder.add(SKOS.EDITORIAL_NOTE, literal);
break;
case SKOSProperty.changeNote:
builder.add(SKOS.CHANGE_NOTE, literal);
break;
case SKOSProperty.note:
builder.add(SKOS.NOTE, literal);
break;
default:
break;
}
}
}
Aggregations