use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapRoles.
private void mapRoles(ContactParty target, Set<ContactPartyRoleEntity> contactPartyRoleEntities) {
List<CodeType> codeTypeList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(contactPartyRoleEntities)) {
for (ContactPartyRoleEntity source : contactPartyRoleEntities) {
CodeType codeType = new CodeType();
codeType.setValue(source.getRoleCode());
codeType.setListID(source.getRoleCodeListId());
codeTypeList.add(codeType);
}
}
target.setRoleCodes(codeTypeList);
}
use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapPurposeCode.
private void mapPurposeCode(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
CodeType codeType = new CodeType();
codeType.setValue(source.getTypeCode());
codeType.setListID(source.getTypeCodeListid());
target.setTypeCode(codeType);
}
}
use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapFMCMarkerCode.
private void mapFMCMarkerCode(FAReportDocument target, String fmcMarkerValue, String fmcMarkerListId) {
if (ObjectUtils.allNotNull(target) && (StringUtils.isNotEmpty(fmcMarkerValue) || StringUtils.isNotEmpty(fmcMarkerListId))) {
CodeType codeType = new CodeType();
if (StringUtils.isNotEmpty(fmcMarkerValue)) {
codeType.setValue(fmcMarkerValue);
}
if (StringUtils.isNotEmpty(fmcMarkerListId)) {
codeType.setListID(fmcMarkerListId);
}
target.setFMCMarkerCode(codeType);
}
}
use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapValueCode.
private void mapValueCode(FLUXCharacteristic target, FluxCharacteristicEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
if (source.getValueCode() != null) {
CodeType codeType = new CodeType();
codeType.setValue(source.getValueCode());
target.setTypeCode(codeType);
}
}
}
use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class FaQueryFactory method createFaQueryForTrip.
public static FAQuery createFaQueryForTrip(String tripId, String sendTo, boolean consolidated) {
FAQuery faq = new FAQuery();
faq.setID(new IDType(UUID.randomUUID().toString(), "UUID", null, null, null, null, null, null));
faq.setTypeCode(new CodeType("TRIP", "FA_QUERY_TYPE", null, null, null, null, null, null, null, null));
try {
final XMLGregorianCalendar currentDate = DateUtils.getCurrentDate();
faq.setSubmittedDateTime(new DateTimeType(currentDate, null));
} catch (DatatypeConfigurationException e) {
log.error("[ERROR] Error while trying to create XMLGregorianCalendar () DateUtils.getCurrentDate()! Going to retry", e);
return null;
}
faq.setSubmitterFLUXParty(new FLUXParty(Collections.singletonList(new IDType(sendTo, "FLUX_GP_PARTY", null, null, null, null, null, null)), null));
faq.setSimpleFAQueryParameters(Arrays.asList(new FAQueryParameter(new CodeType("TRIPID", "FA_QUERY_PARAMETER", null, null, null, null, null, null, null, null), null, null, new IDType(tripId, "EU_TRIP_ID", null, null, null, null, null, null)), new FAQueryParameter(new CodeType("CONSOLIDATED", "FA_QUERY_PARAMETER", null, null, null, null, null, null, null, null), new CodeType(consolidated ? "Y" : "N", "BOOLEAN_VALUE", null, null, null, null, null, null, null, null), null, null)));
return faq;
}
Aggregations