use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method setGeopoliticalRegionCode.
private void setGeopoliticalRegionCode(RegistrationLocation target, RegistrationLocationEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
CodeType codeType = new CodeType();
codeType.setListID(source.getRegionCodeListId());
codeType.setValue(source.getRegionCode());
target.setGeopoliticalRegionCode(codeType);
}
}
use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapToFLUXFAReportMessage.
@SneakyThrows
public FLUXFAReportMessage mapToFLUXFAReportMessage(List<FaReportDocumentEntity> faReportMessageEntity) {
FLUXFAReportMessage target = new FLUXFAReportMessage();
FLUXReportDocument fluxReportDocument = new FLUXReportDocument();
CodeType codeType = new CodeType();
codeType.setValue("9");
codeType.setListID("FLUX_GP_PURPOSE");
fluxReportDocument.setPurposeCode(codeType);
IDType idType = new IDType();
idType.setSchemeID("UUID");
idType.setValue(UUID.randomUUID().toString());
fluxReportDocument.setIDS(Collections.singletonList(idType));
DateTimeType dateTimeType = new DateTimeType();
dateTimeType.setDateTime(DateUtils.getCurrentDate());
fluxReportDocument.setCreationDateTime(dateTimeType);
TextType textType = new TextType();
textType.setValue("LOAD_REPORTS");
fluxReportDocument.setPurpose(textType);
FLUXParty party = new FLUXParty();
IDType idType1 = new IDType();
idType1.setSchemeID("FLUX_GP_PARTY");
idType1.setValue("TODO_SET_NODE_ALIAS");
party.setIDS(Collections.singletonList(idType1));
fluxReportDocument.setOwnerFLUXParty(party);
target.setFLUXReportDocument(fluxReportDocument);
if (CollectionUtils.isNotEmpty(faReportMessageEntity)) {
mapFAReportDocuments(target, faReportMessageEntity);
}
return target;
}
use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method setRoleCode.
private void setRoleCode(VesselTransportMeans target, String roleCodeListId, String roleCodeListValue) {
if (ObjectUtils.allNotNull(target)) {
CodeType codeType = new CodeType();
codeType.setValue(roleCodeListValue);
codeType.setListID(roleCodeListId);
target.setRoleCode(codeType);
}
}
use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapVesselRelatedActivityCode.
private void mapVesselRelatedActivityCode(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, source) && (StringUtils.isNotEmpty(source.getVesselActivityCode()) || StringUtils.isNotEmpty(source.getVesselActivityCodeListId()))) {
CodeType codeType = new CodeType();
if (StringUtils.isNotEmpty(source.getVesselActivityCode())) {
codeType.setValue(source.getVesselActivityCode());
}
if (StringUtils.isNotEmpty(source.getVesselActivityCodeListId())) {
codeType.setListID(source.getVesselActivityCodeListId());
}
target.setVesselRelatedActivityCode(codeType);
}
}
use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapFisheryTypeCode.
private void mapFisheryTypeCode(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, source) && (StringUtils.isNotEmpty(source.getFisheryTypeCode()) || StringUtils.isNotEmpty(source.getFisheryTypeCodeListId()))) {
CodeType codeType = new CodeType();
if (StringUtils.isNotEmpty(source.getFisheryTypeCode())) {
codeType.setValue(source.getFisheryTypeCode());
}
if (StringUtils.isNotEmpty(source.getFisheryTypeCodeListId())) {
codeType.setListID(source.getFisheryTypeCodeListId());
}
target.setFisheryTypeCode(codeType);
}
}
Aggregations