Skip to content

Commit

Permalink
Merge pull request #9 from reciprocum/patch-8
Browse files Browse the repository at this point in the history
Complete GPXParserOptions. To be used to restrict the amount/kind of nodes parsed in/out.
  • Loading branch information
urizev authored Jul 2, 2021
2 parents 489b0ed + 9774bad commit 2a1681e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/com/urizev/gpx/GPXParserOptions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.urizev.gpx;

public class
GPXParserOptions
{
public final boolean skipWaypoints ;
public final boolean skipRoutes ;
public final boolean skipTracks ;

public static final GPXParserOptions PARSE_ALL = new GPXParserOptions( false, false, false ) ;
public static final GPXParserOptions SKIP_WAYPOINTS = new GPXParserOptions( true , false, false ) ;
public static final GPXParserOptions SKIP_ROUTES = new GPXParserOptions( false, true , false ) ;
public static final GPXParserOptions SKIP_TRACKS = new GPXParserOptions( false, false, true ) ;
public static final GPXParserOptions ONLY_WAYPOINTS = new GPXParserOptions( false, true , true ) ;
public static final GPXParserOptions ONLY_ROUTES = new GPXParserOptions( true , false, true ) ;
public static final GPXParserOptions ONLY_TRACKS = new GPXParserOptions( true , true , false ) ;

public
GPXParserOptions( final boolean skipWaypoints, final boolean skipRoutes, final boolean skipTracks )
{
super( ) ;
this.skipWaypoints = skipWaypoints ;
this.skipRoutes = skipRoutes ;
this.skipTracks = skipTracks ;
}
}

0 comments on commit 2a1681e

Please sign in to comment.