private static void testGraph(String assemblerFile, boolean named) { Object thing = null ; try { thing = AssemblerUtils.build(assemblerFile, VocabTDB2.tGraphTDB) ; } catch (AssemblerException e) { e.getCause().printStackTrace(System.err) ; throw e ; } assertTrue(thing instanceof Model) ; Graph graph = ((Model)thing).getGraph() ; assertTrue(graph instanceof GraphViewSwitchable) ; DatasetGraphSwitchable dsg = ((GraphViewSwitchable)graph).getDataset(); if ( dsg != null ) dsg.close() ; } }
private static void testGraph(String assemblerFile, boolean named) { Object thing = null ; try { thing = AssemblerUtils.build(assemblerFile, VocabTDB2.tGraphTDB) ; } catch (AssemblerException e) { e.getCause().printStackTrace(System.err) ; throw e ; } assertTrue(thing instanceof Model) ; Graph graph = ((Model)thing).getGraph() ; assertTrue(graph instanceof GraphViewSwitchable) ; DatasetGraphSwitchable dsg = ((GraphViewSwitchable)graph).getDataset(); if ( dsg != null ) dsg.close() ; } }
@Test public void createGraphEmbed() { String f = dirAssem + "/tdb-graph-embed.ttl" ; Object thing = null ; try { thing = AssemblerUtils.build(f, JA.Model) ; } catch (AssemblerException e) { e.getCause().printStackTrace(System.err) ; throw e ; } assertTrue(thing instanceof Model) ; Graph graph = ((Model)thing).getGraph() ; assertTrue(graph instanceof GraphViewSwitchable) ; DatasetGraphSwitchable ds = ((GraphViewSwitchable)graph).getDataset() ; if ( ds != null ) ds.close() ; }
@Test public void createGraphEmbed() { String f = dirAssem + "/tdb-graph-embed.ttl" ; Object thing = null ; try { thing = AssemblerUtils.build(f, JA.Model) ; } catch (AssemblerException e) { e.getCause().printStackTrace(System.err) ; throw e ; } assertTrue(thing instanceof Model) ; Graph graph = ((Model)thing).getGraph() ; assertTrue(graph instanceof GraphViewSwitchable) ; DatasetGraphSwitchable ds = ((GraphViewSwitchable)graph).getDataset() ; if ( ds != null ) ds.close() ; }