Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed Oct 30, 2024
1 parent 1604c84 commit 649faf1
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ private H2GISOsgiDBFactory() {
* Open the connection to an existing database
* @param dbName name of the database
* @return a connection to the database
* @throws SQLException
*/
public static Connection openSpatialDataBase(String dbName) throws SQLException {
String dbFilePath = getDataBasePath(dbName);
Expand All @@ -63,8 +62,6 @@ public static Connection openSpatialDataBase(String dbName) throws SQLException
* Create a spatial database
* @param dbName filename
* @return Connection
* @throws SQLException
* @throws ClassNotFoundException
*/
public static Connection createSpatialDataBase(String dbName)throws SQLException, ClassNotFoundException {
return createSpatialDataBase(dbName,true);
Expand All @@ -88,7 +85,6 @@ private static String getDataBasePath(String dbName) {
* @param dbName DataBase name, or path URI
* @param initSpatial True to enable basic spatial capabilities
* @return DataSource
* @throws SQLException
*/
public static DataSource createDataSource(String dbName ,boolean initSpatial) throws SQLException {
return createDataSource(dbName, initSpatial, H2_PARAMETERS);
Expand All @@ -98,7 +94,6 @@ public static DataSource createDataSource(String dbName ,boolean initSpatial) th
* Create a database, init spatial funcyion and return a DataSource
* @param properties for the opening of the DataBase.
* @return a DataSource
* @throws SQLException
*/
public static DataSource createDataSource(Properties properties) throws SQLException {
return createDataSource(properties, true);
Expand All @@ -109,7 +104,6 @@ public static DataSource createDataSource(Properties properties) throws SQLExcep
* @param properties for the opening of the DataBase.
* @param initSpatial true to load the spatial functions
* @return a DataSource
* @throws SQLException
*/
public static DataSource createDataSource(Properties properties, boolean initSpatial) throws SQLException {
// Create H2 memory DataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ private GPXTablesFactory() {
* Create the waypoints table that will be used to import GPX data
*
* @param connection database connection
* @param wayPointsTableName
* @return
* @throws SQLException
* @param wayPointsTableName table name
* @return PreparedStatement
*/
public static PreparedStatement createWayPointsTable(Connection connection, String wayPointsTableName) throws SQLException {
try (Statement stmt = connection.createStatement()) {
Expand Down Expand Up @@ -99,9 +98,8 @@ public static PreparedStatement createWayPointsTable(Connection connection, Stri
* Create the route table that will be used to import GPX data
*
* @param connection database connection
* @param routeTableName
* @return
* @throws SQLException
* @param routeTableName table name
* @return PreparedStatement
*/
public static PreparedStatement createRouteTable(Connection connection, String routeTableName) throws SQLException {
try (Statement stmt = connection.createStatement()) {
Expand Down Expand Up @@ -133,10 +131,9 @@ public static PreparedStatement createRouteTable(Connection connection, String r
/**
* Createthe route points table to store the route waypoints
*
* @param connection
* @param routePointsTable
* @return
* @throws SQLException
* @param connection database
* @param routePointsTable table name
* @return PreparedStatement
*/
public static PreparedStatement createRoutePointsTable(Connection connection, String routePointsTable) throws SQLException {
try (Statement stmt = connection.createStatement()) {
Expand Down Expand Up @@ -182,10 +179,9 @@ public static PreparedStatement createRoutePointsTable(Connection connection, St
/**
* Creat the track table
*
* @param connection
* @param trackTableName
* @return
* @throws SQLException
* @param connection database
* @param trackTableName table name
* @return PreparedStatement
*/
public static PreparedStatement createTrackTable(Connection connection, String trackTableName) throws SQLException {
try (Statement stmt = connection.createStatement()) {
Expand Down Expand Up @@ -217,10 +213,9 @@ public static PreparedStatement createTrackTable(Connection connection, String t
/**
* Create the track segments table to store the segments of a track
*
* @param connection
* @param trackSegementsTableName
* @return
* @throws SQLException
* @param connection database
* @param trackSegementsTableName table name
* @return PreparedStatement
*/
public static PreparedStatement createTrackSegmentsTable(Connection connection, String trackSegementsTableName) throws SQLException {
try (Statement stmt = connection.createStatement()) {
Expand All @@ -245,10 +240,9 @@ public static PreparedStatement createTrackSegmentsTable(Connection connection,
/**
* Create the track points table to store the track waypoints
*
* @param connection
* @param trackPointsTableName
* @return
* @throws SQLException
* @param connection database
* @param trackPointsTableName table name
* @return PreparedStatement
*/
public static PreparedStatement createTrackPointsTable(Connection connection, String trackPointsTableName) throws SQLException {
try (Statement stmt = connection.createStatement()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ private KMLGeometry() {
/**
* Convert JTS geometry to a kml geometry representation.
*
* @param geom
* @param sb
* @throws SQLException
* @param geom input geometry
* @param sb buffer to store the KML
*/
public static void toKMLGeometry(Geometry geom, StringBuilder sb) throws SQLException {
toKMLGeometry(geom, ExtrudeMode.NONE, AltitudeMode.NONE, sb);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public KMLWriterDriver(Connection connection, File fileName, String encoding, bo
*
* @param tableName the name of table or a select query
* @param progress progress monitor
* @throws SQLException
* @throws java.io.IOException
*/
public void write( String tableName, ProgressVisitor progress) throws SQLException, IOException {
String regex = ".*(?i)\\b(select|from)\\b.*";
Expand Down Expand Up @@ -155,7 +153,6 @@ else if (fileName.exists()) {
* Write the spatial table to a KML format
*
* @param progress Progress visitor following the execution.
* @throws SQLException
*/
private void writeKML(ProgressVisitor progress,File fileName,ResultSet rs,String geomField, String encoding) throws SQLException {
FileOutputStream fos = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ public String getJavaStaticMethod() {
/**
* Generate a KML geometry
*
* @param geometry
* @return
* @throws SQLException
* @param geometry input geometry
* @return kml representation
*/
public static String toKml(Geometry geometry) throws SQLException {
StringBuilder sb = new StringBuilder();
Expand All @@ -75,11 +74,10 @@ public static String toKml(Geometry geometry) throws SQLException {
*
* No altitude : NONE = 0;
*
* @param geometry
* @param altitudeModeEnum
* @param extrude
* @return
* @throws SQLException
* @param geometry input geometry
* @param altitudeModeEnum altitude mode ground, flat
* @param extrude true to extrude
* @return kml representation
*/
public static String toKml(Geometry geometry, boolean extrude, int altitudeModeEnum) throws SQLException {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ public OSMParser(Connection connection, File fileName, String encoding, boolean
/**
* Read the OSM file and create its corresponding tables.
*
* @param tableName
* @param tableName table name
* @param progress Progress visitor following the execution.
* @return
* @throws SQLException
* @return list of table names created
*/
public String[] read(String tableName, ProgressVisitor progress) throws SQLException {
if(fileName == null || !(fileName.getName().endsWith(".osm") || fileName.getName().endsWith("osm.gz") || fileName.getName().endsWith("osm.bz2"))) {
Expand Down Expand Up @@ -228,9 +227,8 @@ public String[] read(String tableName, ProgressVisitor progress) throws SQLExcep
*
* @param connection database connection
* @param dbType Database type.
* @param requestedTable
* @param osmTableName
* @throws SQLException
* @param requestedTable input table name
* @param osmTableName prefixed table name
*/
private void checkOSMTables(Connection connection, DBTypes dbType, TableLocation requestedTable, String osmTableName) throws SQLException {
String[] omsTables = new String[]{OSMTablesFactory.NODE, OSMTablesFactory.NODE_TAG, OSMTablesFactory.WAY, OSMTablesFactory.WAY_NODE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public String getJavaStaticMethod() {
* @param tableReference output table name
* @param option true to delete the existing tables or set a chartset
* encoding
* @throws FileNotFoundException
* @throws SQLException
*/
public static void importTable(Connection connection, String fileName, String tableReference, Value option) throws SQLException, IOException {
String encoding = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ private OSMTablesFactory() {
* timestamp="2008-09-21T21:37:45Z"/>
* }
*
* @param connection
* @param nodeTableName
* @return
* @throws SQLException
* @param connection database
* @param nodeTableName table name
* @return PreparedStatement
*/
public static PreparedStatement createNodeTable(Connection connection, String nodeTableName) throws SQLException {
try (Statement stmt = connection.createStatement()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ public void testGetSRIDFromColumn() throws SQLException {
/**
* Check constraint pass
*
* @throws SQLException
*/
@Test
public void testColumnSRIDGeometryColumns3() throws SQLException {
Expand All @@ -410,7 +409,6 @@ public void testColumnSRIDGeometryColumns3() throws SQLException {
/**
* Check constraint pass
*
* @throws SQLException
*/
@Test
public void testColumnSRIDGeometryColumns() throws SQLException {
Expand All @@ -427,7 +425,6 @@ public void testColumnSRIDGeometryColumns() throws SQLException {
/**
* Check constraint pass
*
* @throws SQLException
*/
@Test
public void testColumnSRIDGeometryColumns2() throws SQLException {
Expand All @@ -444,7 +441,6 @@ public void testColumnSRIDGeometryColumns2() throws SQLException {
/**
* Check constraint pass
*
* @throws SQLException
*/
@Test
public void testColumnSRIDGeometryColumns4() throws SQLException {
Expand All @@ -463,7 +459,6 @@ public void testColumnSRIDGeometryColumns4() throws SQLException {
/**
* Check constraint pass
*
* @throws SQLException
*/
@Test
public void testColumnSRIDGeometryColumns5() throws SQLException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static Function[] getBuiltInsFunctions() throws SQLException {
* Init H2 DataBase with the network functions
*
* @param connection Active connection
* @throws SQLException
*/
public static void load(Connection connection) throws SQLException {
Statement st = connection.createStatement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public String getJavaStaticMethod() {
* @param arg3 Destination string or destination table
* @return Table with closest destination id and distance to closest
* destination
* @throws SQLException
*/
public static ResultSet getAccessibility(Connection connection,
String inputTable,
Expand All @@ -99,7 +98,6 @@ public static ResultSet getAccessibility(Connection connection,
* @param arg4 Destination string or destination table
* @return Table with closest destination id and distance to closest
* destination
* @throws SQLException
*/
public static ResultSet getAccessibility(Connection connection,
String inputTable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public String getJavaStaticMethod() {
* @param inputTable Edges table produced by ST_Graph
* @param orientation Orientation string
* @return True if the calculation was successful
* @throws SQLException
*/
public static boolean getConnectedComponents(Connection connection,
String inputTable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ public String getJavaStaticMethod() {
* @param inputTable Input table
* @param orientation Global orientation
* @return True if the calculation was successful
* @throws SQLException
* @throws NoSuchMethodException
* @throws InstantiationException
* @throws IllegalAccessException
* @throws InvocationTargetException
*/
public static boolean doGraphAnalysis(Connection connection,
String inputTable,
Expand All @@ -115,11 +110,6 @@ public static boolean doGraphAnalysis(Connection connection,
* @param orientation Global orientation
* @param weight Edge weight column name
* @return True if the calculation was successful
* @throws SQLException
* @throws InvocationTargetException
* @throws NoSuchMethodException
* @throws InstantiationException
* @throws IllegalAccessException
*/
public static boolean doGraphAnalysis(Connection connection,
String inputTable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public static ResultSet getShortestPathLength(Connection connection,
* Source vertex id -OR- Source-Destination table -OR-
* Destination table
* @return Distances table
* @throws SQLException
*/
public static ResultSet getShortestPathLength(Connection connection,
String inputTable,
Expand Down Expand Up @@ -205,7 +204,6 @@ public static ResultSet getShortestPathLength(Connection connection,
* @param arg4 Source vertex id -OR- Source table
* @param arg5 Destination vertex id -OR- Destination string -OR- Destination table
* @return Distances table
* @throws SQLException
*/
public static ResultSet getShortestPathLength(Connection connection,
String inputTable,
Expand Down Expand Up @@ -347,7 +345,6 @@ private static ResultSet manyToManySeparateTables(
* @param graph Graph
* @param tableName Table
* @return Set of VDijkstra
* @throws SQLException
*/
private static Set<VDijkstra> getSet(Statement st,
KeyedGraph<VDijkstra, Edge> graph, String tableName) throws SQLException {
Expand Down Expand Up @@ -408,7 +405,6 @@ private static ResultSet oneToSeveral(Connection connection,
* @param sourceDestinationTable Source-Destination table name
* @param graph Graph
* @return Source-Destination map
* @throws SQLException
*/
private static Map<VDijkstra, Set<VDijkstra>> prepareSourceDestinationMap(
Statement st,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,9 @@ public static double getHaversineDistanceInMeters(Coordinate coordA, Coordinate
* Return a SRID code from latitude and longitude coordinates
*
* @param connection to the database
* @param latitude
* @param longitude
* @param latitude latitude value
* @param longitude longitude value
* @return a SRID code
* @throws SQLException
*/
public static int getSRID(Connection connection, float latitude, float longitude)
throws SQLException {
Expand Down
Loading

0 comments on commit 649faf1

Please sign in to comment.