import org.osgi.service.prefs.Preferences;
import org.simantics.databoard.binding.mutable.Variant;
import org.simantics.databoard.type.RecordType;
import org.osgi.service.prefs.Preferences;
import org.simantics.databoard.binding.mutable.Variant;
import org.simantics.databoard.type.RecordType;
for ( final Resource model : resources ) {
// TODO: figure out a way to make the TG go directly into a file
// instead of having it all in memory at once.
for ( final Resource model : resources ) {
// TODO: figure out a way to make the TG go directly into a file
// instead of having it all in memory at once.
public SimanticsClipboard perform(ReadGraph graph) throws DatabaseException {
CopyHandler ch = graph.adapt( model, CopyHandler.class );
SimanticsClipboardImpl clipboard = new SimanticsClipboardImpl();
public SimanticsClipboard perform(ReadGraph graph) throws DatabaseException {
CopyHandler ch = graph.adapt( model, CopyHandler.class );
SimanticsClipboardImpl clipboard = new SimanticsClipboardImpl();
for (Set<Representation> object : clipboard.getContents()) {
TransferableGraph1 tg = ClipboardUtils.accept(object, SimanticsKeys.KEY_TRANSFERABLE_GRAPH);
writer.writeFile(TransferableGraph1.BINDING, tg);
for (Set<Representation> object : clipboard.getContents()) {
TransferableGraph1 tg = ClipboardUtils.accept(object, SimanticsKeys.KEY_TRANSFERABLE_GRAPH);
writer.writeFile(TransferableGraph1.BINDING, tg);