Search in sources :

Example 1 with VesselType

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;
}
Also used : VesselType(eu.europa.ec.fisheries.schema.movement.asset.v1.VesselType) MovementPoint(eu.europa.ec.fisheries.schema.movement.v1.MovementPoint) TempMovementType(eu.europa.ec.fisheries.schema.movement.v1.TempMovementType) SimpleDateFormat(java.text.SimpleDateFormat) Date(java.util.Date)

Aggregations

VesselType (eu.europa.ec.fisheries.schema.movement.asset.v1.VesselType)1 MovementPoint (eu.europa.ec.fisheries.schema.movement.v1.MovementPoint)1 TempMovementType (eu.europa.ec.fisheries.schema.movement.v1.TempMovementType)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1