Class DaoNotes


  • public class DaoNotes
    extends Object
    Author:
    Andrea Antonello (www.hydrologis.com)
    • Constructor Detail

      • DaoNotes

        public DaoNotes()
    • Method Detail

      • addNote

        public static void addNote​(Connection connection,
                                   long id,
                                   double lon,
                                   double lat,
                                   double altim,
                                   long timestamp,
                                   String text,
                                   String form)
                            throws Exception
        Add a new note to the database.
        Parameters:
        id - the id
        lon - lon
        lat - lat
        altim - elevation
        timestamp - the UTC timestamp in millis.
        text - a text
        form - the optional json form.
        Throws:
        IOException - if something goes wrong.
        Exception
      • getNotesList

        public static List<Note> getNotesList​(IHMConnection connection,
                                              float[] nswe)
                                       throws Exception
        Get the collected notes from the database inside a given bound.
        Parameters:
        connection - the db to take from .
        nswe - optional bounds as [n, s, w, e].
        Returns:
        the list of notes inside the bounds.
        Throws:
        Exception
      • getEnvelope

        public static org.geotools.geometry.jts.ReferencedEnvelope getEnvelope​(IHMConnection connection,
                                                                               String noteTypeName)
                                                                        throws Exception
        Get the current data envelope.
        Parameters:
        connection - the db connection.
        noteTypeName - if null, simple notes are handled. Else this is taken as name for the note type.
        Returns:
        the envelope.
        Throws:
        Exception