mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-01 01:44:08 +00:00
preparing for certificate upload servlet
Change-Id: Ic424683d1bebb4a9c6f62f8353c073eda387b84d
This commit is contained in:
1 parent
5bfea6561f
commit
8580ac3b98
10 files changed
+157
-27
No files matched your search
+7
-6
@@ -93,12 +93,13 @@ public class ORCCertificateJsonDeserializer implements JsonDeserializer<ORCCerti
|
||||
velocityPredictionsPerTrueWindSpeedAndAngle.put(tws,
|
||||
velocityPredictionAtCurrentTrueWindSpeedPerTrueWindAngle);
|
||||
}
|
||||
final ORCCertificate certificate = new ORCCertificateImpl(sailnumber, boatName, boatclass, length, gph,
|
||||
cdl, velocityPredictionsPerTrueWindSpeedAndAngle, beatAngles,
|
||||
beatVMGPredictionPerTrueWindSpeed, beatAllowancePerTrueWindSpeed, runAngles,
|
||||
runVMGPredictionPerTrueWindSpeed, runAllowancePerTrueWindSpeed,
|
||||
windwardLeewardSpeedPredictionPerTrueWindSpeed, longDistanceSpeedPredictionPerTrueWindSpeed,
|
||||
circularRandomSpeedPredictionPerTrueWindSpeed, nonSpinnakerSpeedPredictionPerTrueWindSpeed);
|
||||
final String idConsistingOfNatAuthCertNoAndBIN = json.get(ORCCertificateJsonSerializer.ORC_CERTIFICATE_ID).toString();
|
||||
final ORCCertificate certificate = new ORCCertificateImpl(idConsistingOfNatAuthCertNoAndBIN, sailnumber, boatName, boatclass, length,
|
||||
gph, cdl, velocityPredictionsPerTrueWindSpeedAndAngle,
|
||||
beatAngles, beatVMGPredictionPerTrueWindSpeed, beatAllowancePerTrueWindSpeed,
|
||||
runAngles, runVMGPredictionPerTrueWindSpeed,
|
||||
runAllowancePerTrueWindSpeed, windwardLeewardSpeedPredictionPerTrueWindSpeed,
|
||||
longDistanceSpeedPredictionPerTrueWindSpeed, circularRandomSpeedPredictionPerTrueWindSpeed, nonSpinnakerSpeedPredictionPerTrueWindSpeed);
|
||||
return certificate;
|
||||
}
|
||||
}
|
||||
+2
@@ -25,6 +25,7 @@ public class ORCCertificateJsonSerializer implements JsonSerializer<ORCCertifica
|
||||
public static final String ORC_CERTIFICATE_BOATCLASS = "boatClass";
|
||||
public static final String ORC_CERTIFICATE_GPH = "gph";
|
||||
public static final String ORC_CERTIFICATE_CDL = "cdl";
|
||||
public static final String ORC_CERTIFICATE_ID = "ID";
|
||||
public static final String ORC_CERTIFICATE_LENGTH = "length";
|
||||
public static final String ORC_CERTIFICATE_TWS_6KT = "ORC_CERTIFICATE_TWS_6KT";
|
||||
public static final String ORC_CERTIFICATE_TWS_8KT = "ORC_CERTIFICATE_TWS_8KT";
|
||||
@@ -45,6 +46,7 @@ public class ORCCertificateJsonSerializer implements JsonSerializer<ORCCertifica
|
||||
@Override
|
||||
public JSONObject serialize(ORCCertificate certificate) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put(ORC_CERTIFICATE_ID, certificate.getId());
|
||||
result.put(ORC_CERTIFICATE_SAILNUMBER, certificate.getSailnumber());
|
||||
result.put(ORC_CERTIFICATE_BOATNAME, certificate.getBoatName());
|
||||
result.put(ORC_CERTIFICATE_BOATCLASS, certificate.getBoatclass());
|
||||
|
||||
Reference in new issue
Block a user