public class Cloning extends SuggestionStorage
Modifier and Type | Class and Description |
---|---|
static class |
Cloning.Pairable |
conn, logger
Constructor and Description |
---|
Cloning(java.sql.Connection conn) |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.String> |
castify(Suggestion form)
Converts suggestion input into key-value pairs that
can be used to create a new Cast (TGO/CaSSIS) suggestion
|
Cloning.Pairable |
checkPairable(int id) |
Cloning.Pairable |
checkPairable(java.lang.String observationId)
Determines if an observation is suitable to be paired with a new
suggestion to form a stereo relation.
|
Suggestion |
cloneObservation(java.lang.String id)
Clone an observation, including its parent suggestion, as a new suggestion.
|
void |
loadCoordinates(Suggestion suggestion,
java.sql.ResultSet rs) |
Suggestion |
pairObservation(java.lang.String observationId) |
Suggestion |
pairSuggestion(int id) |
static java.lang.String |
polygonToROI(com.vividsolutions.jts.geom.Polygon poly)
Serializes a Polygon object as a comma-separated list of coordinates
|
load, roiToPolygonText, save
public static java.util.Map<java.lang.String,java.lang.String> castify(Suggestion form)
public Cloning.Pairable checkPairable(java.lang.String observationId) throws java.sql.SQLException
observationId
- the candidate observation ID for pairingjava.sql.SQLException
- Problem with querypublic Cloning.Pairable checkPairable(int id) throws java.sql.SQLException
java.sql.SQLException
public Suggestion cloneObservation(java.lang.String id) throws java.sql.SQLException
id
- The observation IDjava.sql.SQLException
- Data could not be loadedpublic Suggestion pairSuggestion(int id) throws java.sql.SQLException
java.sql.SQLException
public void loadCoordinates(Suggestion suggestion, java.sql.ResultSet rs)
public Suggestion pairObservation(java.lang.String observationId) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String polygonToROI(com.vividsolutions.jts.geom.Polygon poly)
poly
- geometryCopyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona