@Test public void testFindParserFactory() { GetFeatureType request = WfsFactory.eINSTANCE.createGetFeatureType(); request.setOutputFormat("application/fakeFormat"); WFSResponseParserFactory factory = WFSExtensions.findParserFactory(request); assertNotNull(factory); assertTrue(factory instanceof TestParserFactory); }
static WFSResponseParserFactory findParserFactory(EObject request) { Iterator<WFSResponseParserFactory> serviceProviders; serviceProviders = getServiceProviders(); WFSResponseParserFactory factory; while (serviceProviders.hasNext()) { factory = serviceProviders.next(); if (factory.isAvailable()) { if (factory.canProcess(request)) { return factory; } } } throw new FactoryNotFoundException("Can't find a response parser factory for " + request); }
WFSExtensions { static WFSResponseParserFactory findParserFactory(EObject request) { Iterator<WFSResponseParserFactory> serviceProviders; serviceProviders = getServiceProviders(); WFSResponseParserFactory factory; while (serviceProviders.hasNext()) { factory = serviceProviders.next(); if (factory.isAvailable()) { if (factory.canProcess(request)) { return factory; } } } throw new FactoryNotFoundException("Can't find a response parser factory for " + request); } }
WFSExtensions { static WFSResponseParserFactory findParserFactory(EObject request) { Iterator<WFSResponseParserFactory> serviceProviders; serviceProviders = getServiceProviders(); WFSResponseParserFactory factory; while (serviceProviders.hasNext()) { factory = serviceProviders.next(); if (factory.isAvailable()) { if (factory.canProcess(request)) { return factory; } } } throw new FactoryNotFoundException("Can't find a response parser factory for " + request); }  }
WFSExtensions { static WFSResponseParserFactory findParserFactory(EObject request) { Iterator<WFSResponseParserFactory> serviceProviders; serviceProviders = getServiceProviders(); WFSResponseParserFactory factory; while (serviceProviders.hasNext()) { factory = serviceProviders.next(); if (factory.isAvailable()) { if (factory.canProcess(request)) { return factory; } } } throw new FactoryNotFoundException("Can't find a response parser factory for " + request); }  static Object process(WFSNGDataStore wfs, WFSResponse response); }
WFSExtensions { static WFSResponseParserFactory findParserFactory(EObject request) { Iterator<WFSResponseParserFactory> serviceProviders; serviceProviders = getServiceProviders(); WFSResponseParserFactory factory; while (serviceProviders.hasNext()) { factory = serviceProviders.next(); if (factory.isAvailable()) { if (factory.canProcess(request)) { return factory; } } } throw new FactoryNotFoundException("Can't find a response parser factory for " + request); }  static Object process(WFSNGDataStore wfs, WFSResponse response);  }