Hi,
what would be the most effective way to find a Resource that
- belongs to a raw Model
- in an instance of class X in an InfModel (which is based on the Model
above)
?
I came up with something which iterates instances and filters by membership
(lambda syntax not tested):
infModel.listSubjectsWithProperty(RDF.type, class).
filterKeep(r -> infModel.getRawModel().containsResource(r))
If a lot of instances were inferred in the InfModel, I can see this being
slow.
Is there a better way? Maybe inversing the iterations somehow?
Martynas