diff --git a/services/src/main/java/org/fao/geonet/api/records/MetadataSampleApi.java b/services/src/main/java/org/fao/geonet/api/records/MetadataSampleApi.java index d0f31f84479..a026b3c1cf2 100644 --- a/services/src/main/java/org/fao/geonet/api/records/MetadataSampleApi.java +++ b/services/src/main/java/org/fao/geonet/api/records/MetadataSampleApi.java @@ -39,6 +39,7 @@ import org.fao.geonet.api.processing.report.SimpleMetadataProcessingReport; import org.fao.geonet.api.tools.i18n.LanguageUtils; import org.fao.geonet.constants.Geonet; +import org.fao.geonet.constants.Params; import org.fao.geonet.domain.AbstractMetadata; import org.fao.geonet.domain.Metadata; import org.fao.geonet.domain.MetadataType; @@ -123,8 +124,8 @@ SimpleMetadataProcessingReport addSamples( UserSession userSession = ApiUtils.getUserSession(request.getSession()); Element params = new Element("params"); - params.addContent(new Element("file_type").setText("mef")); - params.addContent(new Element("uuidAction").setText("overwrite")); + params.addContent(new Element(Params.FILE_TYPE).setText("mef")); + params.addContent(new Element(Params.UUID_ACTION).setText(MEFLib.UuidAction.GENERATEUUID.toString())); for (String schemaName : schema) { Log.info(Geonet.DATA_MANAGER, "Loading sample data for schema " + schemaName);