Package org.geoserver.gss.CentralRevisionsType

Examples of org.geoserver.gss.CentralRevisionsType.LayerRevision


                SimpleFeature record = getLastSynchronizationRecord(typeName);
                long revision = -1;
                if (record != null) {
                    revision = ((Number) record.getAttribute("central_revision")).longValue();
                }
                cr.getLayerRevisions().add(new LayerRevision(typeName, revision));
            }

            return cr;
        } catch (IOException e) {
            throw new GSSException("Could not compute the response", e);
View Full Code Here


        CentralRevisionsType cr = (CentralRevisionsType) parse(GSS.CentralRevisionsType);
       
        List<LayerRevision> layerRevisions = cr.getLayerRevisions();
        assertEquals(2, layerRevisions.size());
       
        LayerRevision layerRevision = layerRevisions.get(0);
        assertEquals("archsites", layerRevision.getTypeName().getLocalPart());
        assertEquals(SF_NAMESPACE, layerRevision.getTypeName().getNamespaceURI());
        assertEquals(15, layerRevision.getCentralRevision());
       
        layerRevision = layerRevisions.get(1);
        assertEquals("restricted", layerRevision.getTypeName().getLocalPart());
        assertEquals(SF_NAMESPACE, layerRevision.getTypeName().getNamespaceURI());
        assertEquals(22, layerRevision.getCentralRevision());
    }
View Full Code Here

        assertEquals(22, layerRevision.getCentralRevision());
    }
   
    public void testEncode() throws Exception {
        CentralRevisionsType cr = new CentralRevisionsType();
        cr.getLayerRevisions().add(new LayerRevision(new QName(SF_NAMESPACE, "archsites"), 15));
       
        Document doc = encode(cr, GSS.CentralRevisions);
        // print(doc);
        assertXpathEvaluatesTo("1", "count(//gss:CentralRevisions/gss:LayerRevision)", doc);
        assertXpathEvaluatesTo("sf:archsites", "//gss:CentralRevisions/gss:LayerRevision/@typeName", doc);
View Full Code Here

        CentralRevisionsType cr = (CentralRevisionsType) parse(GSS.CentralRevisionsType);
       
        List<LayerRevision> layerRevisions = cr.getLayerRevisions();
        assertEquals(2, layerRevisions.size());
       
        LayerRevision layerRevision = layerRevisions.get(0);
        assertEquals("archsites", layerRevision.getTypeName().getLocalPart());
        assertEquals(SF_NAMESPACE, layerRevision.getTypeName().getNamespaceURI());
        assertEquals(15, layerRevision.getCentralRevision());
       
        layerRevision = layerRevisions.get(1);
        assertEquals("restricted", layerRevision.getTypeName().getLocalPart());
        assertEquals(SF_NAMESPACE, layerRevision.getTypeName().getNamespaceURI());
        assertEquals(22, layerRevision.getCentralRevision());
    }
View Full Code Here

        assertEquals(22, layerRevision.getCentralRevision());
    }
   
    public void testEncode() throws Exception {
        CentralRevisionsType cr = new CentralRevisionsType();
        cr.getLayerRevisions().add(new LayerRevision(new QName(SF_NAMESPACE, "archsites"), 15));
       
        Document doc = encode(cr, GSS.CentralRevisions);
        // print(doc);
        assertXpathEvaluatesTo("1", "count(//gss:CentralRevisions/gss:LayerRevision)", doc);
        assertXpathEvaluatesTo("sf:archsites", "//gss:CentralRevisions/gss:LayerRevision/@typeName", doc);
View Full Code Here

                SimpleFeature record = getLastSynchronizationRecord(typeName);
                long revision = -1;
                if (record != null) {
                    revision = ((Number) record.getAttribute("central_revision")).longValue();
                }
                cr.getLayerRevisions().add(new LayerRevision(typeName, revision));
            }

            return cr;
        } catch (IOException e) {
            throw new GSSException("Could not compute the response", e);
View Full Code Here

TOP

Related Classes of org.geoserver.gss.CentralRevisionsType.LayerRevision

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.