use of net.opengis.ows.x11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class BaseMapper method mapToSizeDistributionClassCodes.
public static Set<SizeDistributionClassCodeEntity> mapToSizeDistributionClassCodes(List<CodeType> codeTypes, SizeDistributionEntity sizeDistributionEntity) {
if (codeTypes == null || codeTypes.isEmpty()) {
Collections.emptySet();
}
Set<SizeDistributionClassCodeEntity> classCodes = new HashSet<>();
for (CodeType codeType : codeTypes) {
SizeDistributionClassCodeEntity entity = SizeDistributionMapper.INSTANCE.mapToSizeDistributionClassCodeEntity(codeType);
entity.setSizeDistribution(sizeDistributionEntity);
classCodes.add(entity);
}
return classCodes;
}
use of net.opengis.ows.x11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ContactPartyMapper method getContactPartyRoles.
protected Set<ContactPartyRoleEntity> getContactPartyRoles(List<CodeType> codeTypes, ContactPartyEntity contactPartyEntity) {
if (CollectionUtils.isEmpty(codeTypes)) {
return Collections.emptySet();
}
Set<ContactPartyRoleEntity> contactPartyRoles = new HashSet<>();
for (CodeType codeType : codeTypes) {
ContactPartyRoleEntity contactPartyRoleEntity = ContactPartyMapper.INSTANCE.mapToContactPartyRoleEntity(codeType);
contactPartyRoleEntity.setContactParty(contactPartyEntity);
contactPartyRoles.add(contactPartyRoleEntity);
}
return contactPartyRoles;
}
use of net.opengis.ows.x11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class GearProblemMapper method mapToGearProblemRecoveries.
protected Set<GearProblemRecoveryEntity> mapToGearProblemRecoveries(List<CodeType> codeTypes, GearProblemEntity gearProblemEntity) {
if (codeTypes == null || codeTypes.isEmpty()) {
return Collections.emptySet();
}
Set<GearProblemRecoveryEntity> gearProblemRecoveries = new HashSet<>();
for (CodeType codeType : codeTypes) {
GearProblemRecoveryEntity gearProblemRecovery = GearProblemMapper.INSTANCE.mapToGearProblemRecoveryEntity(codeType);
gearProblemRecovery.setGearProblem(gearProblemEntity);
gearProblemRecoveries.add(gearProblemRecovery);
}
return gearProblemRecoveries;
}
use of net.opengis.ows.x11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class VesselStorageCharacteristicsMapper method mapToVesselStorageCharCodes.
protected Set<VesselStorageCharCodeEntity> mapToVesselStorageCharCodes(List<CodeType> codeTypes, VesselStorageCharacteristicsEntity vesselStorageChar) {
if (codeTypes == null || codeTypes.isEmpty()) {
return Collections.emptySet();
}
Set<VesselStorageCharCodeEntity> vesselStorageCharCodes = new HashSet<>();
for (CodeType codeType : codeTypes) {
VesselStorageCharCodeEntity vesselStorageCharCode = VesselStorageCharacteristicsMapper.INSTANCE.mapToVesselStorageCharCodeEntity(codeType);
vesselStorageCharCode.setVesselStorageCharacteristics(vesselStorageChar);
vesselStorageCharCodes.add(vesselStorageCharCode);
}
return vesselStorageCharCodes;
}
use of net.opengis.ows.x11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class MapperUtil method getGearCharacteristics.
public static GearCharacteristic getGearCharacteristics() {
CodeType typeCode = getCodeType("Code 1", "57t3yf-ght43yrf-ght56yru-ght7565h");
List<TextType> descriptions = Arrays.asList(getTextType("This is sample text"));
MeasureType valueMeasure = getMeasureType(123, "C62", "57t3yf-ght43yrf-ght56yru-ght7565h");
DateTimeType valueDateTime = getDateTimeType("2016-07-01 11:15:00");
IndicatorType valueIndicator = getIndicatorType(true, "Test value", "Test format");
CodeType valueCode = getCodeType("Code type 1", "4fhry5-thfyr85-67thf-5htr84");
TextType value = getTextType("This is sample Text");
QuantityType valueQuantity = getQuantityType(123);
List<FLUXLocation> specifiedFluxLocations = Arrays.asList(getFluxLocation());
GearCharacteristic gearCharacteristic = new GearCharacteristic(typeCode, descriptions, valueMeasure, valueDateTime, valueIndicator, valueCode, value, valueQuantity, specifiedFluxLocations);
return gearCharacteristic;
}
Aggregations