Package org.geowebcache.layer.meta

Examples of org.geowebcache.layer.meta.LayerMetaInformation


        }

        str.append("      <Name>" + layer.getName() + "</Name>\n");

        if (layer.getMetaInformation() != null) {
            LayerMetaInformation metaInfo = layer.getMetaInformation();
            str.append("      <Title>" + metaInfo.getTitle() + "</Title>\n");
            str.append("      <Abstract>" + metaInfo.getDescription() + "</Abstract>\n");
        } else {
            str.append("      <Title>" + layer.getName() + "</Title>\n");
        }

        Iterator<GridSubset> gridSetIter = layer.getGridSubsets().values().iterator();
View Full Code Here


            String title = layer.getTitle();

            String description = layer.get_abstract();

            LayerMetaInformation layerMetaInfo = null;
            if (title != null || description != null) {
                layerMetaInfo = new LayerMetaInformation(title, description, null, null);
            }
            boolean queryable = layer.isQueryable();

            if (name != null) {
                List<StyleImpl> styles = layer.getStyles();
View Full Code Here

         str.append("</Contents>\n");
     }
    
     private void layer(StringBuilder str, TileLayer layer, String baseurl) {
        str.append("  <Layer>\n");
        LayerMetaInformation layerMeta = layer.getMetaInformation();

        if (layerMeta == null) {
            appendTag(str, "    ", "ows:Title", layer.getName(), null);
        } else {
            appendTag(str, "    ", "ows:Title", layerMeta.getTitle(), null);
            appendTag(str, "    ", "ows:Abstract", layerMeta.getDescription(), null);
        }

        layerWGS84BoundingBox(str, layer);
        appendTag(str, "    ", "ows:Identifier", layer.getName(), null);
       
View Full Code Here

            throw new RuntimeException(e);
        }
    }
   
    private String tileMapTitle(TileLayer tl) {
        LayerMetaInformation metaInfo = tl.getMetaInformation();
        if(metaInfo != null && metaInfo.getTitle() != null) {
            return metaInfo.getTitle();
        }
       
        return tl.getName();
    }
View Full Code Here

        }
       
        return tl.getName();
    }
    private String tileMapDescription(TileLayer tl) {
        LayerMetaInformation metaInfo = tl.getMetaInformation();
        if(metaInfo != null && metaInfo.getDescription() != null) {
            return metaInfo.getDescription();
        }
       
        return "";
    }
View Full Code Here

    @Test
    public void testGetMetaInformation() {
        layerInfoTileLayer = new GeoServerTileLayer(layerInfo, defaults, gridSetBroker);
        layerGroupInfoTileLayer = new GeoServerTileLayer(layerGroup, defaults, gridSetBroker);

        LayerMetaInformation metaInformation = layerInfoTileLayer.getMetaInformation();
        assertNotNull(metaInformation);
        String title = metaInformation.getTitle();
        String description = metaInformation.getDescription();
        List<String> keywords = metaInformation.getKeywords();
        assertEquals(layerInfo.getResource().getTitle(), title);
        assertEquals(layerInfo.getResource().getAbstract(), description);
        assertEquals(layerInfo.getResource().getKeywords().size(), keywords.size());
        for (String kw : keywords) {
            assertTrue(layerInfo.getResource().getKeywords().contains(new Keyword(kw)));
        }

        metaInformation = layerGroupInfoTileLayer.getMetaInformation();
        assertNotNull(metaInformation);
        title = metaInformation.getTitle();
        description = metaInformation.getDescription();
        keywords = metaInformation.getKeywords();
        // these properties are missing from LayerGroupInfo interface
        assertEquals("Group title", title);
        assertEquals("Group abstract", description);
       
        assertEquals(0, keywords.size());
View Full Code Here

     *
     * @see org.geowebcache.layer.TileLayer#getMetaInformation()
     */
    @Override
    public LayerMetaInformation getMetaInformation() {
        LayerMetaInformation meta = null;
        String title = getName();
        String description = "";
        List<String> keywords = Collections.emptyList();
        List<ContactInformation> contacts = Collections.emptyList();

        ResourceInfo resourceInfo = getResourceInfo();
        if (resourceInfo != null) {
            title = resourceInfo.getTitle();
            description = resourceInfo.getAbstract();
            keywords = new ArrayList<String>();
            for (KeywordInfo kw : resourceInfo.getKeywords()) {
                keywords.add(kw.getValue());
            }
        } else {
            LayerGroupInfo lg = getLayerGroupInfo();
            if(lg != null) {
                if (lg != null) {
                    if(lg.getTitle() != null) {
                        title = lg.getTitle();
                    }
                    if(lg.getAbstract() != null) {
                        description = lg.getAbstract();
                    }
                }
            }
        }
        meta = new LayerMetaInformation(title, description, keywords, contacts);
        return meta;
    }
View Full Code Here

            String title = layer.getTitle();

            String description = layer.get_abstract();

            LayerMetaInformation layerMetaInfo = null;
            if (title != null || description != null) {
                layerMetaInfo = new LayerMetaInformation(title, description, null, null);
            }
            boolean queryable = layer.isQueryable();

            if (name != null) {
                List<StyleImpl> styles = layer.getStyles();
View Full Code Here

         xml.endElement("Contents");
     }
    
     private void layer(XMLBuilder xml, TileLayer layer, String baseurl) throws IOException {
        xml.indentElement("Layer");
        LayerMetaInformation layerMeta = layer.getMetaInformation();

        if (layerMeta == null) {
            appendTag(xml, "ows:Title", layer.getName(), null);
        } else {
            appendTag(xml, "ows:Title", layerMeta.getTitle(), null);
            appendTag(xml, "ows:Abstract", layerMeta.getDescription(), null);
        }

        layerWGS84BoundingBox(xml, layer);
        appendTag(xml, "ows:Identifier", layer.getName(), null);
       
View Full Code Here

            throw new RuntimeException(e);
        }
    }
   
    private String tileMapTitle(TileLayer tl) {
        LayerMetaInformation metaInfo = tl.getMetaInformation();
        if(metaInfo != null && metaInfo.getTitle() != null) {
            return metaInfo.getTitle();
        }
       
        return tl.getName();
    }
View Full Code Here

TOP

Related Classes of org.geowebcache.layer.meta.LayerMetaInformation

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.