Package fr.soleil.salsa.entity

Examples of fr.soleil.salsa.entity.IConfig


     */
    @Override
    public void startScan(String path, IContext context) throws SalsaDeviceException,
            ScanNotFoundException, IOException {
        ConfigDAO dao = new ConfigDAO();
        IConfig c = dao.getConfigByPath(path);
        startScan(c, context);
    }
View Full Code Here


     * @param fullPath
     * @return
     * @throws ScanNotFoundException
     */
    public IConfig getConfigByPath(String fullPath) throws ScanNotFoundException {
        IConfig c = configDao.getConfigByPath(fullPath);
        return c;
    }
View Full Code Here

        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(true));

        // Config1DModel m = mapper.map(c, Config1DModel.class);
        IConfig m = (IConfig) mapper.map(c, Object.class);
        return m;
    }
View Full Code Here

        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(false));

        // Config1DImpl m = mapper.map(c, Config1DImpl.class);
        IConfig m = (IConfig) mapper.map(c, Object.class);
        return m;
    }
View Full Code Here

    public void setSelection(ATreeNode treeNode) {
        innerSelection = true;
        int nbRows = configTree.getRowCount();
        TreePath treePath;
        boolean select;
        IConfig config1;
        IConfig config2;
        for (int rowIndex = 0; rowIndex < nbRows; ++rowIndex) {
            treePath = configTree.getPathForRow(rowIndex);
            ATreeNode searchNode = (ATreeNode) ((DefaultMutableTreeNode) treePath
                    .getLastPathComponent()).getUserObject();
            select = treeNode.equals(searchNode);
View Full Code Here

    public void addSelection(ATreeNode treeNode) {
        innerSelection = true;
        int nbRows = configTree.getRowCount();
        TreePath treePath;
        boolean select;
        IConfig config1;
        IConfig config2;
        for (int rowIndex = 0; rowIndex < nbRows; ++rowIndex) {
            treePath = configTree.getPathForRow(rowIndex);
            ATreeNode searchNode = (ATreeNode) ((DefaultMutableTreeNode) treePath
                    .getLastPathComponent()).getUserObject();
            select = treeNode.equals(searchNode);
View Full Code Here

    public void setMultipleSelection(List<ATreeNode> multipleSelection) {
        innerSelection = true;
        int nbRows = configTree.getRowCount();
        TreePath treePath;
        boolean select;
        IConfig config1;
        IConfig config2;
        for (int rowIndex = 0; rowIndex < nbRows; ++rowIndex) {
            treePath = configTree.getPathForRow(rowIndex);
            ATreeNode searchNode = (ATreeNode) ((DefaultMutableTreeNode) treePath
                    .getLastPathComponent()).getUserObject();
            select = false;
View Full Code Here

            if (value instanceof DefaultMutableTreeNode) {
                DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
                if (node.getUserObject() != null && node.getUserObject() instanceof ConfigTreeNode) {

                    IConfig c = ((ConfigTreeNode) node.getUserObject()).getConfig();
                    String iconKey = "";

                    ScanType st = c.getType();
                    if (st == ScanType.SCAN_1D) {
                        iconKey = "salsa.scanconfig.1d.big";
                    }
                    else if (st == ScanType.SCAN_2D) {
                        iconKey = "salsa.scanconfig.2d.big";
View Full Code Here

       
        List<Configuration> configs = getConfigList();

        for (Configuration c : configs) {
            String type = c.getType();
            IConfig scan = null;
            if (type.equals("Config1DImpl") || type.equals("Config1D")) {
                scan = new ConfigImpl(); // new Config1D();
                scan.setType(IConfig.ScanType.SCAN_1D);
            } else if(type.equals("Config2DImpl") || type.equals("Config2D")) {
                scan = new ConfigImpl(); // new Config1D();
                scan.setType(IConfig.ScanType.SCAN_2D);
            } else if(type.equals("ConfigHCSImpl") || type.equals("ConfigHCS")) {
                scan = new ConfigImpl();
                scan.setType(IConfig.ScanType.SCAN_HCS);
            } else if(type.equals("ConfigKImpl") || type.equals("ConfigK")) {
                scan = new ConfigImpl();
                scan.setType(IConfig.ScanType.SCAN_K);
            } else if(type.equals("ConfigEnergyImpl") || type.equals("ConfigEnergy")) {
                scan = new ConfigImpl();
                scan.setType(IConfig.ScanType.SCAN_ENERGY);
            }
            else if(type.equals("ConfigEnergy")) {
                scan = new ConfigEnergyImpl();
                scan.setType(IConfig.ScanType.SCAN_ENERGY);
            }
            /*
             * else if (type.equals("Config2D")) { scan = new Config2D(); } else
             * if (type.equals("ConfigK")) { scan = new ConfigK(); } else if
             * (type.equals("ConfigEnergy")) { scan = new ConfigEnergy(); } else
             * if (type.equals("ConfigHCS")) { scan = new ConfigHCS(); }
             */
            scan.setName(c.getName());
            scan.setId(c.getId());
            scan.setTimestamp(c.getTimestamp());

            int directoryId = c.getDirectoryId();// scan.getDirectory().getId();
            IDirectory directory = ht.get(directoryId);
            scan.setDirectory(directory);
            directory.getConfigList().add(scan);
        }

        return root;
    }
View Full Code Here

        }

        List<IConfig> configs = _d.getConfigList();
        Iterator<IConfig> i2 = configs.iterator();
        while (i2.hasNext()) {
            IConfig config = i2.next();
            System.out.println("/" + _d.getName() + "/");
            System.out.println(config.getName());
            showScan(config, _depth);
        }
    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.IConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.