SemanticTypesService sts = registry.getSemanticTypesService(); try { List typeList = sts.getAvailableImageTypes(); for(Iterator iter = typeList.iterator(); iter.hasNext();) { SemanticType st = (SemanticType)iter.next(); System.err.println(st.getName()); } } catch(DSOutOfServiceException dso) { dso.printStackTrace(); UserNotifier un = registry.getUserNotifier(); un.notifyError("Connection Error",dso.getMessage(),dso); } catch(DSAccessException dsa) { dsa.printStackTrace(); UserNotifier un = registry.getUserNotifier(); un.notifyError("Server Error",dsa.getMessage(),dsa); }
    public void setContext(Registry ctx)    {        this.registry = ctx;        this.eventBus = ctx.getEventBus();        this.tf = ctx.getTopFrame();                Boolean extractionMode = (Boolean)registry.lookup(THUMBNAIL_MODE_KEY);        this.useServerThumbs = extractionMode.booleanValue();                Integer thumbWidth = (Integer)registry.lookup(THUMBNAIL_WIDTH_KEY);        Integer thumbHeight = (Integer)registry.lookup(THUMBNAIL_HEIGHT_KEY);                this.thumbnailWidth = 120;//thumbWidth.intValue();        this.thumbnailHeight = 120;//thumbHeight.intValue();                eventBus.register(this,LoadDataset.class);                JMenuItem testItem = new JMenuItem("Browser");        testItem.addActionListener(new ActionListener()        {            public void actionPerformed(ActionEvent ae)            {                Integer dummyID = (Integer)registry.lookup(DUMMY_DATASET_KEY);                loadDataset(dummyID.intValue());            }        });                tf.addToMenu(TopFrame.VIEW,testItem);        testItem.setEnabled(true);    }