-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 1930 unknown geojson element (#1973)
* add json map type adapter Co-authored-by: David Gamez Diaz <1192523+davidgamez@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
core/src/main/java/org/mobilitydata/gtfsvalidator/notice/GeoJsonUnknownElementNotice.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.mobilitydata.gtfsvalidator.notice; | ||
|
||
import static org.mobilitydata.gtfsvalidator.notice.SeverityLevel.INFO; | ||
|
||
import org.mobilitydata.gtfsvalidator.annotation.GtfsValidationNotice; | ||
|
||
/** Unknown elements in locations.geojson file. */ | ||
@GtfsValidationNotice(severity = INFO) | ||
public class GeoJsonUnknownElementNotice extends ValidationNotice { | ||
/** The name of the file where the unknown element was found. */ | ||
private final String filename; | ||
|
||
/** The unknown element in the GeoJSON file. */ | ||
private final String unknownElement; | ||
|
||
public GeoJsonUnknownElementNotice(String filename, String unknownElement) { | ||
this.filename = filename; | ||
this.unknownElement = unknownElement; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
main/src/main/java/org/mobilitydata/gtfsvalidator/util/geojson/UnknownJsonKeyException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.mobilitydata.gtfsvalidator.util.geojson; | ||
|
||
public class UnknownJsonKeyException extends RuntimeException { | ||
private final String message; | ||
private String key; | ||
|
||
public UnknownJsonKeyException(String key, String message) { | ||
this.key = key; | ||
this.message = message; | ||
} | ||
|
||
public String getKey() { | ||
return key; | ||
} | ||
|
||
public String getMessage() { | ||
return message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters