Examples of LabelValue


Examples of org.itnaf.model.LabelValue

    public Map getCountries(Locale locale) {
        final String EMPTY = "";
        final Locale[] available = Locale.getAvailableLocales();

        List countries = new ArrayList();
        countries.add(new LabelValue("",""));

        for (int i = 0; i < available.length; i++) {
            final String iso = available[i].getCountry();
            final String name = available[i].getDisplayCountry(locale);

            if (!EMPTY.equals(iso) && !EMPTY.equals(name)) {
                LabelValue country = new LabelValue(name, iso);

                if (!countries.contains(country)) {
                    countries.add(new LabelValue(name, iso));
                }
            }
        }

        Collections.sort(countries, new LabelValueComparator(locale));
       
        Map options = new LinkedHashMap();
        // loop through and convert list to a JSF-Friendly Map for a <select>
        for (Iterator it = countries.iterator(); it.hasNext();) {
            LabelValue option = (LabelValue) it.next();
            if (!options.containsValue(option.getValue())) {
                options.put(option.getLabel(), option.getValue());
            }
        }

        return options;
    }
View Full Code Here

Examples of org.itnaf.model.LabelValue

         * @param o2 The second LabelValue to compare.
         *
         * @return The value returned by comparing the localized labels.
         */
        public final int compare(Object o1, Object o2) {
            LabelValue lhs = (LabelValue) o1;
            LabelValue rhs = (LabelValue) o2;

            return c.compare(lhs.getLabel(), rhs.getLabel());
        }
View Full Code Here

Examples of org.neo4j.cypherdsl.query.LabelValue

        return new Path( node, relationship, nodePropertyValues, new LabelValues( labels ) );
    }

    public Path label( String label )
    {
        return new Path( node, relationship, nodePropertyValues, new LabelValue( identifier(label) ) );
    }
View Full Code Here

Examples of org.neo4j.cypherdsl.query.LabelValue

        return new Path( node, relationship, nodePropertyValues, new LabelValue( identifier(label) ) );
    }

    public Path label( Identifier label )
    {
        return new Path( node, relationship, nodePropertyValues, new LabelValue( label ) );
    }
View Full Code Here

Examples of org.neo4j.cypherdsl.query.LabelValue

     * @param label literal value
     * @return Label instance
     */
    public static LabelValue label( String label )
    {
        return new LabelValue( identifier( label ) );
    }
View Full Code Here

Examples of org.neo4j.cypherdsl.query.LabelValue

     * @param label literal value
     * @return Label instance
     */
    public static LabelValue label( Identifier label )
    {
        return new LabelValue( label );
    }
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.