Examples of NumberToStringDataAdapter


Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

    @SuppressWarnings("unchecked")
    @Override
    protected AbstractDataAdapter<U, T> createAdapter(AbstractDataSource<U> source) {
        if (targetType.equals(String.class) && sourceType.equals(Number.class)
                && source.getDataType().getConcernedClass().equals(Number.class)) {
            return (AbstractDataAdapter<U, T>) new NumberToStringDataAdapter(
                    (AbstractDataSource<Number>) source);
        }
        else {
            return super.createAdapter(source);
        }
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

     * @param source The {@link AbstractDataSource}
     * @return The corresponding {@link NumberToStringDataAdapter}, or <code>null</code> is there is
     *         no such adapter
     */
    public NumberToStringDataAdapter getAdapter(AbstractDataSource<U> source) {
        NumberToStringDataAdapter result = null;
        AbstractDataAdapter<U, T> adapter = adapters.get(source);
        if (adapter instanceof NumberToStringDataAdapter) {
            result = (NumberToStringDataAdapter) adapter;
        }
        return result;
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

    }

    @Override
    protected List<AbstractPlugin<?>> initPlugins(AbstractDataSource<?> source) {
        List<AbstractPlugin<?>> result = super.initPlugins(source);
        NumberToStringDataAdapter numberAdapter = getNumberAdapter(source);
        if (numberAdapter != null) {
            FormatPlugin foundedPlugin = null;
            for (AbstractPlugin<?> plugin : result) {
                if (plugin instanceof FormatPlugin) {
                    foundedPlugin = (FormatPlugin) plugin;
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

        for (AbstractController<?> controller : getUsedControllers()) {
            sources.addAll(controller.getSourceList());
        }
        List<NumberToStringDataAdapter> adapters = new ArrayList<NumberToStringDataAdapter>();
        for (AbstractDataSource<?> source : sources) {
            NumberToStringDataAdapter adapter = getNumberAdapter(source);
            if (adapter != null) {
                adapters.add(adapter);
            }
        }
        sources.clear();
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

        adapters.clear();
    }

    @SuppressWarnings("unchecked")
    protected NumberToStringDataAdapter getNumberAdapter(AbstractDataSource<?> source) {
        NumberToStringDataAdapter result = null;
        if ((numberController != null) && (source.getDataType() != null)
                && Number.class.equals(source.getDataType().getConcernedClass())) {
            result = numberController.getAdapter((AbstractDataSource<Number>) source);
        }
        return result;
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

    @Override
    protected void initPlugins(IDataSourceProducer producer, AbstractDataSource<?> source,
            ITextTarget target) {
        super.initPlugins(producer, source, target);
        NumberToStringDataAdapter numberAdapter = getNumberAdapter(source);
        if (numberAdapter != null) {
            FormatPlugin foundedPlugin = getPlugin(target, FormatPlugin.class);
            if (foundedPlugin != null) {
                try {
                    foundedPlugin.addPlugin(source.getOriginDescriptor(), numberAdapter);
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

    @Override
    protected void filterPlugins(final List<AbstractPlugin<?>> plugins,
            final IDataSourceProducer producer, final AbstractDataSource<?> source,
            final ITextTarget target) {
        final List<AbstractPlugin<?>> toRemove = new ArrayList<AbstractPlugin<?>>();
        NumberToStringDataAdapter numberAdapter = getNumberAdapter(source);
        for (final AbstractPlugin<?> plugin : plugins) {
            boolean connectionState;
            try {
                plugin.setFirstInitAllowed(firstInitAllowed);
                connectionState = plugin.addPlugin(producer, source.getOriginDescriptor(), target)
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

        for (AbstractController<?> controller : getUsedControllers()) {
            sources.addAll(controller.getSourceList());
        }
        List<NumberToStringDataAdapter> adapters = new ArrayList<NumberToStringDataAdapter>();
        for (AbstractDataSource<?> source : sources) {
            NumberToStringDataAdapter adapter = getNumberAdapter(source);
            if (adapter != null) {
                adapters.add(adapter);
            }
        }
        sources.clear();
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

        adapters.clear();
    }

    @SuppressWarnings("unchecked")
    protected NumberToStringDataAdapter getNumberAdapter(AbstractDataSource<?> source) {
        NumberToStringDataAdapter result = null;
        if ((numberController != null) && (source.getDataType() != null)
                && Number.class.equals(source.getDataType().getConcernedClass())) {
            result = numberController.getAdapter((AbstractDataSource<Number>) source);
        }
        return result;
View Full Code Here

Examples of fr.soleil.data.adapter.NumberToStringDataAdapter

    @Override
    protected void initPlugins(IDataSourceProducer producer, AbstractDataSource<?> source,
            ITextTarget target) {
        super.initPlugins(producer, source, target);
        NumberToStringDataAdapter numberAdapter = getNumberAdapter(source);
        if (numberAdapter != null) {
            FormatPlugin foundedPlugin = getPlugin(target, FormatPlugin.class);
            if (foundedPlugin != null) {
                try {
                    foundedPlugin.addPlugin(source.getOriginDescriptor(), numberAdapter);
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.