Cleanup: renaming Importer classes.

This commit is contained in:
Dennis Guse
2021-05-27 17:55:42 +02:00
parent 288fe27a57
commit eada954299
6 changed files with 18 additions and 18 deletions
@@ -54,9 +54,9 @@ import de.dennisguse.opentracks.util.StringUtils;
*
* @author Jimmy Shih
*/
public class GpxFileTrackImporter extends DefaultHandler implements XMLImporter.TrackParser {
public class GpxTrackImporter extends DefaultHandler implements XMLImporter.TrackParser {
private static final String TAG = GpxFileTrackImporter.class.getSimpleName();
private static final String TAG = GpxTrackImporter.class.getSimpleName();
private static final String TAG_DESCRIPTION = "desc";
private static final String TAG_COMMENT = "cmt";
@@ -115,12 +115,12 @@ public class GpxFileTrackImporter extends DefaultHandler implements XMLImporter.
private final TrackImporter trackImporter;
public GpxFileTrackImporter(Context context) {
public GpxTrackImporter(Context context) {
this(context, new ContentProviderUtils(context));
}
@VisibleForTesting
GpxFileTrackImporter(Context context, ContentProviderUtils contentProviderUtils) {
GpxTrackImporter(Context context, ContentProviderUtils contentProviderUtils) {
this.context = context;
//TODO move this to instantiation of this class
@@ -52,9 +52,9 @@ public class ImportService extends JobIntentService {
try {
if (TrackFileFormat.GPX.getExtension().equals(fileExtension)) {
trackIds.addAll(new XMLImporter(new GpxFileTrackImporter(this)).importFile(this, file.getUri()));
trackIds.addAll(new XMLImporter(new GpxTrackImporter(this)).importFile(this, file.getUri()));
} else if (TrackFileFormat.KML_WITH_TRACKDETAIL_AND_SENSORDATA.getExtension().equals(fileExtension)) {
trackIds.addAll(new XMLImporter(new KmlFileTrackImporter(this)).importFile(this, file.getUri()));
trackIds.addAll(new XMLImporter(new KmlTrackImporter(this)).importFile(this, file.getUri()));
} else if (TrackFileFormat.KMZ_WITH_TRACKDETAIL_AND_SENSORDATA_AND_PICTURES.getExtension().equals(fileExtension)) {
trackIds.addAll(new KmzTrackImporter().importFile(this, file.getUri()));
} else {
@@ -46,9 +46,9 @@ import de.dennisguse.opentracks.util.StringUtils;
*
* @author Jimmy Shih
*/
public class KmlFileTrackImporter extends DefaultHandler implements XMLImporter.TrackParser {
public class KmlTrackImporter extends DefaultHandler implements XMLImporter.TrackParser {
private static final String TAG = KmlFileTrackImporter.class.getSimpleName();
private static final String TAG = KmlTrackImporter.class.getSimpleName();
private static final String MARKER_STYLE = "#" + KMLTrackExporter.MARKER_STYLE;
@@ -107,7 +107,7 @@ public class KmlFileTrackImporter extends DefaultHandler implements XMLImporter.
private final TrackImporter trackImporter;
public KmlFileTrackImporter(Context context) {
public KmlTrackImporter(Context context) {
this.context = context;
//TODO move this to instantiation of this class
@@ -205,7 +205,7 @@ public class KmzTrackImporter {
}
private List<Track.Id> parseKml(ZipInputStream zipInputStream) throws IOException {
XMLImporter kmlFileTrackImporter = new XMLImporter(new KmlFileTrackImporter(context));
XMLImporter kmlFileTrackImporter = new XMLImporter(new KmlTrackImporter(context));
InputStream nonClosableInputStream = new FilterInputStream(zipInputStream) {
@Override