Examples of SuggestionCategoryImpl


Examples of fr.soleil.salsa.entity.impl.SuggestionCategoryImpl

            return categories;
        }

        String SEPARATOR = "::";

        SuggestionCategoryImpl currentCategory = null;
        for (String line : data) {
            String[] tab = line.split(SEPARATOR);
            if (tab == null || tab.length != 3) {
                break;
            }
            String level = tab[0];
            String label = tab[1];
            String attribute = tab[2];
            if ("menu".equals(level)) {
                currentCategory = new SuggestionCategoryImpl();
                currentCategory.setSuggestionList(new ArrayList<ISuggestionItem>());
                currentCategory.setLabel(label);
                categories.add(currentCategory);
            }
            else if ("submenu".equals(level)) {
                if (currentCategory != null) {
                    SuggestionItemImpl suggestion = new SuggestionItemImpl();
                    suggestion.setLabel(label);
                    suggestion.setValue(attribute);
                    currentCategory.getSuggestionList().add(suggestion);
                }
                else {
                    System.err.println("Error : Scan server ('" + scanserver + "') property '"
                            + property + "' provide with unexpected format");
                }
View Full Code Here

Examples of fr.soleil.salsa.entity.impl.SuggestionCategoryImpl

            return categories;
        }

        String SEPARATOR = "::";

        SuggestionCategoryImpl currentCategory = null;
        for (String line : data) {
            String[] tab = line.split(SEPARATOR);
            if (tab == null || tab.length != 3) {
                break;
            }
            String level = tab[0];
            String label = tab[1];
            String attribute = tab[2];
            if ("menu".equals(level)) {
                currentCategory = new SuggestionCategoryImpl();
                currentCategory.setSuggestionList(new ArrayList<ISuggestionItem>());
                currentCategory.setLabel(label);
                categories.add(currentCategory);
            }
            else if ("submenu".equals(level)) {
                if (currentCategory != null) {
                    SuggestionItemImpl suggestion = new SuggestionItemImpl();
                    suggestion.setLabel(label);
                    suggestion.setValue(attribute);
                    currentCategory.getSuggestionList().add(suggestion);
                }
                else {
                    System.err.println("Error : Scan server ('" + scanserver + "') property '"
                            + property + "' provide with unexpected format");
                }
View Full Code Here

Examples of fr.soleil.salsa.entity.impl.SuggestionCategoryImpl

            return categories;
        }

        String SEPARATOR = "::";

        SuggestionCategoryImpl currentCategory = null;
        for (String line : data) {
            String[] tab = line.split(SEPARATOR);
            if (tab == null || tab.length != 3) {
                break;
            }
            String level = tab[0];
            String label = tab[1];
            String attribute = tab[2];
            if ("menu".equals(level)) {
                currentCategory = new SuggestionCategoryImpl();
                currentCategory.setSuggestionList(new ArrayList<ISuggestionItem>());
                currentCategory.setLabel(label);
                categories.add(currentCategory);
            } else if ("submenu".equals(level)) {
                if (currentCategory != null) {
                    SuggestionItemImpl suggestion = new SuggestionItemImpl();
                    suggestion.setLabel(label);
                    suggestion.setValue(attribute);
                    currentCategory.getSuggestionList().add(suggestion);
                } else {
                    System.err.println("Error : Scan server ('" + scanserver + "') property '" + property
                            + "' provide with unexpected format");
                }
            }
View Full Code Here

Examples of fr.soleil.salsa.entity.impl.SuggestionCategoryImpl

            return categories;
        }

        String SEPARATOR = "::";

        SuggestionCategoryImpl currentCategory = null;
        for (String line : data) {
            String[] tab = line.split(SEPARATOR);
            if (tab == null || tab.length != 3) {
                break;
            }
            String level = tab[0];
            String label = tab[1];
            String attribute = tab[2];
            if ("menu".equals(level)) {
                currentCategory = new SuggestionCategoryImpl();
                currentCategory.setSuggestionList(new ArrayList<ISuggestionItem>());
                currentCategory.setLabel(label);
                categories.add(currentCategory);
            }
            else if ("submenu".equals(level)) {
                if (currentCategory != null) {
                    SuggestionItemImpl suggestion = new SuggestionItemImpl();
                    suggestion.setLabel(label);
                    suggestion.setValue(attribute);
                    currentCategory.getSuggestionList().add(suggestion);
                }
                else {
                    System.err.println("Error : Scan server ('" + scanserver + "') property '"
                            + property + "' provide with unexpected format");
                }
View Full Code Here

Examples of fr.soleil.salsa.entity.impl.SuggestionCategoryImpl

            return categories;
        }

        String SEPARATOR = "::";

        SuggestionCategoryImpl currentCategory = null;
        for (String line : data) {
            String[] tab = line.split(SEPARATOR);
            if (tab == null || tab.length != 3) {
                break;
            }
            String level = tab[0];
            String label = tab[1];
            String attribute = tab[2];
            if ("menu".equals(level)) {
                currentCategory = new SuggestionCategoryImpl();
                currentCategory.setSuggestionList(new ArrayList<ISuggestionItem>());
                currentCategory.setLabel(label);
                categories.add(currentCategory);
            }
            else if ("submenu".equals(level)) {
                if (currentCategory != null) {
                    SuggestionItemImpl suggestion = new SuggestionItemImpl();
                    suggestion.setLabel(label);
                    suggestion.setValue(attribute);
                    currentCategory.getSuggestionList().add(suggestion);
                }
                else {
                    System.err.println("Error : Scan server ('" + scanserver + "') property '"
                            + property + "' provide with unexpected format");
                }
View Full Code Here

Examples of fr.soleil.salsa.entity.impl.SuggestionCategoryImpl

            return categories;
        }

        String SEPARATOR = "::";

        SuggestionCategoryImpl currentCategory = null;
        for (String line : data) {
            String[] tab = line.split(SEPARATOR);
            if (tab == null || tab.length != 3) {
                break;
            }
            String level = tab[0];
            String label = tab[1];
            String attribute = tab[2];
            if ("menu".equals(level)) {
                currentCategory = new SuggestionCategoryImpl();
                currentCategory.setSuggestionList(new ArrayList<ISuggestionItem>());
                currentCategory.setLabel(label);
                categories.add(currentCategory);
            }
            else if ("submenu".equals(level)) {
                if (currentCategory != null) {
                    SuggestionItemImpl suggestion = new SuggestionItemImpl();
                    suggestion.setLabel(label);
                    suggestion.setValue(attribute);
                    currentCategory.getSuggestionList().add(suggestion);
                }
                else {
                    System.err.println("Error : Scan server ('" + scanserver + "') property '"
                            + property + "' provide with unexpected format");
                }
View Full Code Here

Examples of fr.soleil.salsa.entity.impl.SuggestionCategoryImpl

        List<ISuggestionCategory> categories = new ArrayList<ISuggestionCategory>();

        if ((data != null) && (data.length > 0)) {
            String SEPARATOR = "::";

            SuggestionCategoryImpl currentCategory = null;
            for (String line : data) {
                String[] tab = line.split(SEPARATOR);
                if ((tab == null) || (tab.length != 3)) {
                    break;
                }
                String level = tab[0];
                String label = tab[1];
                String attribute = tab[2];
                if ("menu".equals(level)) {
                    currentCategory = new SuggestionCategoryImpl();
                    currentCategory.setSuggestionList(new ArrayList<ISuggestionItem>());
                    currentCategory.setLabel(label);
                    categories.add(currentCategory);
                } else if ("submenu".equals(level)) {
                    if (currentCategory != null) {
                        SuggestionItemImpl suggestion = new SuggestionItemImpl();
                        suggestion.setLabel(label);
                        suggestion.setValue(attribute);
                        currentCategory.getSuggestionList().add(suggestion);
                    } else {
                        String errorMessage = "Scan server ('" + scanserver + "') property '" + property
                        + "' provide with unexpected format";
                        LOGGER.warn(errorMessage);
                    }
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.