public abstract class AbstractResultParser extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DateFormat |
dateFormat |
protected static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
AbstractResultParser()
Create new ResultParser
|
| Modifier and Type | Method and Description |
|---|---|
abstract IGPSObject |
parse(org.json.JSONObject json) |
IGPSObject |
parse(String line)
Parse a received line into a
IGPSObject |
protected <T extends IGPSObject> |
parseObjectArray(org.json.JSONArray array,
Class<T> type)
parse a whole JSONArray into a list of IGPSObjects
|
protected double |
parseTimestamp(org.json.JSONObject json,
String fieldName) |
protected static final org.slf4j.Logger LOG
protected final DateFormat dateFormat
public IGPSObject parse(String line) throws ParseException
IGPSObjectline - the line read from GPSdParseException - if parsing failspublic abstract IGPSObject parse(org.json.JSONObject json) throws ParseException
json - IGPSObjectParseExceptionprotected <T extends IGPSObject> List<T> parseObjectArray(org.json.JSONArray array, Class<T> type) throws ParseException
ParseExceptionprotected double parseTimestamp(org.json.JSONObject json,
String fieldName)
Copyright © 2011–2017 Taimos GmbH. All rights reserved.