Package org.geoserver.catalog

Examples of org.geoserver.catalog.AuthorityURLInfo


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

            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

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof AuthorityURLInfo)) {
            return false;
        }
        AuthorityURLInfo oa = (AuthorityURLInfo) o;
        return Utilities.equals(name, oa.getName()) && Utilities.equals(href, oa.getHref());
    }
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.AuthorityURLInfo

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.