Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
cd3d787
Limpieza y añadida nueva dependencia
dmartinezgomez Mar 25, 2020
1c516f7
Primera versión del Sink sin pasar test aún
dmartinezgomez Mar 27, 2020
f7eacd0
pequeños parches
dmartinezgomez Mar 27, 2020
a5fa5e8
Cache concurrente
dmartinezgomez Apr 1, 2020
7238cce
Logging y control de errores
dmartinezgomez Apr 2, 2020
78099b3
Fix error parseando geo:json
dmartinezgomez Apr 2, 2020
da4898f
borrar código inútil
dmartinezgomez Apr 2, 2020
d58f30d
Fix problema de limpieza de url
dmartinezgomez Apr 2, 2020
06f39d7
Tratamiento de timeouts a nivel de batch
dmartinezgomez Apr 2, 2020
947b20c
Comprobación de timeouts en método process
dmartinezgomez Apr 3, 2020
c017414
Eliminación de duplicado de logs
dmartinezgomez Apr 3, 2020
a64aa91
Comprueba si las features existen antes de añadirlas
dmartinezgomez Apr 3, 2020
74444e2
maxBatchSize parametrizable desde el agente
dmartinezgomez Apr 3, 2020
6dc647a
Argis Backend project
dmartinezgomez Apr 3, 2020
6448610
Argis Backend project
dmartinezgomez Apr 3, 2020
b134a13
Fix unit tests
dmartinezgomez Apr 3, 2020
b1b775a
Fix unit tests
dmartinezgomez Apr 3, 2020
c68dc9c
Telefónica Checkstyle
dmartinezgomez Apr 6, 2020
376095d
Telefónica Checkstyle
dmartinezgomez Apr 6, 2020
4053921
Telefónica Checkstyle
dmartinezgomez Apr 6, 2020
e88c691
Eliminando
dmartinezgomez Apr 6, 2020
ce78864
Eliminando
dmartinezgomez Apr 6, 2020
33342c4
Merge branch 'ArcgisRest' of https://github.com/Stdri/fiware-cygnus i…
dmartinezgomez Apr 6, 2020
7b90f75
Merge branch 'ArcgisRest' of https://github.com/Stdri/fiware-cygnus i…
dmartinezgomez Apr 6, 2020
27abb46
Delete ArcgisBaseTest.java
dmartinezgomez Apr 6, 2020
15e9b43
Delete ArcgisBaseTest.java
dmartinezgomez Apr 6, 2020
7e9502e
Merge branch 'ArcgisRest' of https://github.com/Stdri/fiware-cygnus i…
dmartinezgomez Apr 6, 2020
5ca1bfd
Create ArcgisBaseTest.java
dmartinezgomez Apr 6, 2020
d61290e
Refactor
dmartinezgomez Apr 6, 2020
6f594dc
Refactorización
dmartinezgomez Apr 6, 2020
d68df32
Formatea valores Booleanos (String, integer.. etc) a su valor entero …
dmartinezgomez Apr 14, 2020
1658d57
features Batched
dmartinezgomez Apr 14, 2020
17ad180
Telefónica CheckStyle
dmartinezgomez Apr 15, 2020
2d89b7a
Telefónica CheckStyle
dmartinezgomez Apr 15, 2020
f78d2fd
Doc's
dmartinezgomez Apr 15, 2020
96edd88
Update CHANGES_NEXT_RELEASE
dmartinezgomez Apr 15, 2020
48b7bbf
[NameMappingsInterceptor] stopOnFirstAttrMatch
dmartinezgomez Apr 15, 2020
13f984c
[NameMappingInterceptor] Create new attributes if needed.
dmartinezgomez Apr 15, 2020
bff3255
JsonPath attribute value mapping
dmartinezgomez Apr 15, 2020
9be0681
Issue fix
dmartinezgomez Apr 16, 2020
6cabcff
Feature table, decode strings
dmartinezgomez Apr 16, 2020
25dcb31
Fix issues
dmartinezgomez Apr 16, 2020
5c7f584
Update NameMappings.java
dmartinezgomez Apr 16, 2020
87095ae
Reset Changes Next Release
dmartinezgomez Apr 17, 2020
ff68509
Merge pull request #3 from telefonicaid/master
dmartinezgomez Apr 17, 2020
42ab607
Update CHANGES_NEXT_RELEASE
dmartinezgomez Apr 17, 2020
78f79c3
Update CHANGES_NEXT_RELEASE
dmartinezgomez Apr 17, 2020
d27833a
Merge branch 'JsonPath' of https://github.com/Stdri/fiware-cygnus int…
dmartinezgomez Apr 17, 2020
cd25e68
Update CHANGES_NEXT_RELEASE
dmartinezgomez Apr 17, 2020
ecad0c3
Telefonica CheckStyle
dmartinezgomez Apr 17, 2020
6451bad
Docs
dmartinezgomez Apr 17, 2020
882b971
Mapping value fix
dmartinezgomez Apr 17, 2020
a731453
Checkstyle
dmartinezgomez Apr 20, 2020
dd949b3
Refactorize structure
dmartinezgomez Apr 20, 2020
fdc7448
Versión 2.0.0
dmartinezgomez Apr 20, 2020
515f706
Create README.md
dmartinezgomez Apr 20, 2020
c90af72
Add issue number.
dmartinezgomez Apr 20, 2020
a322017
Clean md
dmartinezgomez Apr 20, 2020
e531743
Remove comments
dmartinezgomez Apr 24, 2020
cba2ea1
Refactor Constructor
dmartinezgomez Apr 24, 2020
c8d4419
Proyect Structure change
dmartinezgomez Apr 27, 2020
7b77d67
Fixing Tests and logs
dmartinezgomez Apr 27, 2020
62b2380
Fix compile problems
dmartinezgomez Apr 27, 2020
042bbab
Strings to Constants
dmartinezgomez Apr 27, 2020
3dc730b
Remove cygnus-arcgis folder
dmartinezgomez Apr 28, 2020
1941e81
New checkstyle removed
dmartinezgomez Apr 28, 2020
df4b24b
initialize method removed
dmartinezgomez Apr 28, 2020
fe5fcb3
String to constants
dmartinezgomez Apr 28, 2020
575feb8
Clean imports
dmartinezgomez Apr 30, 2020
5616dd8
Merge pull request #1860 from Stdri/JsonPath
AlvaroVega Nov 17, 2020
a8230ef
Merge branch 'master' into task/argis_reactor_stdr
AlvaroVega Nov 17, 2020
80eca31
fix merge: add missed argcis repos
AlvaroVega Nov 18, 2020
fa4d30f
fix merge: delete argcis repos
AlvaroVega Nov 18, 2020
55fa9ae
revert contribution Allow deep Json attribute mapping
AlvaroVega Nov 18, 2020
0993286
revert /NGSINameMappingsInterceptorTest.java
AlvaroVega Nov 18, 2020
1ccb2c1
Update CHANGES_NEXT_RELEASE
AlvaroVega Nov 18, 2020
b65f15d
Update pom.xml
AlvaroVega Nov 18, 2020
004f1bd
Update CHANGES_NEXT_RELEASE
AlvaroVega Nov 18, 2020
2e1226d
Update pom.xml
AlvaroVega Nov 18, 2020
0868d9b
Update NGSIArcgisFeatureTableSink.java
AlvaroVega Nov 18, 2020
6505526
Update mkdocs.yml
AlvaroVega Nov 18, 2020
22d8822
revert ngsisink.java
AlvaroVega Nov 18, 2020
a25903d
add maven-surefire-plugin with skip test
AlvaroVega Nov 18, 2020
704e06e
FIX .gitignore to remove too broad filter
fgalan Nov 18, 2020
6cc4a5a
Update cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends…
AlvaroVega Nov 18, 2020
59bd69f
FIX some tabs vs space issue in pom.xml indentation
fgalan Nov 19, 2020
de75f59
FIX link to md
fgalan Nov 19, 2020
4b3e926
Update doc/cygnus-ngsi/flume_extensions_catalogue/ngsi_arcgis_feature…
AlvaroVega Nov 19, 2020
262d543
RENAME NGSIArcgisFeatureTableSink -> NGSIArcGisSink in docs
fgalan Nov 19, 2020
3526a69
Merge branch 'task/argis_reactor_stdr' of github.com:telefonicaid/fiw…
fgalan Nov 19, 2020
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ cygnus-twitter/bin
.classpath
.project
.factorypath
*/.settings
*/.settings
2 changes: 2 additions & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[cygnus-ngsi][NGSIArcgisFeatureTableSink] New sink to persist Arcgis data, removing the old ArgGis sink (#1672)
[cygnus-common][ArcGis] New Rest based backend to persist Arcgis data (#1672)
9 changes: 9 additions & 0 deletions cygnus-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@
</resources>
<pluginManagement>
<plugins>
<!-- SKIP TEST -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- Explicit Java version declaration in needed in some systems in which Maven seems not -->
<!-- being able to find itself the right version. Many systems don't need this declaration -->
<!-- but it doesn't use to hurt anyway -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/**
* Copyright 2014-2017 Telefonica Investigación y Desarrollo, S.A.U
*
* This file is part of fiware-cygnus (FIWARE project).
*
* fiware-cygnus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
* fiware-cygnus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
* for more details.
*
* You should have received a copy of the GNU Affero General Public License along with fiware-cygnus. If not, see
* http://www.gnu.org/licenses/.
*
* For those usages not covered by the GNU Affero General Public License please contact with iot_support at tid dot es
*/

package com.telefonica.iot.cygnus.backends.arcgis;

import java.util.Date;

import com.telefonica.iot.cygnus.backends.arcgis.model.Feature;
import com.telefonica.iot.cygnus.backends.arcgis.restutils.ArcgisFeatureTable;
import com.telefonica.iot.cygnus.log.CygnusLogger;

/**
*
* @author PMO Santander Smart City – Ayuntamiento de Santander
*
*/
public class NGSIArcgisFeatureTable extends ArcgisFeatureTable {
private static final CygnusLogger LOGGER = new CygnusLogger(NGSIArcgisFeatureTable.class);

private static final String CLASS_NAME = "NGSIArcgisFeatureTable";
private long timeoutSecs = 60;
private Date lastPersist = new Date();

/**
*
* @param featureServiceUrl
* @param username
* @param password
* @param getTokenUrl
* @param timeoutSecs
*/
public NGSIArcgisFeatureTable(String featureServiceUrl, String username, String password,
String getTokenUrl, long timeoutSecs) {
super(featureServiceUrl, username, password, getTokenUrl, false);
this.timeoutSecs = timeoutSecs;
}

/**
* Timed out?.
*
* @return
*/
public boolean hasTimeout() {
return ((new Date().getTime() - this.lastPersist.getTime()) > (this.timeoutSecs * 1000))
&& featuresBatched() > 0;
}

/*
* (non-Javadoc)
*
* @see
* es.santander.smartcity.ArcgisRestUtils.ArcgisFeatureTable#addToBatch(es.santander.smartcity.
* model.Feature)
*/
@Override
public void addToBatch(Feature feature) {
super.addToBatch(feature);
this.lastPersist = new Date();
}

/*
* (non-Javadoc)
*
* @see es.santander.smartcity.ArcgisRestUtils.ArcgisFeatureTable#flushBatch()
*/
@Override
public void flushBatch() {
super.flushBatch();
this.lastPersist = new Date();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/**
* Copyright 2014-2017 Telefonica Investigación y Desarrollo, S.A.U
*
* This file is part of fiware-cygnus (FIWARE project).
*
* fiware-cygnus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
* fiware-cygnus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
* for more details.
*
* You should have received a copy of the GNU Affero General Public License along with fiware-cygnus. If not, see
* http://www.gnu.org/licenses/.
*
* For those usages not covered by the GNU Affero General Public License please contact with iot_support at tid dot es
*/

package com.telefonica.iot.cygnus.backends.arcgis.exceptions;

/**
* @author dmartinez
*
*/
public class ArcgisException extends Exception {
private static final int DEFAULT_RESULT_CODE = 500;
protected int code;

/**
*
* @param message
*/
public ArcgisException(String message) {
super(message);
code = DEFAULT_RESULT_CODE;
}

/**
*
* @param e
*/
public ArcgisException(Exception e) {
super(e);
code = DEFAULT_RESULT_CODE;
}

/**
*
* @param code
* @param message
*/
public ArcgisException(int code, String message) {
super(message);
this.code = code;
}

/**
*
* @return code
*/
public int getCode() {
return code;
}

@Override
public String toString() {
String result = "";
if (code > 0) {
result = code + " ";
}
return result + this.getMessage();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Copyright 2014-2017 Telefonica Investigación y Desarrollo, S.A.U
*
* This file is part of fiware-cygnus (FIWARE project).
*
* fiware-cygnus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
* fiware-cygnus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
* for more details.
*
* You should have received a copy of the GNU Affero General Public License along with fiware-cygnus. If not, see
* http://www.gnu.org/licenses/.
*
* For those usages not covered by the GNU Affero General Public License please contact with iot_support at tid dot es
*/

package com.telefonica.iot.cygnus.backends.arcgis.http;

/**
* @author dmartinez
*
*/
public enum HttpMethod {
GET("GET"), POST("POST");

private String stringValue;

/**
*
* @param stringValue
*/
HttpMethod(String stringValue) {
this.stringValue = stringValue;
}

/**
* Convertir Enum a String.
*/
public String toString() {
return this.stringValue;
}
}
Loading