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 keycloak-refactor
  • Loading branch information
John-Wiens committed Jul 3, 2024
2 parents 37a8791 + 42c5e17 commit c8b9a8a
Show file tree
Hide file tree
Showing 78 changed files with 628 additions and 71 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ADD ./asn1_codec/pugixml /asn1_codec/pugixml
RUN cd /asn1_codec/pugixml && mkdir -p build && cd build && cmake .. && make && make install

# Build and install asn1c submodule
ADD ./asn1_codec/asn1c /asn1_codec/asn1c
ADD ./asn1_codec/usdot-asn1c /asn1_codec/asn1c
RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install

# Make generated files available to the build & compile example
Expand Down
2 changes: 1 addition & 1 deletion asn1_codec
Submodule asn1_codec updated from 422bca to 3b4076
2 changes: 1 addition & 1 deletion jpo-conflictmonitor
Submodule jpo-conflictmonitor updated from 61d147 to 6cfe9f
12 changes: 6 additions & 6 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>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jpo-conflictvisualizer-api</name>
<description>Conflict Visualizer</description>
Expand Down Expand Up @@ -98,7 +98,7 @@
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode-core</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<!-- required exclusion to preserve keycloak versions -->
<exclusions>
<exclusion>
Expand All @@ -110,23 +110,23 @@
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode-plugins</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode-svcs</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-geojsonconverter</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<classifier>jpo-geojsonconverter</classifier>
</dependency>
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-conflictmonitor</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<classifier>jpo-conflictmonitor</classifier>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ public interface ConnectionOfTravelAssessmentRepository extends DataLoader<Conne
Query getQuery(Integer intersectionID, Long startTime, Long endTime, boolean latest);

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<ConnectionOfTravelAssessment> find(Query query);


}

Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,20 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
return query;
}


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

// Removes the result limit on a count query.
public long getQueryFullCount(Query query){
int limit = query.getLimit();
query.limit(-1);
long count = mongoTemplate.count(query, ConnectionOfTravelAssessment.class, collectionName);
query.limit(limit);
return count;
}

public List<ConnectionOfTravelAssessment> find(Query query) {
return mongoTemplate.find(query, ConnectionOfTravelAssessment.class, collectionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public interface LaneDirectionOfTravelAssessmentRepository extends DataLoader<La
Query getQuery(Integer intersectionID, Long startTime, Long endTime, boolean latest);

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<LaneDirectionOfTravelAssessment> find(Query query);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;

import us.dot.its.jpo.conflictmonitor.monitor.models.assessments.LaneDirectionOfTravelAssessment;
import us.dot.its.jpo.ode.api.ConflictMonitorApiProperties;

Expand Down Expand Up @@ -51,14 +52,24 @@ public Query getQuery(Integer intersectionID, Long startTime, Long endTime, bool
}else{
query.limit(props.getMaximumResponseSize());
}

return query;
}



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

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

public List<LaneDirectionOfTravelAssessment> find(Query query) {
return mongoTemplate.find(query, LaneDirectionOfTravelAssessment.class, collectionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public interface StopLineStopAssessmentRepository extends DataLoader<StopLineSto
Query getQuery(Integer intersectionID, Long startTime, Long endTime, boolean latest);

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<StopLineStopAssessment> find(Query query);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;

import us.dot.its.jpo.conflictmonitor.monitor.models.assessments.StopLineStopAssessment;
import us.dot.its.jpo.ode.api.ConflictMonitorApiProperties;

Expand Down Expand Up @@ -52,10 +53,17 @@ 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);
}

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

public List<StopLineStopAssessment> find(Query query) {
return mongoTemplate.find(query, StopLineStopAssessment.class, collectionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ public interface SignalStateEventAssessmentRepository extends DataLoader<StopLin

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<StopLinePassageAssessment> find(Query query);
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,17 @@ 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);
}

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

public List<StopLinePassageAssessment> find(Query query) {
return mongoTemplate.find(query, StopLinePassageAssessment.class, collectionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public interface BsmEventRepository extends DataLoader<BsmEvent>{
Query getQuery(Integer intersectionID, Long startTime, Long endTime, boolean latest);

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<BsmEvent> find(Query query);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,17 @@ 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);
}

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

public List<BsmEvent> find(Query query) {

List<Map> documents = mongoTemplate.find(query, Map.class, collectionName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public interface ConnectionOfTravelEventRepository extends DataLoader<Connection
Query getQuery(Integer intersectionID, Long startTime, Long endTime, boolean latest);

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<ConnectionOfTravelEvent> find(Query query);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;

import us.dot.its.jpo.conflictmonitor.monitor.models.events.ConnectionOfTravelEvent;
import org.springframework.data.domain.Sort;

Expand Down Expand Up @@ -59,10 +60,17 @@ 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);
}

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

public List<ConnectionOfTravelEvent> find(Query query) {
return mongoTemplate.find(query, ConnectionOfTravelEvent.class, collectionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public interface IntersectionReferenceAlignmentEventRepository extends DataLoade
Query getQuery(Integer intersectionID, Long startTime, Long endTime, boolean latest);

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<IntersectionReferenceAlignmentEvent> find(Query query);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;

import us.dot.its.jpo.conflictmonitor.monitor.models.events.IntersectionReferenceAlignmentEvent;
import us.dot.its.jpo.ode.api.ConflictMonitorApiProperties;
import us.dot.its.jpo.ode.api.models.IDCount;
Expand Down Expand Up @@ -58,11 +59,18 @@ 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);
}

public long getQueryFullCount(Query query){
int limit = query.getLimit();
query.limit(-1);
long count = mongoTemplate.count(query, IntersectionReferenceAlignmentEvent.class, collectionName);
query.limit(limit);
return count;
}

public List<IntersectionReferenceAlignmentEvent> find(Query query) {
return mongoTemplate.find(query, IntersectionReferenceAlignmentEvent.class,
collectionName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public interface LaneDirectionOfTravelEventRepository extends DataLoader<LaneDir

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<LaneDirectionOfTravelEvent> find(Query query);

List<IDCount> getLaneDirectionOfTravelEventsByDay(int intersectionID, Long startTime, Long endTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,17 @@ 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);
}

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

public List<LaneDirectionOfTravelEvent> find(Query query) {
return mongoTemplate.find(query, LaneDirectionOfTravelEvent.class, collectionName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public interface MapBroadcastRateEventRepository extends DataLoader<MapBroadcast
Query getQuery(Integer intersectionID, Long startTime, Long endTime, boolean latest);

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<MapBroadcastRateEvent> find(Query query);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,17 @@ 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);
}

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

public List<MapBroadcastRateEvent> find(Query query) {
return mongoTemplate.find(query, MapBroadcastRateEvent.class, collectionName);
}
Expand Down Expand Up @@ -91,6 +98,8 @@ public List<IDCount> getMapBroadcastRateEventsByDay(int intersectionID, Long sta
return results;
}



@Override
public void add(MapBroadcastRateEvent item) {
mongoTemplate.save(item, collectionName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public interface MapMinimumDataEventRepository extends DataLoader<MapMinimumData
Query getQuery(Integer intersectionID, Long startTime, Long endTime, boolean latest);

long getQueryResultCount(Query query);

long getQueryFullCount(Query query);

List<MapMinimumDataEvent> find(Query query);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,17 @@ 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);
}

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

public List<MapMinimumDataEvent> find(Query query) {
return mongoTemplate.find(query, MapMinimumDataEvent.class, collectionName);
}
Expand Down
Loading

0 comments on commit c8b9a8a

Please sign in to comment.