X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Futil%2FModelTransferableGraphSource.java;h=cbd3130eea6d737f2c431b685e47f6c306576399;hb=32c804755176db2bb20f46f6a69a418c46d458f5;hp=8602da82789d97de8830f1927dcd4b5d53c7295b;hpb=a17280d6098511bd9931880460f78d149df1c9e9;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java index 8602da827..cbd3130ee 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java @@ -52,6 +52,7 @@ public class ModelTransferableGraphSource implements TransferableGraphSource { TIntArrayList externalParents = new TIntArrayList(); ArrayList externalNames = new ArrayList(); + TreeMap downloads = new TreeMap(); public ModelTransferableGraphSource(final ReadGraph graph, TransferableGraphConfiguration2 configuration, final DomainProcessorState state, File ... fs) throws DatabaseException { @@ -118,6 +119,8 @@ public class ModelTransferableGraphSource implements TransferableGraphSource { this.resourceCount = state.id; + state.extensions.put(ExternalDownloadBean.EXTENSION_KEY, new Variant(ExternalDownloadBean.BINDING, new ExternalDownloadBean(downloads))); + } int indent = 0; @@ -200,6 +203,11 @@ public class ModelTransferableGraphSource implements TransferableGraphSource { state.ids.put(r, state.id); // Ensure that this resource is included into the set of externals to maintain the total number of externals state.externals.add(r); + String download = graph.getPossibleRelatedValue(res, L0.Ontology_download, Bindings.STRING); + if(download != null) { + String uri = graph.getURI(res); + downloads.put(uri, download); + } return state.id++; } }