// if ( update.getUsing().size() > 0 || update.getUsingNamed().size() > 0 )
// Log.warn(this, "Graph selection from the dataset not supported very well") ;
// //return null ;
DatasetGraphMap dsg = new DatasetGraphMap(graphStore) ;
if ( update.getUsing().size() > 0 )
{
if ( update.getUsing().size() > 1 )
{
// Lack of scaling here
// Need to take a copy to merge.
Graph g = GraphFactory.createGraphMem() ;
for ( Node gn : update.getUsing() )
{
Graph g2 = graphStore.getGraph(gn) ;
g.getBulkUpdateHandler().add(g2) ;
}
dsg.setDefaultGraph(g) ;
}
else
{
Node gn = update.getUsing().get(0) ;
dsg.setDefaultGraph(graphStore.getGraph(gn)) ;
}
}
if ( update.getUsingNamed().size() > 0 )
{
// Replace with a no named graphs version.
dsg = new DatasetGraphMap(dsg.getDefaultGraph()) ;
for ( Node gn : update.getUsingNamed() )
dsg.addGraph(gn, graphStore.getGraph(gn)) ;
}
return dsg ;
}