/** Creates a new feature id with version information */ public FeatureId featureId(String fid, String featureVersion) { return new FeatureIdVersionedImpl(fid, featureVersion); }
/** Creates a new feature id with version information */ public FeatureId featureId(String fid, String featureVersion){ return new FeatureIdVersionedImpl(fid, featureVersion); }
/** * Builds a {@link Feature} from the provided {@link RevFeature}. * * @param id the id of the new feature * @param revFeature the {@code RevFeature} with the property values for the feature * @return the constructed {@code Feature} */ public Feature build(final String id, final RevFeature revFeature) { Preconditions.checkNotNull(id); Preconditions.checkNotNull(revFeature); final String version = revFeature.getId().toString(); final FeatureId fid = new FeatureIdVersionedImpl(id, version); ImmutableList<Optional<Object>> values = revFeature.getValues(); GeogitSimpleFeature feature = new GeogitSimpleFeature(values, (SimpleFeatureType) featureType, fid, attNameToRevTypeIndex, typeToRevTypeIndex); return feature; }
@Override public FeatureInfo apply(SimpleFeature f) { RevFeature feature = RevFeature.builder().build(f); String fid = f.getID(); String path = NodeRef.appendChild(treePath, fid); String version = feature.getId().toString(); if (returnFidsOnInsert) { insertedFids.add(new FeatureIdVersionedImpl(fid, version)); } return FeatureInfo.insert(feature, featureTypeId, path); }};