use of eu.europa.ec.fisheries.schema.movement.asset.v1.VesselType in project UVMS-Docker by UnionVMS.
the class TempMovementRestIT method getTempMovement.
/**
* Creates the temp movement.
*
* @return the temp movement type
*/
private static TempMovementType getTempMovement() {
final VesselType vesselType = new VesselType();
vesselType.setCfr("T");
vesselType.setExtMarking("T");
vesselType.setFlagState("T");
vesselType.setIrcs("T");
vesselType.setName("T");
final MovementPoint movementPoint = new MovementPoint();
movementPoint.setAltitude(0.0);
movementPoint.setLatitude(0.0);
movementPoint.setLongitude(0.0);
final Date d = Calendar.getInstance().getTime();
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
final TempMovementType tempMovementType = new TempMovementType();
tempMovementType.setAsset(vesselType);
tempMovementType.setCourse(0.0);
tempMovementType.setPosition(movementPoint);
tempMovementType.setSpeed(0.0);
tempMovementType.setState(TempMovementStateEnum.SENT);
tempMovementType.setTime(sdf.format(d));
return tempMovementType;
}
Aggregations