}
}
@Override
public NonLiteral getRoleByTitle(String title) {
LockableMGraph systemGraph = getSystemGraph();
Lock readLock = systemGraph.getLock().readLock();
readLock.lock();
try {
Iterator<Triple> triples = systemGraph.filter(null, DC.title,
new PlainLiteralImpl(title));
NonLiteral role = null;
while (triples.hasNext()) {
role = triples.next().getSubject();
if (systemGraph.filter(role, RDF.type, PERMISSION.Role).hasNext()) {
return role;
}
}
} finally {
readLock.unlock();