Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tinypony committed Feb 14, 2015
1 parent 93d95a2 commit 0a9513a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
10 changes: 0 additions & 10 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/edu/aalto/emn/RuterGTFSHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private void processTrips() {
bus.setFootnoteId(t.getServiceId().getId()); //references service id in calendar dates
bus.setRoute(t.getRoute().getShortName());
bus.setServiceNbr(t.getRoute().getId().getId());
bus.setDirection(t.getDirectionId());
trips.put(tripId, bus);
}
}
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/edu/aalto/emn/SnippetMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class SnippetMain {
@Parameter(names = "-noimport", description = "Skips data parsing and import")
private boolean skipParsing = false;

@Parameter(names = "-nodistance", description = "Skips distance calculation")
private boolean skipDistance = false;

private String databaseName = "ruter";


Expand Down Expand Up @@ -55,9 +58,11 @@ public static void main(String[] args) throws IOException, InterruptedException
System.out.println("Skipping import");
}


System.out.println("Resolving distances");
snippet.retrieveRouteLength();
if(!snippet.skipDistance) {
System.out.println("Resolving distances");
snippet.retrieveRouteLength();
}

System.out.println("Done");
}

Expand Down
9 changes: 9 additions & 0 deletions src/main/java/edu/aalto/emn/dataobject/BusTrip.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class BusTrip implements Jsonable, Mongoable {
private String firstDate;
private String vector;
private String dataSource;
private String direction;

private Object auxilliary;

Expand Down Expand Up @@ -201,4 +202,12 @@ public String getDataSource() {
public void setDataSource(String dataSource) {
this.dataSource = dataSource;
}

public String getDirection() {
return direction;
}

public void setDirection(String direction) {
this.direction = direction;
}
}

0 comments on commit 0a9513a

Please sign in to comment.