Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get service and subservice from event using enableNamemapping flag #2382

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- [cygnus-arcgis] Get service and subservice using enableNameMappings flag config
- [cygnus-arcgis] Insert null attribute as is in feature table (#2376)
- [cygnus-arcgis] force null geometry when invalid geo:json format or type is found instead of Point(0,0) (#2379)
Original file line number Diff line number Diff line change
Expand Up @@ -482,21 +482,9 @@ public void aggregate(NGSIEvent event) throws CygnusRuntimeError {

LOGGER.debug("[NGSIArcgisAggregator] aggregate - Selected context ->" + contextElement);

// get the getRecvTimeTs headers
Map<String, String> headers = event.getHeaders();

for (Entry<String, String> entry : headers.entrySet()) {
LOGGER.debug("Header entry key --> " + entry.getKey().toString() + ", value --> "
+ entry.getValue().toString());
if (entry.getKey() != null
&& NGSIConstants.FLUME_HEADER_MAPPED_SERVICE.equals(entry.getKey().toString())) {
service = entry.getValue().toString();
} else if (entry.getKey() != null
&& NGSIConstants.FLUME_HEADER_MAPPED_SERVICE_PATH.equals(entry.getKey().toString())) {
subService = entry.getValue().toString();
}
} // for

service = event.getServiceForNaming(enableNameMappings);
subService = event.getServicePathForNaming(enableNameMappings);

// Compose full url
featureTableUrl = argisServiceUrl + "/" + service + "/" + subService;
featureTableUrl = featureTableUrl.replaceAll("([^:])\\/\\/", "$1/");
Expand Down
Loading