Package com.moesol.geoserver.sync.json

Examples of com.moesol.geoserver.sync.json.Sha1SyncJson.max()


    m_grouper.groupForLevel(1);
    Sha1SyncJson json = m_grouper.getJson();
   
    assertEquals(1, json.level());
    assertEquals(5, json.hashes().size());
    assertEquals(2, json.max());
  }
 
}
View Full Code Here


      grouper.groupForLevel(m_server.level());
      Sha1SyncJson localSha1SyncJson = grouper.getJson();
     
      Sha1SyncJson outputSha1SyncJson = new Sha1SyncJson().level(m_server.level());
      // Copy over some of the local properties
      outputSha1SyncJson.max(localSha1SyncJson.max());
      outputSha1SyncJson.version(localSha1SyncJson.version());
     
      ClientReconciler recon = new ClientReconciler(localSha1SyncJson, m_server);
      recon.setDelete(m_deleter);
      recon.computeOutput(outputSha1SyncJson);
View Full Code Here

    IdAndValueSha1s pair = new IdAndValueSha1s(idSha1, valueSha1);
    m_featureSha1s.add(pair);
    Sha1Value prefixSha1 = versionFeatures.getBucketPrefixSha1(pair);
   
    Sha1SyncJson remoteSha1Sync = REMOTE_SHA1_SYNC.get();
    if (remoteSha1Sync.max() > 1) {
      return LITERAL_TRUE; // Keep all features, we are not deep enough in search tree
    }
    if (remoteSha1Sync.hashes() == null) {
      return LITERAL_TRUE; // Missing all...
    }
View Full Code Here

   
    assertEquals(0, sync.level());
    assertEquals(1, sync.hashes().size());
    assertEquals("", sync.hashes().get(0).position());
    assertEquals("d3659f943fcdda512093d1c573856e8295201c23", sync.hashes().get(0).summary());
        assertEquals(2L, sync.max());
    }

  @Test
    public void testOutputFormatLevel0() throws Exception {
      // Version 2.0.1 of geoserver does not support : in the format_options value via \\
View Full Code Here

        assertEquals(1, sync.level());
        assertEquals("1b", sync.hashes().get(0).position());
        assertEquals(EXPECTED1_SHA1, sync.hashes().get(0).summary());
        assertEquals("52", sync.hashes().get(1).position());
        assertEquals(EXPECTED2_SHA1, sync.hashes().get(1).summary());
        assertEquals(1L, sync.max());
    }
    @Test
    public void testOutputFormatLevel1() throws Exception {
//      Logger.getLogger("").setLevel(Level.ALL);
//      Logger.getLogger("").getHandlers()[0].setLevel(Level.ALL);
View Full Code Here

        assertEquals(2, sync.hashes().size());
        assertEquals("1bc8", sync.hashes().get(0).position());
        assertEquals(EXPECTED1_SHA1, sync.hashes().get(0).summary());
        assertEquals("5259", sync.hashes().get(1).position());
        assertEquals(EXPECTED2_SHA1, sync.hashes().get(1).summary());
        assertEquals(1L, sync.max());
    }
    @Test
    public void testOutputFormatLevel2() throws Exception {
      // Version 2.0.1 of geoserver does not support : in the format_options value via \\
      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:2}");
View Full Code Here

        assertEquals(2, sync.hashes().size());
        assertEquals("1bc80f", sync.hashes().get(0).position());
        assertEquals(EXPECTED1_SHA1, sync.hashes().get(0).summary());
        assertEquals("525983", sync.hashes().get(1).position());
        assertEquals(EXPECTED2_SHA1, sync.hashes().get(1).summary());
        assertEquals(1L, sync.max());
    }
    @Test
    public void testOutputFormatLevel2_Partial() throws Exception {
      // Version 2.0.1 of geoserver does not support : in the format_options value via \\
      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:2}");
View Full Code Here

        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(3, sync.level());
        assertEquals(1, sync.hashes().size());
        assertEquals("1bc80f", sync.hashes().get(0).position());
        assertEquals(EXPECTED1_SHA1, sync.hashes().get(0).summary());
        assertEquals(1L, sync.max());
    }
    @Test
    public void testOutputFormatLevel2_Empty() throws Exception {
      // Version 2.0.1 of geoserver does not support : in the format_options value via \\
      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:2}");
View Full Code Here

        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
          "&outputFormat=SyncChecksum&format_options=ATTRIBUTES:-all");
        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(3, sync.level());
        assertEquals(0, sync.hashes().size());
        assertEquals(1L, sync.max());
    }
    @Test
    public void testOutputFormat2() throws Exception {
      // Version 2.0.1 of geoserver does not support : in the format_options value via \\
      // "&outputFormat=sha1Sync&format_options=ATTRIBUTES:-all;SYNC:{l\\:-1}");
View Full Code Here

        Sha1SyncJson sync = new Gson().fromJson(result, Sha1SyncJson.class);
        assertEquals(0, sync.level());
        assertEquals(1, sync.hashes().size());
        assertEquals("", sync.hashes().get(0).position());
        assertEquals("103d2f424918116a0e95dffd91f9ca36e1657ad0", sync.hashes().get(0).summary());
        assertEquals(2L, sync.max());
    }
    @Test
    public void testOutputFormat3() throws Exception {
        String result = getAsString("wfs?request=GetFeature&typeName=cite:Buildings" +
            "&outputFormat=SyncChecksum");
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.