Graph readWriteGraph = graphConfigInstance.configureGraphInstance(context);
if (isReadOnly) {
// the graph is configured to be readonly so wrap it up
if (readWriteGraph instanceof IndexableGraph) {
graph = new ReadOnlyIndexableGraph((IndexableGraph) readWriteGraph);
} else {
graph = new ReadOnlyGraph(readWriteGraph);
}
} else {
graph = readWriteGraph;