Skip to content

Commit

Permalink
0.0.3 release and a series of quick fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
laidig committed Aug 19, 2016
1 parent a09235f commit 62e31ce
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 45 deletions.
2 changes: 1 addition & 1 deletion gtfs-validation-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<groupId>com.conveyal</groupId>
<artifactId>gtfs-validation-lib</artifactId>
<version>0.0.2-SNAPSHOT</version>
<version>0.0.3</version>
<description>A Java framework for GTFS validation and statistics</description>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

public class DuplicateStops implements Serializable {

/**
*
*/
private static final long serialVersionUID = 1L;
public Stop stop1;
public Stop stop2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

public class InvalidValue implements Serializable {

/**
*
*/
private static final long serialVersionUID = 1L;

public String affectedEntity;

public String affectedField;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

public class ValidationResult implements Serializable {

/**
*
*/
private static final long serialVersionUID = 1L;

private static Logger _log = Logger.getLogger(ValidationResult.class.getName());

public List<InvalidValue> invalidValues = new ArrayList<InvalidValue>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,8 @@ public static MathTransform getTransform(

return transform;
} catch (final NoSuchIdentifierException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (final FactoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@

public class InputOutOfRange extends Exception {

/**
*
*/
private static final long serialVersionUID = 1L;

}
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,16 @@ private enum ServiceCode {
mapServiceCode("Z", NEW_YEARS_DAY_OBSERVED);
}

private static ServiceCode getServiceCodeForId(String id) {
return serviceCodeForGtfsId.get(id);
}

private static void mapServiceCode(String string, ServiceCode serviceCode) {
serviceCodeForGtfsId.put(string, serviceCode);
if (Character.isLetter(string.charAt(0))) {
letterCodeForServiceCode.put(serviceCode, string);
}
}

private String getLetterCode() {
return letterCodeForServiceCode.get(this);
}

private boolean isHoliday() {
return !(this == WEEKDAY_SCHOOL_OPEN || this == WEEKDAY_SCHOOL_CLOSED
|| this == SATURDAY || this == SUNDAY);
}
// private boolean isHoliday() {
// return !(this == WEEKDAY_SCHOOL_OPEN || this == WEEKDAY_SCHOOL_CLOSED
// || this == SATURDAY || this == SUNDAY);
// }
}}
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
package com.conveyal.gtfs;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;

import junit.framework.Assert;

import org.junit.BeforeClass;
import org.junit.Test;
import org.onebusaway.csv_entities.exceptions.CsvEntityIOException;
import org.onebusaway.csv_entities.exceptions.MissingRequiredFieldException;
import org.onebusaway.gtfs.impl.GtfsDaoImpl;
import org.onebusaway.gtfs.model.Trip;
import org.onebusaway.gtfs.serialization.GtfsReader;

import com.conveyal.gtfs.model.DuplicateStops;
import com.conveyal.gtfs.model.ValidationResult;
import com.conveyal.gtfs.service.GeoUtils;
import com.conveyal.gtfs.service.GtfsValidationService;
import com.conveyal.gtfs.service.InputOutOfRange;
import com.conveyal.gtfs.service.ProjectedCoordinate;
import com.conveyal.gtfs.service.impl.GtfsStatisticsService;
import com.vividsolutions.jts.geom.Coordinate;

public class GeoUtilsTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,16 @@

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;

import junit.framework.Assert;

import org.junit.BeforeClass;
import org.junit.Test;
import org.onebusaway.csv_entities.exceptions.CsvEntityIOException;
import org.onebusaway.csv_entities.exceptions.MissingRequiredFieldException;
import org.onebusaway.gtfs.impl.GtfsDaoImpl;
import org.onebusaway.gtfs.model.Trip;
import org.onebusaway.gtfs.serialization.GtfsReader;

import com.conveyal.gtfs.model.DuplicateStops;
import com.conveyal.gtfs.model.InvalidValue;
import com.conveyal.gtfs.model.ValidationResult;
import com.conveyal.gtfs.service.GtfsValidationService;
import com.conveyal.gtfs.service.InputOutOfRange;
import com.conveyal.gtfs.service.impl.GtfsStatisticsService;
import com.conveyal.gtfs.validator.ValidatorMain;

public class GtfsValidationServiceTest {
Expand Down
2 changes: 1 addition & 1 deletion gtfs-validator-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<dependency>
<groupId>com.conveyal</groupId>
<artifactId>gtfs-validation-lib</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.3</version>
</dependency>
<dependency>
<groupId>org.onebusaway</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
*
*/
public class FeedValidationResult implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;

/** Were we able to load the GTFS at all (note that this should only indicate corrupted files,
* not missing ones; that should raise an exception instead.)
*/
Expand Down

0 comments on commit 62e31ce

Please sign in to comment.