Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:usdot-jpo-ode/jpo-conflictvisual…
Browse files Browse the repository at this point in the history
…izer into decoder
  • Loading branch information
John-Wiens committed May 30, 2024
2 parents fcf7a2c + 941a7f6 commit 5285a24
Show file tree
Hide file tree
Showing 36 changed files with 40 additions and 14 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@ FROM amazoncorretto:21-al2023

WORKDIR /home

# Copy java executable
COPY --from=jbuilder /home/jpo-conflictvisualizer-api/src/main/resources/application.yaml /home
COPY --from=jbuilder /home/jpo-conflictvisualizer-api/src/main/resources/logback.xml /home
COPY --from=jbuilder /home/jpo-conflictvisualizer-api/target/jpo-conflictvisualizer-api-0.0.1-SNAPSHOT.jar /home
COPY --from=builder /home/jpo-conflictvisualizer-api/src/main/resources/application.yaml /home
COPY --from=builder /home/jpo-conflictvisualizer-api/src/main/resources/logback.xml /home
COPY --from=builder /home/jpo-conflictvisualizer-api/target/jpo-conflictvisualizer-api-1.3.0-SNAPSHOT.jar /home

# # Copy asn1_codec executable and test files
USER root
Expand Down
2 changes: 1 addition & 1 deletion jpo-conflictmonitor
Submodule jpo-conflictmonitor updated from e658cc to 61d147
6 changes: 3 additions & 3 deletions jpo-conflictvisualizer-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-conflictvisualizer-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
<name>jpo-conflictvisualizer-api</name>
<description>Conflict Visualizer</description>
<properties>
Expand Down Expand Up @@ -119,13 +119,13 @@
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-geojsonconverter</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
<classifier>jpo-geojsonconverter</classifier>
</dependency>
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-conflictmonitor</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
<classifier>jpo-conflictmonitor</classifier>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, ConnectionOfTravelAssessment.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, LaneDirectionOfTravelAssessment.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, StopLineStopAssessment.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, StopLinePassageAssessment.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public long countOdeBsmDataGeo(String originIp, String vehicleId, Long startTime
if(endTime != null){
endTimeString = Instant.ofEpochMilli(endTime).toString();
}
query.limit(props.getMaximumResponseSize());
query.addCriteria(Criteria.where("metadata.odeReceivedAt").gte(startTimeString).lte(endTimeString));
query.fields().exclude("recordGeneratedAt");
query.limit(-1);

if (longitude!=null && latitude!=null && distance!=null){
Double[] latitudes = calculateLatitudes(latitude, distance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, BsmEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, ConnectionOfTravelEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, IntersectionReferenceAlignmentEvent.class,
collectionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, LaneDirectionOfTravelEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, MapBroadcastRateEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, MapMinimumDataEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, SignalGroupAlignmentEvent.class, "CmSignalGroupAlignmentEvents");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, SignalStateConflictEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, StopLinePassageEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, StopLineStopEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, SpatBroadcastRateEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, SpatMinimumDataEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, TimeChangeDetailsEvent.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, OdeMapData.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, ProcessedMap.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public Query getQuery(Integer intersectionID, Integer roadRegulatorID, String no
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, Notification.class, "CmNotification");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, ConnectionOfTravelNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, IntersectionReferenceAlignmentNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, LaneDirectionOfTravelNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, MapBroadcastRateNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, SignalGroupAlignmentNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, SignalStateConflictNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, SpatBroadcastRateNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, StopLinePassageNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, StopLineStopNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query){
query.limit(-1);
return mongoTemplate.count(query, TimeChangeDetailsNotification.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}

public long getQueryResultCount(Query query) {
query.limit(-1);
return mongoTemplate.count(query, OdeSpatData.class, collectionName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
import com.fasterxml.jackson.databind.ObjectMapper;

import us.dot.its.jpo.geojsonconverter.DateJsonMapper;
import us.dot.its.jpo.geojsonconverter.pojos.geojson.map.ProcessedMap;
import us.dot.its.jpo.geojsonconverter.pojos.spat.ProcessedSpat;
import us.dot.its.jpo.ode.api.ConflictMonitorApiProperties;
import us.dot.its.jpo.ode.api.models.IDCount;
import org.springframework.data.domain.Sort;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -29,9 +27,6 @@
import org.springframework.data.mongodb.core.aggregation.ConvertOperators;
import org.springframework.data.mongodb.core.aggregation.DateOperators;

import java.time.format.DateTimeFormatter;
import java.time.ZonedDateTime;

@Component
public class ProcessedSpatRepositoryImpl implements ProcessedSpatRepository {

Expand Down Expand Up @@ -68,6 +63,7 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime) {
}

public long getQueryResultCount(Query query) {
query.limit(-1); // remove any count limits
return mongoTemplate.count(query, ProcessedSpat.class, collectionName);
}

Expand Down

0 comments on commit 5285a24

Please sign in to comment.