Search in sources :

Example 1 with SKOSDate

use of mom.trd.opentheso.skosapi.SKOSDate in project opentheso by miledrousset.

the class WriteRdf4j method writeDate.

private void writeDate(SKOSResource resource) {
    int prop;
    Literal literal;
    for (SKOSDate date : resource.getDateList()) {
        literal = vf.createLiteral(date.getDate(), XMLSchema.DATE);
        prop = date.getProperty();
        switch(prop) {
            case SKOSProperty.created:
                builder.add(DCTERMS.CREATED, literal);
                break;
            case SKOSProperty.modified:
                builder.add(DCTERMS.MODIFIED, literal);
                break;
            case SKOSProperty.date:
                builder.add(DCTERMS.DATE, literal);
                break;
            default:
                break;
        }
    }
}
Also used : Literal(org.eclipse.rdf4j.model.Literal) SKOSDate(mom.trd.opentheso.skosapi.SKOSDate)

Aggregations

SKOSDate (mom.trd.opentheso.skosapi.SKOSDate)1 Literal (org.eclipse.rdf4j.model.Literal)1