use of eu.europa.ec.fisheries.schema.rules.asset.v1.AssetIdType in project UVMS-ExchangeModule-APP by UnionVMS.
the class MovementMapper method mapAssetIdList.
public static List<eu.europa.ec.fisheries.schema.rules.asset.v1.AssetIdList> mapAssetIdList(List<eu.europa.ec.fisheries.schema.exchange.movement.asset.v1.AssetIdList> inList) {
List<eu.europa.ec.fisheries.schema.rules.asset.v1.AssetIdList> outList = new ArrayList<>();
for (eu.europa.ec.fisheries.schema.exchange.movement.asset.v1.AssetIdList inAssetId : inList) {
eu.europa.ec.fisheries.schema.rules.asset.v1.AssetIdList outAssetId = new eu.europa.ec.fisheries.schema.rules.asset.v1.AssetIdList();
AssetIdType idType = null;
switch(inAssetId.getIdType()) {
case CFR:
idType = AssetIdType.CFR;
break;
case ID:
idType = AssetIdType.ID;
break;
case IMO:
idType = AssetIdType.IMO;
break;
case IRCS:
idType = AssetIdType.IRCS;
break;
case MMSI:
idType = AssetIdType.MMSI;
break;
case GUID:
idType = AssetIdType.GUID;
break;
}
outAssetId.setIdType(idType);
outAssetId.setValue(inAssetId.getValue());
outList.add(outAssetId);
}
return outList;
}
Aggregations