Как это сделать с помощью Java Jena?
Пример
это график знаний
Код: Выделить всё
ex:johnSmith dpvm:access ex:healthRecord-1 .
ex:johnSmith rdf:type dpvm:Pharmacist.
ex:saraParker dpvm:access ex:healthRecord-2 .
ex:saraParker rdf:type dpvm:Pharmacist.
ex:alicePark dpvm:access ex:healthRecord-3 .
ex:alicePark rdf:type dpvm:Pharmacist.
Код: Выделить всё
CONSTRUCT
{
?x dpvm:access ?y .
}
WHERE
{
?x dpvm:access ?y.
?x rdf:type dpvm:Pharmacist .
}
graph1:
Код: Выделить всё
ex:johnSmith dpvm:access ex:healthRecord-1 .
Код: Выделить всё
ex:saraParker dpvm:access ex:healthRecord-2 .
Код: Выделить всё
ex:alicePark dpvm:access ex:healthRecord-3 .
Подробнее здесь: https://stackoverflow.com/questions/790 ... arql-query