Package net.opengis.wfs

Examples of net.opengis.wfs.FeatureCollectionType


    assertEquals(5, synchronizer.getNumRounds());
  }
 
  @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);
View Full Code Here


    assertEquals(5, synchronizer.getNumRounds());
  }
 
  @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);
View Full Code Here

    assertEquals(5, synchronizer.getNumRounds());
  }
 
  @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);
View Full Code Here

  }

  @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);
View Full Code Here

    assertEquals(1, synchronizer.getNumRounds());
  }

  @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);
View Full Code Here

    assertEquals(2, synchronizer.getNumRounds());
  }
 
  @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);
View Full Code Here

        Assert.isTrue(value instanceof FeatureCollectionType, "unrecognized result type:");
        Assert.isTrue(operation.getParameters() != null && operation.getParameters().length == 1
                && operation.getParameters()[0] instanceof GetFeatureInfoRequest);

        GetFeatureInfoRequest request = (GetFeatureInfoRequest) operation.getParameters()[0];
        FeatureCollectionType results = (FeatureCollectionType) value;
        GetFeatureInfoOutputFormat outputFormat = getRequestedOutputFormat(request);

        outputFormat.write(results, request, output);
    }
View Full Code Here

    @Override
    public void write(FeatureCollectionType results, GetFeatureInfoRequest fInfoReq,
            OutputStream out) throws ServiceException, IOException {

        // the 'response' object we'll pass to our OutputFormat
        FeatureCollectionType features = WfsFactory.eINSTANCE.createFeatureCollectionType();

        // the 'request' object we'll pass to our OutputFormat
        GetFeatureType gfreq = WfsFactory.eINSTANCE.createGetFeatureType();
        gfreq.setBaseUrl(fInfoReq.getBaseUrl());
       
        for (int i=0; i < results.getFeature().size(); i++) {
           
            FeatureCollection fc = (FeatureCollection) results.getFeature().get(i);
            Name name = FeatureCollectionDecorator.getName(fc);
            QName qname = new QName(name.getNamespaceURI(), name.getLocalPart());
                     
            features.getFeature().add(fc);

            QueryType qt = WfsFactory.eINSTANCE.createQueryType();
                       
            qt.setTypeName(Collections.singletonList(qname));
           
View Full Code Here

      List<Expression> args = new ArrayList<Expression>();
      args.add(ff.literal(m_atts));
      args.add(ff.literal(m_json));
      m_filter.setParameters(args);
     
      FeatureCollectionType serverResp = applyFilter(m_server, m_filter);
     
      TestResponseFeatureCollection respFeatureCollection = new TestResponseFeatureCollection();
      respFeatureCollection.setFeatureCollection((FeatureCollection<?, ?>)serverResp.getFeature().get(0));
      return respFeatureCollection;
    }
    if (m_outputFormat.equals("SyncChecksum")) {
      ByteArrayOutputStream output = new ByteArrayOutputStream();
      FeatureCollectionSha1Sync sha1Sync = new FeatureCollectionSha1Sync(output);
View Full Code Here

      }
    } finally {
      Sha1SyncFilterFunction.clearThreadLocals();
      iterator.close();
    }
    FeatureCollectionType serverResp = make(filtered.toArray(new Feature[filtered.size()]));
    return serverResp;
  }
View Full Code Here

TOP

Related Classes of net.opengis.wfs.FeatureCollectionType

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.