The specified id may be null. In this case an id will be generated internally by the builder.
null
After this method returns, all internal builder state is reset.
104105106107108109110111112113114
nameAttribute = f.getAttribute("name"); } catch (Exception e){ // ignore name attribute } builder.addAll(new Object[]{nameAttribute, geometry }); SimpleFeature feature = builder.buildFeature(type.getTypeName() + "." + index++); //$NON-NLS-1$ newCollection.add(feature); } return newCollection; }
357358359360361362363364365366367
else { String colValue = node.getValue().asString(); featureBuilder.add(colValue); } } SimpleFeature feature = featureBuilder.buildFeature(null); features.add(feature); } catch (Exception e) { logger.error("Error creating geometry! Skipping it.", e); continue; }
307308309310311312313314315316317
i++; exitForIntermediateSaving = ((i % ITEM_X_PAGE) == 0); SimpleFeature sf = featureIterator.next(); SimpleFeature data = featureBuilderData.buildFeature(sf.getID()); for (int j = 0; j < srcAttributeDescriptor.size(); j++) { String srcName = srcAttributeDescriptor.get(j).getLocalName(); String dstName = srcName.toLowerCase(); // FIXME: this is a worksroung for SHP 2 PG attrib name conversion. make it general! Property p = sf.getProperty(srcName);
109110111112113114115116117118119
String id = null; if (config.has("id", config)) { id = Context.toString(config.get("id", config)); } feature = builder.buildFeature(id); } /** * Translate a GeoJSON config into a Feature config. * @param config
196197198199200201202203204205206
Entry<Name, Optional<?>> entry = iterator.next(); featureBuilder.set(entry.getKey(), entry.getValue().orNull()); } SimpleFeature featureToInsert = featureBuilder.buildFeature(NodeRef.nodeFromPath(path)); workTree.insert(NodeRef.parentPath(path), featureToInsert); } ImmutableList<FeatureTypeDiff> alteredTrees = patch.getAlteredTrees(); for (FeatureTypeDiff diff : alteredTrees) {
5960616263646566676869
} else { throw new IllegalArgumentException(); } String fid = String.valueOf(entity.getId()); SimpleFeature simpleFeature = builder.buildFeature(fid); return simpleFeature; } protected String buildNodesString(List<WayNode> wayNodes) { StringBuilder sb = new StringBuilder();
316317318319320321322323324325326
value = new WKTReader2().read((String) value); } } builder.set(i, value); } return builder.buildFeature(id); } protected List<RevCommit> populate(GeoGIG geogig, boolean oneCommitPerFeature, Feature... features) throws Exception { return populate(geogig, oneCommitPerFeature, Arrays.asList(features));
106107108109110111112113114
value = new WKTReader2().read((String) value); } } builder.set(i, value); } return builder.buildFeature(id); } }
139140141142143144145146147148149
for (int i = 0; i < descriptors.size(); i++) { PropertyDescriptor descriptor = descriptors.get(i); Optional<Object> value = values.get(i); featureBuilder.set(descriptor.getName(), value.orNull()); } SimpleFeature feature = featureBuilder.buildFeature(ref.name()); Entity entity = converter.toEntity(feature, id); EntityContainer container; if (entity instanceof Node) { container = new NodeContainer((Node) entity); } else {
125126127128129130131132