Skip to content

Commit

Permalink
Use 4.0.1 version of the swim backend
Browse files Browse the repository at this point in the history
Update Copyright
  • Loading branch information
ajay-gov committed Jul 26, 2022
1 parent dd8de72 commit b1544b4
Show file tree
Hide file tree
Showing 34 changed files with 55 additions and 55 deletions.
20 changes: 10 additions & 10 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ext.compilerArgs = ['-Xlint:all']

// Build with `gradle -Pno-modules` to force compatibility with legacy JVMs.
def javaVersion = System.getProperty('java.version').split('\\.')
ext.jvmVersion = 9//(javaVersion[0] as Integer) > 1 ? javaVersion[0] as Integer : javaVersion[1] as Integer
ext.useModules = jvmVersion >= 9 && !hasProperty('no-modules')
ext.jvmVersion = 11
ext.useModules = !hasProperty('no-modules')
ext.moduleArgs = []

repositories {
Expand All @@ -40,8 +40,8 @@ dependencies {
afterEvaluate {
configurations {
apiElements {
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

Expand All @@ -59,9 +59,9 @@ afterEvaluate {
options.encoding = 'UTF-8'
classpath = files()
source = sourceSets.main.allJava
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
destinationDir = compileJava.destinationDir
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
destinationDirectory = compileJava.destinationDirectory
include '*module-info*'
}
classes.dependsOn compileModuleInfoJava
Expand All @@ -79,8 +79,8 @@ afterEvaluate {
compileJava {
options.compilerArgs += compilerArgs
options.encoding = 'UTF-8'
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
exclude '*module-info*'
}

Expand All @@ -89,7 +89,7 @@ afterEvaluate {
manifest {
attributes(
'Implementation-Title': moduleName,
'Implementation-Version': version,
'Implementation-Version': archiveVersion,
'Main-Class': mainClassName)
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
application.version=3.11.0
application.version=4.0.1
2 changes: 1 addition & 1 deletion server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
18 changes: 9 additions & 9 deletions server/src/main/java/swim/transit/NextBusHttpAPI.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -21,7 +21,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.zip.GZIPInputStream;
import swim.api.ref.SwimRef;
import swim.api.ref.WarpRef;
import swim.codec.Utf8;
import swim.structure.Form;
import swim.structure.Item;
Expand All @@ -37,25 +37,25 @@ public class NextBusHttpAPI {

private NextBusHttpAPI() { }

public static void sendRoutes(List<Agency> agencies, SwimRef swim) {
public static void sendRoutes(List<Agency> agencies, WarpRef warp) {
for (Agency agency: agencies) {
sendRoutes(agency, swim);
sendRoutes(agency, warp);
}
}

public static void sendVehicleInfo(String pollUrl, Agency ag, SwimRef swim) {
public static void sendVehicleInfo(String pollUrl, Agency ag, WarpRef warp) {
final Vehicles vehicles = getVehicleLocations(pollUrl, ag);
if (vehicles != null && vehicles.getVehicles().size() > 0) {
final Value value = Form.forClass(Vehicles.class).mold(vehicles).toValue();
swim.command(ag.getUri(), "addVehicles", value);
warp.command(ag.getUri(), "addVehicles", value);
}
}

private static void sendRoutes(Agency agency, SwimRef swim) {
private static void sendRoutes(Agency agency, WarpRef warp) {
final Routes routes = getRoutes(agency);
if (routes != null && !routes.getRoutes().isEmpty()) {
final Value value = Form.forClass(Routes.class).mold(routes).toValue();
swim.command(agency.getUri(), "addRoutes", value);
warp.command(agency.getUri(), "addRoutes", value);
}
}

Expand Down Expand Up @@ -157,7 +157,7 @@ private static Value parse(URL url) {
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestProperty("Accept-Encoding", "gzip, deflate");
final InputStream stream = new GZIPInputStream(urlConnection.getInputStream());
final Value configValue = Utf8.read(Xml.structureParser().documentParser(), stream);
final Value configValue = Utf8.read(stream, Xml.structureParser().documentParser());
return configValue;
} catch (Throwable e) {
e.printStackTrace();
Expand Down
10 changes: 5 additions & 5 deletions server/src/main/java/swim/transit/TransitPlane.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@
import swim.api.SwimRoute;
import swim.api.agent.AgentRoute;
import swim.api.plane.AbstractPlane;
import swim.api.ref.SwimRef;
import swim.api.ref.WarpRef;
import swim.api.space.Space;
import swim.kernel.Kernel;
import swim.server.ServerLoader;
Expand Down Expand Up @@ -62,17 +62,17 @@ public static void main(String[] args) {
kernel.run(); // blocks until termination
}

private static void startAgencies(SwimRef swim) {
private static void startAgencies(WarpRef warp) {
final List<Agency> agencies = loadAgencies();
for (Agency agency : agencies) {
swim.command(agency.getUri(), "addInfo", agency.toValue());
warp.command(agency.getUri(), "addInfo", agency.toValue());
}
try {
Thread.sleep(3000);
} catch (InterruptedException e) {

}
NextBusHttpAPI.sendRoutes(agencies, swim);
NextBusHttpAPI.sendRoutes(agencies, warp);
}

private static List<Agency> loadAgencies() {
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/agent/AgencyAgent.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/agent/CountryAgent.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/agent/StateAgent.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/agent/VehicleAgent.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/model/Agency.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/model/BoundingBox.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/model/Route.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/model/Routes.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/model/Vehicle.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/swim/transit/model/Vehicles.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/TransitViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/kpi/Kpi1ViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/kpi/Kpi2ViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/kpi/Kpi3ViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/kpi/KpiViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/kpi/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/AgencyMapView.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/AgencyMapViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/AgencyModel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/AgencyPopoverViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/TransitMapView.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/TransitMapViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/VehicleMapView.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/VehicleMapViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/VehicleModel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/VehiclePopoverViewController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/main/map/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 SWIM.AI inc.
// Copyright 2015-2022 Swim.inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Swim Transit Web UI",
"homepage": "https://github.com/swimos/transit",
"author": "Chris Sachs <[email protected]>",
"copyright": "2015-2019 SWIM.AI inc.",
"copyright": "2015-2022 Swim.inc",
"license": "Apache-2.0",
"repository": "https://github.com/swimos/transit.git",
"private": true,
Expand Down

0 comments on commit b1544b4

Please sign in to comment.