Examples of LayerIdentifier


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

Examples of org.geoserver.catalog.impl.LayerIdentifier

        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

Examples of org.geoserver.catalog.impl.LayerIdentifier

        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

Examples of org.geoserver.catalog.impl.LayerIdentifier

    @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

Examples of org.geoserver.catalog.impl.LayerIdentifier

    @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

Examples of org.geoserver.catalog.impl.LayerIdentifier

    @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

Examples of org.geoserver.catalog.impl.LayerIdentifier

            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

Examples of org.geoserver.catalog.impl.LayerIdentifier

            setConvertedInput(null);
            return;
        }

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

Examples of org.geoserver.wms.featureinfo.LayerIdentifier

        int maxFeatures = request.getFeatureCount();
        List<LayerIdentifier> identifiers = GeoServerExtensions.extensions(LayerIdentifier.class);
        for (int i = 0; i < requestedLayers.size(); i++) {
            final MapLayerInfo layer = requestedLayers.get(i);

            LayerIdentifier identifier = getLayerIdentifier(layer, identifiers);
            List<FeatureCollection> identifiedCollections = identifier.identify(requestParams,
                    maxFeatures);
            if (identifiedCollections != null) {
                for (FeatureCollection identifierCollection : identifiedCollections) {
                    FeatureCollection fc = selectProperties(requestParams, identifierCollection);
                    maxFeatures = addToResults(fc, results, layer, request, maxFeatures);
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.