use of org.geosdi.geoplatform.xml.wfs.v110.UpdateElementType in project geo-platform by geosdi.
the class TransactionUpdate method getOperation.
/**
* @param request
* @return {@link Object}
* @throws Exception
*/
@Override
public Object getOperation(@Nonnull(when = NEVER) WFSTransactionRequest request) throws Exception {
checkArgument(request != null, "The Parameter request must not be null.");
checkArgument(request.getTypeName() != null, "The Parameter typeName must not be null.");
checkArgument(((request.getFID() != null) && !(request.getFID().trim().isEmpty())), "The Parameter fid must not be null.");
UpdateElementType elementType = new UpdateElementType();
elementType.setTypeName(request.getTypeName());
List<PropertyType> properties = super.getPropertyToUpdate(request.getAttributes());
elementType.setProperty(properties);
if (request.getSRS() != null) {
elementType.setSrsName(request.getSRS());
}
elementType.setInputFormat(request.getInputFormat() != null ? request.getInputFormat() : "x-application/gml:3");
FeatureIdType fid = new FeatureIdType();
fid.setFid(request.getFID());
FilterType filter = new FilterType();
filter.setId(asList(filterFactory.createFeatureId(fid)));
elementType.setFilter(filter);
return elementType;
}
Aggregations