Class SolgrindDBConnectionSimple
- java.lang.Object
-
- edu.gsu.cs.dmlab.solgrind.database.SolgrindDBConnectionSimple
-
- All Implemented Interfaces:
SolgrindDBConnection
public class SolgrindDBConnectionSimple extends Object implements SolgrindDBConnection
Created by ahmetkucuk on 28/09/16.
-
-
Constructor Summary
Constructors Constructor Description SolgrindDBConnectionSimple(DataSource source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
createTable(String tableName)
boolean
dropTable(String tableName)
List<Instance>
getAllInstances(String tableName, String eventType)
Instance
getInstance(String tableName, InstanceData instanceData)
get trajectory with given trajectory identifierSet<Instance>
getInstances(InstanceData[] instanceDatas)
//get a set of trajectories given an array of identifiersboolean
insertInstance(Instance trj, String tablename)
this inserts a trajectory to tablename it could be ideal if one checks the table is correctly modeledboolean
insertInstances(Set<Instance> instances, String tablename)
this inserts a set of trajectories to a table in batchSet<Instance>
searchInstances(org.joda.time.Interval twindow, org.locationtech.jts.geom.Envelope mbr, String eventType)
//this is spatiotemporal windows search on an event typeHashMap<Instance,Instance>
stJoin(String predicate, String table1, String table2)
this performs a spatiotemporal join (first do overlap) select * from table1 as t1, table2 as t2 where t1.timerange intersects with t2.timerange abd t1.geom intersercts with t2.geom
-
-
-
Constructor Detail
-
SolgrindDBConnectionSimple
public SolgrindDBConnectionSimple(DataSource source)
-
-
Method Detail
-
getInstance
public Instance getInstance(String tableName, InstanceData instanceData)
Description copied from interface:SolgrindDBConnection
get trajectory with given trajectory identifier- Specified by:
getInstance
in interfaceSolgrindDBConnection
- Returns:
-
getInstances
public Set<Instance> getInstances(InstanceData[] instanceDatas)
Description copied from interface:SolgrindDBConnection
//get a set of trajectories given an array of identifiers- Specified by:
getInstances
in interfaceSolgrindDBConnection
- Returns:
-
getAllInstances
public List<Instance> getAllInstances(String tableName, String eventType)
- Specified by:
getAllInstances
in interfaceSolgrindDBConnection
- Returns:
- set of instances
-
searchInstances
public Set<Instance> searchInstances(org.joda.time.Interval twindow, org.locationtech.jts.geom.Envelope mbr, String eventType)
Description copied from interface:SolgrindDBConnection
//this is spatiotemporal windows search on an event type- Specified by:
searchInstances
in interfaceSolgrindDBConnection
- Returns:
-
insertInstance
public boolean insertInstance(Instance trj, String tablename)
Description copied from interface:SolgrindDBConnection
this inserts a trajectory to tablename it could be ideal if one checks the table is correctly modeled- Specified by:
insertInstance
in interfaceSolgrindDBConnection
- Returns:
-
insertInstances
public boolean insertInstances(Set<Instance> instances, String tablename)
Description copied from interface:SolgrindDBConnection
this inserts a set of trajectories to a table in batch- Specified by:
insertInstances
in interfaceSolgrindDBConnection
- Returns:
-
stJoin
public HashMap<Instance,Instance> stJoin(String predicate, String table1, String table2)
Description copied from interface:SolgrindDBConnection
this performs a spatiotemporal join (first do overlap) select * from table1 as t1, table2 as t2 where t1.timerange intersects with t2.timerange abd t1.geom intersercts with t2.geom- Specified by:
stJoin
in interfaceSolgrindDBConnection
- Returns:
-
createTable
public boolean createTable(String tableName)
- Specified by:
createTable
in interfaceSolgrindDBConnection
-
dropTable
public boolean dropTable(String tableName)
- Specified by:
dropTable
in interfaceSolgrindDBConnection
-
-