当前位置: 首页>>代码示例>>Java>>正文


Java Identifier类代码示例

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


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


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