org.opengts.db
Class ParseEventsXML

java.lang.Object
  extended by org.opengts.db.ParseEventsXML
All Implemented Interfaces:
GeoEvent.GeoEventHandler, ParseEvent.ParseEventHandler

public class ParseEventsXML
extends java.lang.Object
implements ParseEvent.ParseEventHandler, GeoEvent.GeoEventHandler

Parse XML location formats supported by Google (currently only GPX)


Field Summary
static java.lang.String[] ARG_ACCOUNT
           
static java.lang.String[] ARG_DEVICE
           
static java.lang.String[] ARG_FILE
           
static boolean DEBUG_MODE
           
 
Constructor Summary
ParseEventsXML()
          Constructor
ParseEventsXML(java.lang.String accountID, java.lang.String deviceID)
          Constructor
 
Method Summary
protected  void _handleEvent(GeoEvent.GeoEventHandler gevHandler, long timestamp, int statusCode, double latitude, double longitude, double altitudeM)
           
 boolean _parse_gpx(org.w3c.dom.Element topElem, GeoEvent.GeoEventHandler gevHandler)
           
protected  long _parseTime(java.lang.String timeStr)
           
 java.lang.String getAccountID()
           
 java.lang.String getDeviceID()
           
 int handleGeoEvent(GeoEvent gev)
          Callback to handle event
 boolean hasAccountDevice()
           
protected  boolean insertEventRecord(GeoEvent gev)
           
static void main(java.lang.String[] args)
           
 boolean parseStream(java.io.InputStream xmlStream, GeoEvent.GeoEventHandler gevHandler)
           
 void setAccountDevice(java.lang.String accountID, java.lang.String deviceID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_MODE

public static boolean DEBUG_MODE

ARG_ACCOUNT

public static java.lang.String[] ARG_ACCOUNT

ARG_DEVICE

public static java.lang.String[] ARG_DEVICE

ARG_FILE

public static java.lang.String[] ARG_FILE
Constructor Detail

ParseEventsXML

public ParseEventsXML()
Constructor


ParseEventsXML

public ParseEventsXML(java.lang.String accountID,
                      java.lang.String deviceID)
Constructor

Method Detail

setAccountDevice

public void setAccountDevice(java.lang.String accountID,
                             java.lang.String deviceID)

hasAccountDevice

public boolean hasAccountDevice()

getAccountID

public java.lang.String getAccountID()

getDeviceID

public java.lang.String getDeviceID()

parseStream

public boolean parseStream(java.io.InputStream xmlStream,
                           GeoEvent.GeoEventHandler gevHandler)
                    throws java.io.IOException
Specified by:
parseStream in interface ParseEvent.ParseEventHandler
Throws:
java.io.IOException

_parse_gpx

public boolean _parse_gpx(org.w3c.dom.Element topElem,
                          GeoEvent.GeoEventHandler gevHandler)

_parseTime

protected long _parseTime(java.lang.String timeStr)

_handleEvent

protected void _handleEvent(GeoEvent.GeoEventHandler gevHandler,
                            long timestamp,
                            int statusCode,
                            double latitude,
                            double longitude,
                            double altitudeM)

handleGeoEvent

public int handleGeoEvent(GeoEvent gev)
Callback to handle event

Specified by:
handleGeoEvent in interface GeoEvent.GeoEventHandler

insertEventRecord

protected boolean insertEventRecord(GeoEvent gev)

main

public static void main(java.lang.String[] args)