• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Identifier类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.opengis.filter.identity.Identifier的典型用法代码示例。如果您正苦于以下问题:Java Identifier类的具体用法?Java Identifier怎么用?Java Identifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Identifier类属于org.opengis.filter.identity包,在下文中一共展示了Identifier类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: randomDelete

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
private void randomDelete() {
//		m_scheduler.execute(new Runnable() {
//			@Override
//			public void run() {
				Random random = new Random();
				Set<Identifier> keys = new HashSet<Identifier>(m_features.keySet());
				int n = 0;
				for (Identifier key : keys) {
					if (random.nextDouble() < 0.5) {
						m_features.remove(key);
						n++;
					}
				}
				System.out.println("deleted: " + n);
//			}
//		});
	}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:18,代码来源:SampleClient.java


示例2: test_Client0_with_Server3

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
	public void test_Client0_with_Server3() throws IOException, SAXException, ParserConfigurationException, ParseException {
//		GeoserverClientSynchronizer.TRACE_POST = new PrintStream(new FileOutputStream("run.log"));
//		FeatureCollectionSha1Sync.TRACE_RESPONSE = GeoserverClientSynchronizer.TRACE_POST;
		
		FeatureCollectionType client = make();		
		FeatureCollectionType server = make(f("F1", 0), f("F2", 1), f("F3", 2));
		
		GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
		Map<Identifier, FeatureAccessor> clientMap = asMap(client);
		
		RequestBuilder builder = new SimulatedRequestBuilder(server);
		synchronizer.setRequestBuilder(builder);
		synchronizer.synchronize(clientMap);
		
		assertEquals(3, clientMap.size());
		check(clientMap, 0, "F1");
		check(clientMap, 1, "F2");
		check(clientMap, 2, "F3");
		assertEquals(3, synchronizer.getNumCreates());
		assertEquals(0, synchronizer.getNumUpdates());
		assertEquals(0, synchronizer.getNumDeletes());
		assertEquals(2, synchronizer.getNumRounds());
	}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:25,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例3: testSameSets_3

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void testSameSets_3() throws IOException, SAXException, ParserConfigurationException, ParseException {
	FeatureCollectionType client = make(f("F1", 0), f("F2", 1), f("F3", 2));
	FeatureCollectionType server = make(f("F1", 0), f("F2", 1), f("F3", 2));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);
	
	assertEquals(3, clientMap.size());
	check(clientMap, 0, "F1");
	check(clientMap, 1, "F2");
	check(clientMap, 2, "F3");
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(1, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:22,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例4: test_Client3_with_Server0

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client3_with_Server0() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make(f("F1", 0), f("F2", 1), f("F3", 2));
	FeatureCollectionType server = make();
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);

	assertEquals(0, clientMap.size());
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(3, synchronizer.getNumDeletes());
	assertEquals(1, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:19,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例5: test_Client0_with_Server0

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client0_with_Server0() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make();
	FeatureCollectionType server = make();
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);

	assertEquals(0, clientMap.size());
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(1, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:19,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例6: test_Client0_with_Server1

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client0_with_Server1() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make();
	FeatureCollectionType server = make(f("F1", 0));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);

	assertEquals(1, clientMap.size());
	assertEquals(1, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(2, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:19,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例7: test_Client1_with_Server0

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client1_with_Server0() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make(f("F1", 0));
	FeatureCollectionType server;
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	server = make();
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);

	assertEquals(0, clientMap.size());
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(1, synchronizer.getNumDeletes());
	assertEquals(1, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:20,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例8: test_Client1_with_Server1_Updated

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client1_with_Server1_Updated() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make(f("F1", 0));
	FeatureCollectionType server = make(f("F1", 1));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);

	assertEquals(1, clientMap.size());
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(1, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(2, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:19,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例9: test_Client1_with_Server1_DifferentKey

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client1_with_Server1_DifferentKey() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make(f("F1", 0));
	FeatureCollectionType server = make(f("F2", 1));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);

	assertEquals(1, clientMap.size());
	assertEquals(1, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(1, synchronizer.getNumDeletes());
	assertEquals(2, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:19,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例10: test_Client1_with_Server1_Same

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client1_with_Server1_Same() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make(f("F1", 0));
	FeatureCollectionType server;
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	server = make(f("F1", 0));
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);

	assertEquals(1, clientMap.size());
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(1, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:20,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例11: test_Client0_with_Server1K

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client0_with_Server1K() throws IOException, SAXException, ParserConfigurationException, ParseException {
	FeatureCollectionType client = make();		
	FeatureCollectionType server = make(makeManyFeatures(1000));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);
	
	assertEquals(1000, clientMap.size());
	check(clientMap, 0, "fid.0");
	check(clientMap, 1, "fid.1");
	check(clientMap, 2, "fid.2");
	check(clientMap, 999, "fid.999");
	assertEquals(1000, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(4, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:23,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例12: test_Client0_with_Server5K

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client0_with_Server5K() throws IOException, SAXException, ParserConfigurationException, ParseException {
	int N = 5000;
	FeatureCollectionType client = make();		
	FeatureCollectionType server = make(makeManyFeatures(N));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);
	
	assertEquals(N, clientMap.size());
	check(clientMap, 0, "fid.0");
	check(clientMap, 1, "fid.1");
	check(clientMap, 2, "fid.2");
	check(clientMap, 4999, "fid.4999");
	assertEquals(N, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(4, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:24,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例13: test_Client0_with_Server10K

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client0_with_Server10K() throws IOException, SAXException, ParserConfigurationException, ParseException {
	FeatureCollectionType client = make();		
	FeatureCollectionType server = make(makeManyFeatures(10000));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);
	
	assertEquals(10000, clientMap.size());
	check(clientMap, 0, "fid.0");
	check(clientMap, 1, "fid.1");
	check(clientMap, 2, "fid.2");
	check(clientMap, 9999, "fid.9999");
	assertEquals(10000, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(5, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:23,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例14: test_Client70K_with_Server100K

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client70K_with_Server100K() throws IOException, SAXException, ParserConfigurationException, ParseException {
	FeatureCollectionType client = make(makeManyFeatures(70000));		
	FeatureCollectionType server = make(makeManyFeatures(100000));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);
	
	assertEquals(100000, clientMap.size());
	check(clientMap, 0, "fid.0");
	check(clientMap, 1, "fid.1");
	check(clientMap, 2, "fid.2");
	check(clientMap, 99999, "fid.99999");
	assertEquals(30000, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(5, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:23,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例15: test_Client100K_with_Server70K

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client100K_with_Server70K() throws IOException, SAXException, ParserConfigurationException, ParseException {
	FeatureCollectionType client = make(makeManyFeatures(100000));		
	FeatureCollectionType server = make(makeManyFeatures(70000));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);
	
	assertEquals(70000, clientMap.size());
	check(clientMap, 0, "fid.0");
	check(clientMap, 1, "fid.1");
	check(clientMap, 2, "fid.2");
	check(clientMap, 69999, "fid.69999");
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(30000, synchronizer.getNumDeletes());
	assertEquals(5, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:23,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例16: test_Client10K_with_Server0

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void test_Client10K_with_Server0() throws IOException, SAXException, ParserConfigurationException, ParseException {
	FeatureCollectionType client = make(makeManyFeatures(10000));		
	FeatureCollectionType server = make();
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);
	
	assertEquals(0, clientMap.size());
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(10000, synchronizer.getNumDeletes());
	assertEquals(1, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:19,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例17: testSameSets_10K

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void testSameSets_10K() throws IOException, SAXException, ParserConfigurationException, ParseException {
	int N = 10000;
	FeatureCollectionType client = make(makeManyFeatures(N));
	FeatureCollectionType server = make(makeManyFeatures(N));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);
	
	assertEquals(N, clientMap.size());
	check(clientMap, 0, "fid.0");
	check(clientMap, 1, "fid.1");
	check(clientMap, 2, "fid.2");
	check(clientMap, 9999, "fid.9999");
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(0, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(1, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:24,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例18: testBulkListenerAdaptor

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void testBulkListenerAdaptor() throws IOException, SAXException, ParserConfigurationException, ParseException {
	FeatureCollectionType client = make(f("U1", 21), f("U2", 22), f("D1", 91), f("D2", 92), f("D3", 93));
	FeatureCollectionType server = make(f("C1", 1), f("C2", 2), f("C3", 3), f("U1", 121), f("U2", 122));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	FeaturesChangedListener target = mock(FeaturesChangedListener.class);
	FeaturesChangedAdaptor adaptor = new FeaturesChangedAdaptor(target);
	synchronizer.setListener(adaptor);
	synchronizer.setRoundListener(adaptor);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	synchronizer.synchronize(clientMap);

	verify(target).featuresCreate(featuresEq(f("C1", 1), f("C2", 2), f("C3", 3)));
	verify(target).featuresUpdate(featuresEq(f("U1", 121), f("U2", 122)));
	verify(target).featuresDelete(featuresEq(f("D1", 91), f("D2", 92), f("D3", 93)));
	
	assertEquals(3, synchronizer.getNumCreates());
	assertEquals(2, synchronizer.getNumUpdates());
	assertEquals(3, synchronizer.getNumDeletes());
	assertEquals(2, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:27,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例19: testAgainstOldServer

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void testAgainstOldServer() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make(f("F1", 0));
	FeatureCollectionType server = make(f("F1", 1));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	SimulatedRequestBuilder builder = new SimulatedRequestBuilder(server);
	builder.forceVersion(VersionFeatures.VERSION1);
	synchronizer.setRequestBuilder(builder);
	try {
		synchronizer.synchronize(clientMap);
		fail("expected exception");
	} catch (IllegalStateException e) {
		assertTrue(true);
	}
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:19,代码来源:GeoserverClientSynchronizerIntegrationTest.java


示例20: testExtraUpdate1

import org.opengis.filter.identity.Identifier; //导入依赖的package包/类
@Test
public void testExtraUpdate1() throws IOException, ParseException, SAXException, ParserConfigurationException {
	FeatureCollectionType client = make(f("F1",162),f("F5",167),f("F4",169),f("F3",168),f("F2",157),f("F6",164));
	FeatureCollectionType server = make(f("F1",162),f("F5",167),f("F4",169),f("F3",170),f("F2",157),f("F6",164));
	
	GeoserverClientSynchronizer synchronizer = new GeoserverClientSynchronizer(makeConfiguration(), "url", SimulatedRequestBuilder.POST_TEMPLATE);
	Map<Identifier, FeatureAccessor> clientMap = asMap(client);
	
	RequestBuilder builder = new SimulatedRequestBuilder(server);
	synchronizer.setRequestBuilder(builder);
	synchronizer.synchronize(clientMap);

	assertEquals(6, clientMap.size());
	assertEquals(0, synchronizer.getNumCreates());
	assertEquals(1, synchronizer.getNumUpdates());
	assertEquals(0, synchronizer.getNumDeletes());
	assertEquals(2, synchronizer.getNumRounds());
}
 
开发者ID:xandris,项目名称:geoserver-sync,代码行数:19,代码来源:ClientSynchronizerStressIntegrationTest.java



注:本文中的org.opengis.filter.identity.Identifier类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SampleListFragment类代码示例发布时间:2022-05-22
下一篇:
Java Client类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap