Hi,
I've just realised my previous topic on this was closed. Sorry for posting it again, but I still don't have the rule working. I think it should be very close and I would really appreciate if you could have a quick look at it.
Thanks very much.
You can emulate the issue by loading the dataset shared here:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ub: <http://swat.cse.lehigh.edu/onto/univ-bench.owl#> .
RULE :Type9
IF {
?student a ub:Student .
?faculty a ub:Faculty .
?course a ub:Course .
?student ub:advisor ?faculty .
?faculty ub:teacherOf ?course .
?student ub:takesCourse ?course .
BIND(IRI(CONCAT("http://http://swat.cse.lehigh.edu/onto/univ-bench.owl/", LOCALNAME(?student), "/", LOCALNAME(?faculty), "/", LOCALNAME(?course))) as ?ID) .
}
THEN {
?ID ub:hasStudent ?student ;
ub:hasFaculty ?faculty ;
ub:hasCourse ?course .
}
:Type9 rdfs:comment "This rule defines Type 9" ;
a :MyRule .