- Resource type = graph.getPossibleObject(contribution, VP.ActionBrowseContextContribution_HasType);
- if(type != null) {
- if(!graph.isInstanceOf(parameter2, type)) continue;
- }
+ Collection<Resource> acceptedTypes = graph.getObjects(contribution, VP.ActionBrowseContextContribution_HasType);
+ Collection<Resource> allTypes = graph.getTypes(parameter2);
+ if(Collections.disjoint(acceptedTypes, allTypes))
+ continue;
+
+ Resource context = graph.getPossibleObject(contribution, VP.ActionBrowseContextContribution_HasActionBrowseContext);
+ if(context == null)
+ continue;
+