Examples of IDataSourceProducer


Examples of fr.soleil.data.service.IDataSourceProducer

            this.keys[i] = (keys[i] == null ? null : keys[i].clone());
        }

        int i = 0;
        for (IKey key : this.keys) {
            final IDataSourceProducer dataSourceProducer = DataSourceProducerProvider.getProducer(key
                    .getSourceProduction());
            try {

                AbstractDataSource<?> genericDataSource = ((AbstractRefreshingManager<?>) dataSourceProducer)
                        .createDataSource(key, false, true);
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

        }
    }

    public void setRefreshTime(int refreshTime) {
        this.refreshTime = refreshTime;
        IDataSourceProducer producer = DataSourceProducerProvider
                .getProducer(TangoDataSourceFactory.SOURCE_PRODUCER_ID);
        // Do not supporte the refreshing service under 1000 ms
        if (refreshTime > 1000) {
            if (producer instanceof AbstractRefreshingManager<?>) {
                ((AbstractRefreshingManager<?>) producer).setDefaultRefreshingStrategy(new PolledRefreshingStrategy(
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

                        }

                        String logMessage = "connection failed for";

                        // First, Connect plugins
                        final IDataSourceProducer producer = DataSourceProducerProvider
                                .getProducer(key.getSourceProduction());

                        initPlugins(producer, source, widget);

                        computeDefaultToolTip(widget, key);
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

     * @return the desired source
     */
    @SuppressWarnings("unchecked")
    protected static <U> AbstractDataSource<U> getSource(final IKey key) {
        AbstractDataSource<U> result = null;
        final IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key
                .getSourceProduction());
        try {
            if (producer == null) {
                throw new KeyCompatibilityException(key, producer);
            }
            result = (AbstractDataSource<U>) producer.createDataSource(key);
        }
        catch (final Exception e) {
            e.printStackTrace();
        }

View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

        return result;
    }

    private void setRefreshingPeriod(TangoKey key) {
        IDataSourceProducer producer = DataSourceProducerProvider
                .getProducer(TangoDataSourceFactory.SOURCE_PRODUCER_ID);
        if ((producer instanceof AbstractRefreshingManager<?>) && (key != null)) {
            ((AbstractRefreshingManager<?>) producer).setRefreshingStrategy(key, new PolledRefreshingStrategy(100));
        }
    }
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

            public void actionPerformed(ActionEvent e) {
                TangoKey keyData01 = new TangoKey();
                TangoKeyTool.registerAttribute(keyData01, DEVICE, "data_01");
                chartBox.connectWidget(chartViewer, keyData01);
                String id = keyData01.getInformationKey();
                IDataSourceProducer producer = DataSourceProducerProvider
                        .getProducer(TangoDataSourceFactory.SOURCE_PRODUCER_ID);
                int[] shape = producer.getShape(keyData01);
                System.out.println("Shape =" + Arrays.toString(shape));
                for (int i = 0; i < shape[0]; i++) {
                    chartViewer.setDataViewAxis(id + "_" + i, IChartViewer.Y2);
                }
                chartBox.setSplitMatrixThroughColumns(keyData01, false);
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

            applicationIdNumber++;

            //Data source construction
            AbstractDataSource<AbstractNumberMatrix<?>> numberMatrixDataSource = null;

            final IDataSourceProducer producer = DataSourceProducerProvider.
                    getProducer(imageKey.getSourceProduction());

            try {
                numberMatrixDataSource =  (AbstractDataSource<AbstractNumberMatrix<?>>)
                        producer.createDataSource(imageKey);
            } catch (Exception e) {
                Logger.getLogger(Mediator.LOGGER_ACCESS).log(Level.SEVERE,
                        "Failed to create source for key: " + (
                                imageKey == null ? null : imageKey.getInformationKey()), e);
            }
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

            chartBox.connectWidget(chart, chartKey);
        } else {
            //Data source construction
            AbstractDataSource<Number> numberMatrixDataSource = null;

            final IDataSourceProducer producer = DataSourceProducerProvider.
                    getProducer(chartKey.getSourceProduction());

            try {
                numberMatrixDataSource =  (AbstractDataSource<Number>)
                        producer.createDataSource(chartKey);
            } catch (Exception e) {
                Logger.getLogger(Mediator.LOGGER_ACCESS).log(Level.SEVERE,
                        "Failed to create source for key: " +
                (chartKey == null ? null : chartKey.getInformationKey()), e);
            }
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

        } else {

            //Data source construction
            StringAttributeDataSource stringAttributeDataSource = null;

            final IDataSourceProducer producer = DataSourceProducerProvider.
                    getProducer(stringScalarKey.getSourceProduction());
            try {
                stringAttributeDataSource = (StringAttributeDataSource)
                        ((AbstractRefreshingManager<?>) producer).createDataSource(stringScalarKey, false,
                        true);
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

    }

    private void setScalarWidgetModel(IKey attributeKey) {
        setWidgetModel(readNumberField, stringBox, attributeKey);
        setWidgetModel(hiddenTextField, stringBox, attributeKey);
        IDataSourceProducer producer = getProducer();
        if (producer != null) {
            boolean isSettable = producer.isSourceSettable(attributeKey);
            wheelswitch.setVisible(isSettable);
            if (isSettable) {
                attributeKey = generateWriteAttributeKey(attributeName);
                setWidgetModel(wheelswitch, numberScalarBox, attributeKey);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.