Package org.geoserver.catalog.impl

Examples of org.geoserver.catalog.impl.LayerIdentifier


            final int size = array.size();
            List<LayerIdentifierInfo> list = new ArrayList<LayerIdentifierInfo>(size);
            JSONObject jsonAuth;
            for (int i = 0; i < size; i++) {
                jsonAuth = array.getJSONObject(i);
                LayerIdentifier id = new LayerIdentifier();
                id.setAuthority(jsonAuth.getString(AUTHORITY));
                id.setIdentifier(jsonAuth.getString(IDENTIFIER));
                list.add(id);
            }
            return list;
        } catch (JSONException e) {
            throw new IllegalArgumentException(e.getMessage(), e);
View Full Code Here


        target.add(auth);
    }

    private void addIdentifier(final String authName, final String id,
            List<LayerIdentifierInfo> target) {
        LayerIdentifierInfo identifier = new LayerIdentifier();
        identifier.setAuthority(authName);
        identifier.setIdentifier(id);
        target.add(identifier);
    }
View Full Code Here

        target.add(auth);
    }

    private void addIdentifier(final String authName, final String id,
            List<LayerIdentifierInfo> target) {
        LayerIdentifierInfo identifier = new LayerIdentifier();
        identifier.setAuthority(authName);
        identifier.setIdentifier(id);
        target.add(identifier);
    }
View Full Code Here

    @Test
    public void testFromString() {
        final String serialized = "[{\"authority\":\"auth1\",\"identifier\":\"IDENTIFIER_1\"},{\"authority\":\"auth2\",\"identifier\":\"IDENTIFIER_2\"}]";
        List<LayerIdentifierInfo> expected = new ArrayList<LayerIdentifierInfo>();

        LayerIdentifierInfo id1 = new LayerIdentifier();
        id1.setAuthority("auth1");
        id1.setIdentifier("IDENTIFIER_1");
        expected.add(id1);

        LayerIdentifierInfo id2 = new LayerIdentifier();
        id2.setAuthority("auth2");
        id2.setIdentifier("IDENTIFIER_2");
        expected.add(id2);

        List<LayerIdentifierInfo> actual;
        actual = LayerIdentifierInfoListConverter.fromString(serialized);
       
View Full Code Here

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

        LayerIdentifierInfo id1 = new LayerIdentifier();
        id1.setAuthority("auth1");
        id1.setIdentifier("IDENTIFIER_1");
        list.add(id1);

        LayerIdentifierInfo id2 = new LayerIdentifier();
        id2.setAuthority("auth2");
        id2.setIdentifier("IDENTIFIER_2");
        list.add(id2);

        String actual = LayerIdentifierInfoListConverter.toString(list);
        System.out.println(actual);
        String expected = "[{\"authority\":\"auth1\",\"identifier\":\"IDENTIFIER_1\"},{\"authority\":\"auth2\",\"identifier\":\"IDENTIFIER_2\"}]";
View Full Code Here

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

        LayerIdentifierInfo id1 = new LayerIdentifier();
        id1.setAuthority("auth1");
        id1.setIdentifier("IDENTIFIER_1");
        list.add(id1);

        list.add(null);

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

            private static final long serialVersionUID = 1L;

            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                List<LayerIdentifierInfo> list = identifiers.getModelObject();
                LayerIdentifierInfo newIdentifier = new LayerIdentifier();
                list.add(newIdentifier);
                identifiers.setModelObject(list);
                updateLinksVisibility();
                target.addComponent(LayerIdentifierListEditor.this);
            }
View Full Code Here

            setConvertedInput(null);
            return;
        }

        if (info == null) {
            info = new LayerIdentifier();
            setModelObject(info);
        }
        info.setAuthority(auth);
        info.setIdentifier(id);
        setConvertedInput(info);
View Full Code Here

TOP

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

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.