Package mil.nga.giat.geowave.vector.adapter

Examples of mil.nga.giat.geowave.vector.adapter.FeatureDataAdapter$TimeDescriptors


          password,
          statsNamespace);
      final AccumuloAdapterStore statsAdapterStore = new AccumuloAdapterStore(
          statsOperations);
      for (int level = minLevel; level <= maxLevel; level++) {
        final FeatureDataAdapter featureAdapter = new FeatureDataAdapter(
            ComparisonAccumuloStatsReducer.createFeatureType(AccumuloKDEReducer.getTypeName(
                level,
                statsName)));
        if (!statsAdapterStore.adapterExists(featureAdapter.getAdapterId())) {
          statsAdapterStore.addAdapter(featureAdapter);
        }
      }
      final AccumuloIndexStore statsIndexStore = new AccumuloIndexStore(
          statsOperations);
View Full Code Here


    index = IndexType.SPATIAL_VECTOR.createDefaultIndex();
    final IndexStore indexStore = new MemoryIndexStore(
        new Index[] {
          index
        });
    adapter = new FeatureDataAdapter(
        type);
    final AdapterStore adapterStore = new MemoryAdapterStore(
        new DataAdapter[] {
          new FeatureDataAdapter(
              type)
        });
    final AccumuloOptions options = new AccumuloOptions();
    options.setPersistDataStatistics(false);
    // TODO consider an in memory statistics store that will write the
View Full Code Here

      final SimpleFeatureType featureType ) {
    if (featureType.getGeometryDescriptor() == null) {
      throw new UnsupportedOperationException(
          "Schema missing geometry");
    }
    final FeatureDataAdapter adapter = new FeatureDataAdapter(
        featureType,
        getVisibilityManagement());
    if (featureNameSpaceURI != null) {
      adapter.setNamespace(featureNameSpaceURI.toString());
    }

    adapterStore.addAdapter(adapter);
    getPreferredIndex(adapter);
  }
View Full Code Here

  @Override
  protected FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader(
      final String typeName,
      final Query query )
      throws IOException {
    final FeatureDataAdapter adapter = getAdapter(query.getTypeName());

    if (adapter == null) {
      LOGGER.warn("GeoWave Feature Data Adapter of type '" + query.getTypeName() + "' not found.  Cannot create Feature Reader.");
      return null;
    }
View Full Code Here

  @Override
  public SimpleFeatureSource getFeatureSource(
      final String typeName ) {

    final FeatureDataAdapter adapter = getAdapter(typeName);
    if (adapter == null) {
      LOGGER.warn("GeoWave Feature Data Adapter of type '" + typeName + "' not found.  Cannot create Feature Source.");
      return null;
    }
    return new GeoWaveFeatureSource(
View Full Code Here

  }

  private FeatureDataAdapter getAdapter(
      final String typeName ) {
    final SimpleFeatureType statsFeatureType = getDefaultSchema(typeName);
    final FeatureDataAdapter featureAdapter;
    if (statsFeatureType != null) {
      featureAdapter = new FeatureDataAdapter(
          statsFeatureType,
          getVisibilityManagement());
    }
    else {
      final DataAdapter<?> adapter = adapterStore.getAdapter(new ByteArrayId(
          StringUtils.stringToBinary(typeName)));
      if ((adapter == null) || !(adapter instanceof FeatureDataAdapter)) {
        return null;
      }
      featureAdapter = (FeatureDataAdapter) adapter;
    }
    if (featureNameSpaceURI != null) featureAdapter.setNamespace(featureNameSpaceURI.toString());
    // else
    // featureAdapter.setNamespace(null);
    return featureAdapter;
  }
View Full Code Here

      final String typeName ) {
    final SimpleFeatureType type = getDefaultSchema(typeName);
    if (type != null) {
      return type;
    }
    final FeatureDataAdapter adapter = getAdapter(typeName);
    if (adapter == null) {
      return null;
    }
    return adapter.getType();
  }
View Full Code Here

  private SimpleFeatureType getDefaultSchema(
      final String typeName ) {
    // TODO add some basic "global" types such as all spatial, or all
    // spatial temporal
    final FeatureDataAdapter adapter = getStatsAdapter(typeName);
    if (adapter != null) {
      final SimpleFeatureType type = adapter.getType();
      final String nameSpace = featureNameSpaceURI != null ? featureNameSpaceURI.toString() : type.getName().getNamespaceURI();

      return new SimpleFeatureTypeImpl(
          new NameImpl(
              nameSpace,
View Full Code Here

      final SimpleFeatureType featureType ) {
    if (featureType.getGeometryDescriptor() == null) {
      throw new UnsupportedOperationException(
          "Schema modification not supported");
    }
    final FeatureDataAdapter oldAdaptor = getAdapter(typeName);
    final SimpleFeatureType oldFeatureType = oldAdaptor.getType();
    for (final AttributeDescriptor descriptor : oldFeatureType.getAttributeDescriptors()) {
      final AttributeDescriptor newDescriptor = featureType.getDescriptor(descriptor.getLocalName());
      if ((newDescriptor == null) || !newDescriptor.getType().equals(
          descriptor.getType())) {
        throw new UnsupportedOperationException(
            "Removal or changing the type of schema attributes is not supported");
      }
    }
    final FeatureDataAdapter adapter = new FeatureDataAdapter(
        featureType,
        getVisibilityManagement());

    adapterStore.addAdapter(adapter);
  }
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.vector.adapter.FeatureDataAdapter$TimeDescriptors

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.