Class DaoImages
- java.lang.Object
-
- org.hortonmachine.gears.io.geopaparazzi.geopap4.DaoImages
-
public class DaoImages extends Object
Data access object for images.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description DaoImages()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddImage(Connection connection, long id, double lon, double lat, double altim, double azim, long timestamp, String text, byte[] image, byte[] thumb, long noteId)static voidcreateTables(Connection connection)Create the image tables.static org.geotools.geometry.jts.ReferencedEnvelopegetEnvelope(IHMConnection connection)Get the current data envelope.static byte[]getImageData(IHMConnection connection, long imageDataId)Get Image data from data id.static StringgetImageName(IHMConnection connection, long imageId)static List<Image>getImagesList(IHMConnection connection)Get the list of Images from the db.
-
-
-
Method Detail
-
createTables
public static void createTables(Connection connection) throws IOException, SQLException
Create the image tables.- Throws:
IOException- if something goes wrong.SQLException
-
addImage
public static void addImage(Connection connection, long id, double lon, double lat, double altim, double azim, long timestamp, String text, byte[] image, byte[] thumb, long noteId) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getImageName
public static String getImageName(IHMConnection connection, long imageId) throws Exception
- Throws:
Exception
-
getImagesList
public static List<Image> getImagesList(IHMConnection connection) throws Exception
Get the list of Images from the db.- Returns:
- list of notes.
- Throws:
IOException- if something goes wrong.Exception
-
getImageData
public static byte[] getImageData(IHMConnection connection, long imageDataId) throws Exception
Get Image data from data id.- Parameters:
connection-imageDataId-- Returns:
- Throws:
Exception
-
getEnvelope
public static org.geotools.geometry.jts.ReferencedEnvelope getEnvelope(IHMConnection connection) throws Exception
Get the current data envelope.- Parameters:
connection- the db connection.- Returns:
- the envelope.
- Throws:
Exception
-
-