added titlecase on temporal and native period name
This commit is contained in:
parent
788fc3b734
commit
4a4da01d6b
|
@ -1,6 +1,7 @@
|
|||
package eu.dnetlib.ariadneplus.elasticsearch.model;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import org.apache.commons.text.WordUtils;
|
||||
|
||||
public class NativePeriod {
|
||||
private String from;
|
||||
|
@ -20,7 +21,7 @@ public class NativePeriod {
|
|||
}
|
||||
|
||||
public void setPeriodName(String periodName) {
|
||||
this.periodName = periodName;
|
||||
this.periodName = WordUtils.capitalizeFully(periodName);
|
||||
}
|
||||
|
||||
public String getUntil() {
|
||||
|
|
|
@ -2,6 +2,7 @@ package eu.dnetlib.ariadneplus.elasticsearch.model;
|
|||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import org.apache.commons.text.WordUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -24,7 +25,7 @@ public class Temporal {
|
|||
}
|
||||
|
||||
public void setPeriodName(String periodName) {
|
||||
this.periodName = periodName;
|
||||
this.periodName = WordUtils.capitalizeFully(periodName);
|
||||
}
|
||||
|
||||
public String getUntil() {
|
||||
|
|
|
@ -351,6 +351,16 @@ public class GraphDbReaderAndESIndexTest {
|
|||
readAndIndexTest(isRecord, recordId, datasource, collectionId);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Ignore
|
||||
public void uploadNormalizerTest() throws Exception {
|
||||
boolean isRecord = true;
|
||||
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/DCDF395A-2CC8-3FC2-B9A5-5A924090DF10";
|
||||
String datasource = "ads";
|
||||
String collectionId = "3";
|
||||
readAndIndexTest(isRecord, recordId, datasource, collectionId);
|
||||
}
|
||||
|
||||
private void readAndIndexTest(boolean isRecord, String recordId, String datasource, String collectionId) throws Exception {
|
||||
final ClassPathResource resource = new ClassPathResource("application.properties");
|
||||
Properties appProps = new Properties();
|
||||
|
|
Loading…
Reference in New Issue