PREFIX vivo: PREFIX owl: PREFIX foaf: CONSTRUCT { ?agent _:adminRole . _:adminRole a vivo:AdministratorRole . _:adminRole ?agent . _:adminRole vivo:relatedBy ?grant . ?grant vivo:relates _:adminRole . ?grant vivo:relates ?agent . ?agent vivo:relatedBy ?grant . } WHERE { { ?agent vivo:administers ?grant } UNION { ?grant vivo:administeredBy ?agent FILTER NOT EXISTS { ?agent vivo:administers ?grant } } FILTER NOT EXISTS { ?agent ?adminRoleNode . ?adminRoleNode a vivo:AdministratorRole . ?adminRoleNode vivo:relatedBy ?grant . } }