/**
* Returns a graph that is the union of specified graphs. By convention, the first graph mentioned will be used for add operations on the union. All other operations will apply to all graphs in the union. If no graphs are supplied, the union of all graphs is assumed, and add operations apply to the default graph.
* @param graphs the graphs in the union
* @return the union of the specified graphs
*/
public AGGraphUnion createUnion(AGGraph... graphs){
Set<Resource> contexts=new HashSet<Resource>();
for ( AGGraph g : graphs) {
contexts.addAll(Arrays.asList(g.getGraphContexts()));
}
Resource context=null;
if (graphs.length > 0) {
context=graphs[0].getGraphContext();
}
return new AGGraphUnion(this,context,contexts.toArray(new Resource[contexts.size()]));
}

Example 24

From project Aion-Extreme, under directory /AE-go_DataPack/loginserver/data/scripts/system/database/mysql5/.