use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.VesselPositionEvent in project UVMS-ActivityModule-APP by UnionVMS.
the class VesselTransportMeansMapper method getVesselPositionEventEntities.
protected Set<VesselPositionEventEntity> getVesselPositionEventEntities(List<VesselPositionEvent> specifiedVesselPositionEvents, VesselTransportMeansEntity vesselTransportMeansEntity) {
if (specifiedVesselPositionEvents == null || specifiedVesselPositionEvents.isEmpty()) {
return Collections.emptySet();
}
Set<VesselPositionEventEntity> vesselPositionEventEntities = new HashSet<>();
for (VesselPositionEvent vesselPositionEvent : specifiedVesselPositionEvents) {
VesselPositionEventEntity entity = VesselPositionEventMapper.INSTANCE.mapToVesselPositionEventEntity(vesselPositionEvent, vesselTransportMeansEntity);
Geometry point = GeometryUtils.createPoint(entity.getLongitude(), entity.getLatitude());
entity.setGeom(point);
vesselPositionEventEntities.add(entity);
}
return vesselPositionEventEntities;
}
Aggregations