/** * Sends one feature * * @param values */ protected void sendWFSFeature(List<Object> values) { if (values == null || values.size() == 0) { log.warn("Failed to send feature"); return; } Map<String, Object> output = new HashMap<String, Object>(); output.put(OUTPUT_LAYER_ID, this.layerId); output.put(OUTPUT_FEATURE, values); this.service.addResults(this.session.getClient(), ResultProcessor.CHANNEL_FEATURE, output); }
/** * Sends properties (fields and locales) * * @param fields * @param locales */ protected void sendWFSProperties(List<String> fields, List<String> locales) { if (fields == null || fields.size() == 0) { log.warn("Failed to send properties"); return; } if (!fields.contains("__fid")) fields.add(0, "__fid"); if (!fields.contains("__centerX")) fields.add("__centerX"); if (!fields.contains("__centerY")) fields.add("__centerY"); if (locales != null && !locales.isEmpty()) { locales.add(0, "ID"); locales.add("x"); locales.add("y"); } else { locales = new ArrayList<String>(); } Map<String, Object> output = new HashMap<String, Object>(); output.put(OUTPUT_LAYER_ID, this.layerId); output.put(OUTPUT_FIELDS, fields); output.put(OUTPUT_LOCALES, locales); this.service.addResults(this.session.getClient(), ResultProcessor.CHANNEL_PROPERTIES, output); }