RexsterApplicationGraph { static Graph unwrapGraph(final Graph g) { return g instanceof WrapperGraph ? unwrapGraph(((WrapperGraph) g).getBaseGraph()) : g; } RexsterApplicationGraph(final String graphName, final Graph graph);  RexsterApplicationGraph(final String graphName, final Graph graph,
                                   final HierarchicalConfiguration graphConfig);  RexsterApplicationGraph(final String graphName, final Graph graph, final List<String> allowableNamespaces,
                                   final List<HierarchicalConfiguration> extensionConfigurations); String getGraphName(); Graph getGraph(); Graph getUnwrappedGraph(); TransactionalGraph tryGetTransactionalGraph(); boolean isTransactionalGraph(); void tryCommit(); void tryRollback(); boolean isExtensionAllowed(final ExtensionSegmentSet extensionSegmentSet); ExtensionConfiguration findExtensionConfiguration(final String namespace, final String extensionName); Set<ExtensionAllowed> getExtensionAllowables(); Set<ExtensionConfiguration> getExtensionConfigurations(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void unwrapGraphNoWrapping() { Graph g = TinkerGraphFactory.createTinkerGraph(); Graph unwrapped = RexsterApplicationGraph.unwrapGraph(g); Assert.assertEquals(g, unwrapped); }
@Test public void unwrapGraphReadonlyWrapping() { Graph tg = TinkerGraphFactory.createTinkerGraph(); Graph g = new ReadOnlyGraph(tg); Graph unwrapped = RexsterApplicationGraph.unwrapGraph(g); Assert.assertEquals(tg, unwrapped); }
@Test public void unwrapGraphEventWrapping() { Graph tg = TinkerGraphFactory.createTinkerGraph(); Graph g = new EventGraph(tg); Graph unwrapped = RexsterApplicationGraph.unwrapGraph(g); Assert.assertEquals(tg, unwrapped); }
@Test public void unwrapGraphReadonlyEventWrapping() { Graph tg = TinkerGraphFactory.createTinkerGraph(); Graph eg = new EventGraph(tg); Graph g = new ReadOnlyGraph(eg); Graph unwrapped = RexsterApplicationGraph.unwrapGraph(g); Assert.assertEquals(tg, unwrapped); }