-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/vitrum-connect/5gla-api int…
…o feature/add-custom-endpoint-to-end-tx-and-start-orthofoto # Conflicts: # src/main/resources/application.yml
- Loading branch information
Showing
17 changed files
with
344 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/java/de/app/fivegla/event/events/HistoricalDataImportEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package de.app.fivegla.event.events; | ||
|
||
import java.time.Instant; | ||
|
||
/** | ||
* Event for data import. | ||
* | ||
* @param thirdPartyApiConfigurationId The ID of the third party API configuration. | ||
*/ | ||
public record HistoricalDataImportEvent(Long thirdPartyApiConfigurationId, Instant startDate) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/main/java/de/app/fivegla/integration/fiware/model/MicaSenseImage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package de.app.fivegla.integration.fiware.model; | ||
|
||
import de.app.fivegla.integration.fiware.model.api.FiwareEntity; | ||
import de.app.fivegla.integration.fiware.model.api.Validatable; | ||
import de.app.fivegla.integration.fiware.model.internal.Attribute; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
/** | ||
* Device measurement. | ||
*/ | ||
@Slf4j | ||
public record MicaSenseImage( | ||
String id, | ||
String type, | ||
Attribute group, | ||
Attribute oid, | ||
Attribute droneId, | ||
Attribute transactionId, | ||
Attribute imageChannel, | ||
Attribute base64encodedImage, | ||
Attribute imagePath, | ||
Attribute dateCreated, | ||
double latitude, | ||
double longitude | ||
) implements FiwareEntity, Validatable { | ||
|
||
@Override | ||
public String asJson() { | ||
validate(); | ||
var json = "{" + | ||
" \"id\":\"" + id.trim() + "\"," + | ||
" \"type\":\"" + type.trim() + "\"," + | ||
" \"customGroup\":" + group.asJson().trim() + "," + | ||
" \"oid\":" + oid.asJson().trim() + "," + | ||
" \"droneId\":" + droneId.asJson().trim() + "," + | ||
" \"transactionId\":" + transactionId.asJson().trim() + "," + | ||
" \"imageChannel\":" + imageChannel.asJson().trim() + "," + | ||
" \"base64encodedImage\":" + base64encodedImage.asJson().trim() + "," + | ||
" \"imagePath\":" + imagePath.asJson().trim() + "," + | ||
" \"dateCreated\":" + dateCreated.asJson().trim() + "," + | ||
" \"location\":" + locationAsJson(latitude, longitude).trim() + | ||
"}"; | ||
log.debug("{} as JSON: {}", this.getClass().getSimpleName(), json); | ||
return json; | ||
} | ||
|
||
@Override | ||
public void validate() { | ||
if (StringUtils.isBlank(id)) { | ||
throw new IllegalArgumentException("The id of the device measurement must not be null or blank."); | ||
} | ||
if (StringUtils.isBlank(type)) { | ||
throw new IllegalArgumentException("The type of the device measurement must not be null or blank."); | ||
} | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.