use of mom.trd.opentheso.bdd.helper.nodes.NodeHieraRelation in project opentheso by miledrousset.
the class ExportRdf4jHelper method addRelationGiven.
private void addRelationGiven(ArrayList<NodeHieraRelation> btList, ArrayList<NodeHieraRelation> ntList, ArrayList<NodeHieraRelation> rtList, SKOSResource resource, String idTheso) {
for (NodeHieraRelation rt : rtList) {
int prop;
switch(rt.getRole()) {
case "RHP":
prop = SKOSProperty.relatedHasPart;
break;
case "RPO":
prop = SKOSProperty.relatedPartOf;
break;
default:
prop = SKOSProperty.related;
}
resource.addRelation(getUriFromNodeUri(rt.getUri(), idTheso), prop);
}
for (NodeHieraRelation nt : ntList) {
int prop;
switch(nt.getRole()) {
case "NTG":
prop = SKOSProperty.narrowerGeneric;
break;
case "NTP":
prop = SKOSProperty.narrowerPartitive;
break;
case "NTI":
prop = SKOSProperty.narrowerInstantive;
break;
default:
prop = SKOSProperty.narrower;
}
resource.addRelation(getUriFromNodeUri(nt.getUri(), idTheso), prop);
}
for (NodeHieraRelation bt : btList) {
int prop;
switch(bt.getRole()) {
case "BTG":
prop = SKOSProperty.broaderGeneric;
break;
case "BTP":
prop = SKOSProperty.broaderPartitive;
break;
case "BTI":
prop = SKOSProperty.broaderInstantive;
break;
default:
prop = SKOSProperty.broader;
}
resource.addRelation(getUriFromNodeUri(bt.getUri(), idTheso), prop);
}
}
Aggregations