Opened 4 years ago

Closed 4 years ago

#500 closed defect (fixed)

Use String constants for Multipoint PostGIS requests

Reported by: pcampalani Owned by: pcampalani
Priority: minor Milestone: Future
Component: petascope Version: 8.5
Keywords: multipoint string constants Cc: arezaeim
Complexity: Easy


SQL queries to resolve data/metadata on Multipoint coverages need to use String constants for referencing database tables and attributes.
They are used mainly in petascope.core.DbMetadataSource and petascope.wcps.server.core.XmlQuery classes.

Additionally, WCPS constants should *not* be used there. The SQL commands like SELECT, INSERT etc, are standard and can be written without setting up a constant.

Example, taking


+++ public static final String TABLE_MULTIPOINT      = TABLES_PREFIX + "multipoint";
+++ public static final String MULTIPOINT_ID         = "id";
+++ public static final String MULTIPOINT_COORDINATE = "name";

--- String genQuery = WcpsConstants.MSG_SELECT + " St_X(coordinate) AS x, "
+++ String genQuery = " SELECT St_X(" + MULTIPOINT_COORDINATE + ") AS x, "

Change History (1)

comment:1 Changed 4 years ago by pcampalani

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in changeset:e58719d.

Note: See TracTickets for help on using tickets.