Authorizations authorizations = getUserRepository().getAuthorizations(user, UserRepository.VISIBILITY_STRING, WorkspaceRepository.VISIBILITY_STRING, workspaceId);
InputStream in = new FileInputStream(outFile);
try {
graphRestore.restore(graph, in, authorizations);
Vertex workspaceVertex = this.workspaceRepository.getVertex(workspaceId, user);
this.workspaceRepository.addWorkspaceToUser(workspaceVertex, userVertex, authorizations);
} finally {
graph.flush();