+ Variant edbVariant = tg.extensions.get(ExternalDownloadBean.EXTENSION_KEY);
+ if(edbVariant != null) {
+ try {
+ ExternalDownloadBean edb = (ExternalDownloadBean)edbVariant.getValue(ExternalDownloadBean.BINDING);
+ for(Map.Entry<String, String> entry : edb.downloads.entrySet()) {
+ String uri = entry.getKey();
+ Resource existing = session.syncRequest(new PossibleResource(uri));
+ if(existing == null) {
+ String download = entry.getValue();
+ URL url = new URL(download);
+ DataContainer container = DataContainers.readFile(new DataInputStream(url.openStream()));
+ TransferableGraph1 dependencyTg = (TransferableGraph1) container.content.getValue(TransferableGraph1.BINDING);
+ importSharedOntology(monitor, session, dependencyTg, true);
+ }
+ }
+ } catch (AdaptException e) {
+ throw new DatabaseException(e);
+ } catch (MalformedURLException e) {
+ throw new DatabaseException(e);
+ } catch (IOException e) {
+ throw new DatabaseException(e);
+ }
+
+ }
+