Package org.geoserver.catalog

Examples of org.geoserver.catalog.KeywordInfo


    @Override
    public Object nullSafeGet(ResultSet rs, String[] names, Object owner)
            throws HibernateException, SQLException {

        String srsNameStyle = rs.getString(names[0]);
        KeywordInfo kwInfo = srsNameStyle == null ? null : fromString(srsNameStyle);
        return kwInfo;
    }
View Full Code Here


    @Override
    public void nullSafeSet(PreparedStatement st, Object value, int index)
            throws HibernateException, SQLException {

        KeywordInfo kwInfo = (KeywordInfo) value;

        if (kwInfo == null) {
            st.setNull(index, Types.VARCHAR);
        } else {
            String storedValue = toString(kwInfo);
View Full Code Here

        if (!m.matches()) {
            throw new IllegalArgumentException(String.format(
                    "%s does not match regular expression: %s", str, RE));
        }

        KeywordInfo kw = new Keyword(m.group(1));
        if (m.group(2) != null) {
            kw.setLanguage(m.group(2));
        }
        if (m.group(3) != null) {
            kw.setVocabulary(m.group(3));
        }
        return kw;
    }
View Full Code Here

            public void onSubmit(AjaxRequestTarget target, Form form) {
                String value = newKeyword.getInput();
                String lang = langChoice.getInput();
                String vocab = vocabTextField.getInput();
               
                KeywordInfo keyword = new Keyword(value);
                if (lang != null && !"".equals(lang.trim())) {
                    keyword.setLanguage(lang);
                }
                if (vocab != null && !"".equals(vocab.trim())) {
                    keyword.setVocabulary(vocab);
                }
               
                List choiceList = choices.getChoices();
                choiceList.add(keyword);
                choices.setChoices(choiceList);
View Full Code Here

            @Override
            public void onSubmit(AjaxRequestTarget target, Form form) {
                List selection = (List) choices.getModelObject();
                List keywords = choices.getChoices();
                for (Iterator it = selection.iterator(); it.hasNext();) {
                    KeywordInfo selected = (KeywordInfo) it.next();
                    keywords.remove(selected);
                }
                choices.setChoices(keywords);
                choices.modelChanged();
                target.addComponent(choices);
View Full Code Here

            if (!m.matches()) {
                throw new IllegalArgumentException(
                    String.format("%s does not match regular expression: %s", str, RE));
            }

            KeywordInfo kw = new Keyword(m.group(1));
            if (m.group(2) != null) {
                kw.setLanguage(m.group(2));
            }
            if (m.group(3) != null) {
                kw.setVocabulary(m.group(3));
            }
            return kw;
        }
View Full Code Here

            return kw;
        }

        @Override
        public String toString(Object obj) {
            KeywordInfo kw = (KeywordInfo) obj;
           
            StringBuilder sb = new StringBuilder();
            sb.append(kw.getValue());
            if (kw.getLanguage() != null) {
                sb.append("\\@language=").append(kw.getLanguage()).append("\\;");
            }
            if (kw.getVocabulary() != null) {
                sb.append("\\@vocabulary=").append(kw.getVocabulary()).append("\\;");
            }
            return sb.toString();
        }
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.KeywordInfo

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.