Package org.geoserver.catalog.impl

Examples of org.geoserver.catalog.impl.AuthorityURL


    }

    @Test
    public void testPropertyEqualsIndexed() {

        AuthorityURLInfo aurl1 = new AuthorityURL();
        aurl1.setName("url1");
        AuthorityURLInfo aurl2 = new AuthorityURL();
        aurl2.setName("url2");
        AuthorityURLInfo aurl3 = new AuthorityURL();
        aurl3.setName("url3");
        vectorLayer.setAuthorityURLs(Arrays.asList(aurl1, aurl2, aurl3));

        assertTrue(equal("authorityURLs[1]", aurl1).evaluate(vectorLayer));
        assertTrue(equal("authorityURLs[1].name", aurl1.getName()).evaluate(vectorLayer));

        assertTrue(equal("authorityURLs[2]", aurl2).evaluate(vectorLayer));
        assertTrue(equal("authorityURLs[2].name", aurl2.getName()).evaluate(vectorLayer));

        assertTrue(equal("authorityURLs[3]", aurl3).evaluate(vectorLayer));
        assertTrue(equal("authorityURLs[3].name", aurl3.getName()).evaluate(vectorLayer));
    }
View Full Code Here


import org.w3c.dom.Document;

public class CapabilitiesAuthorityURLAndIdentifierTest extends WMSTestSupport {

    private void addAuthUrl(final String name, final String url, List<AuthorityURLInfo> target) {
        AuthorityURLInfo auth = new AuthorityURL();
        auth.setName(name);
        auth.setHref(url);
        target.add(auth);
    }
View Full Code Here

import org.w3c.dom.Document;

public class CapabilitiesAuthorityURLAndIdentifierTest extends WMSTestSupport {

    private void addAuthUrl(final String name, final String url, List<AuthorityURLInfo> target) {
        AuthorityURLInfo auth = new AuthorityURL();
        auth.setName(name);
        auth.setHref(url);
        target.add(auth);
    }
View Full Code Here

    @Test
    public void testFromString() {
        final String serialized = "[{\"name\":\"auth1\",\"href\":\"http://geoserver.org/auth1?\"},{\"name\":\"auth2\",\"href\":\"http://geoserver.org/auth2;someparam=somevalue&\"}]";
        List<AuthorityURLInfo> expected = new ArrayList<AuthorityURLInfo>();

        AuthorityURLInfo auth1 = new AuthorityURL();
        auth1.setName("auth1");
        auth1.setHref("http://geoserver.org/auth1?");
        expected.add(auth1);

        AuthorityURLInfo auth2 = new AuthorityURL();
        auth2.setName("auth2");
        auth2.setHref("http://geoserver.org/auth2;someparam=somevalue&");
        expected.add(auth2);

        List<AuthorityURLInfo> actual;
        actual = AuthorityURLInfoInfoListConverter.fromString(serialized);
View Full Code Here

    @Test
    public void testToString() {
        List<AuthorityURLInfo> list = new ArrayList<AuthorityURLInfo>();

        AuthorityURLInfo auth1 = new AuthorityURL();
        auth1.setName("auth1");
        auth1.setHref("http://geoserver.org/auth1?");
        list.add(auth1);

        AuthorityURLInfo auth2 = new AuthorityURL();
        auth2.setName("auth2");
        auth2.setHref("http://geoserver.org/auth2;someparam=somevalue&");
        list.add(auth2);

        String actual = AuthorityURLInfoInfoListConverter.toString(list);
        String expected = "[{\"name\":\"auth1\",\"href\":\"http://geoserver.org/auth1?\"},{\"name\":\"auth2\",\"href\":\"http://geoserver.org/auth2;someparam=somevalue&\"}]";
        assertEquals(expected, actual);
View Full Code Here

    @Test
    public void testToStringListWithNullElement() {
        List<AuthorityURLInfo> list = new ArrayList<AuthorityURLInfo>();

        AuthorityURLInfo auth1 = new AuthorityURL();
        auth1.setName("auth1");
        auth1.setHref("http://geoserver.org/auth1?");
        list.add(auth1);

        list.add(null);

        String actual = AuthorityURLInfoInfoListConverter.toString(list);
View Full Code Here

            final int size = array.size();
            List<AuthorityURLInfo> list = new ArrayList<AuthorityURLInfo>(size);
            JSONObject jsonAuth;
            for (int i = 0; i < size; i++) {
                jsonAuth = array.getJSONObject(i);
                AuthorityURL auth = new AuthorityURL();
                auth.setName(jsonAuth.getString(NAME));
                auth.setHref(jsonAuth.getString(HREF));
                list.add(auth);
            }
            return list;
        } catch (JSONException e) {
            throw new IllegalArgumentException(e.getMessage(), e);
View Full Code Here

            private static final long serialVersionUID = 1L;

            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                List<AuthorityURLInfo> list = authorityURLs.getModelObject();
                AuthorityURLInfo authorityURL = new AuthorityURL();
                list.add(authorityURL);
                authorityURLs.setModelObject(list);
                AuthorityURLListEditor.this.convertInput();
                updateLinksVisibility();
                target.addComponent(container);
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.impl.AuthorityURL

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.