forked from D-Net/dnet-hadoop
adding short description
This commit is contained in:
parent
ae08b3c0dd
commit
0c12d7bdd8
|
@ -10,6 +10,9 @@ import org.apache.commons.csv.CSVFormat;
|
||||||
import org.apache.commons.csv.CSVRecord;
|
import org.apache.commons.csv.CSVRecord;
|
||||||
import org.apache.commons.lang.reflect.FieldUtils;
|
import org.apache.commons.lang.reflect.FieldUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads a generic csv and maps it into classes that mirror its schema
|
||||||
|
*/
|
||||||
public class CSVParser {
|
public class CSVParser {
|
||||||
|
|
||||||
public <R> List<R> parse(String csvFile, String classForName)
|
public <R> List<R> parse(String csvFile, String classForName)
|
||||||
|
|
|
@ -3,6 +3,9 @@ package eu.dnetlib.dhp.actionmanager.project.utils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The model for the programme csv file
|
||||||
|
*/
|
||||||
public class CSVProgramme implements Serializable {
|
public class CSVProgramme implements Serializable {
|
||||||
private String parentProgramme;
|
private String parentProgramme;
|
||||||
private String frameworkProgramme;
|
private String frameworkProgramme;
|
||||||
|
|
|
@ -3,6 +3,9 @@ package eu.dnetlib.dhp.actionmanager.project.utils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the mmodel for the projects csv file
|
||||||
|
*/
|
||||||
public class CSVProject implements Serializable {
|
public class CSVProject implements Serializable {
|
||||||
private String rcn;
|
private String rcn;
|
||||||
private String id;
|
private String id;
|
||||||
|
|
|
@ -17,6 +17,9 @@ import org.apache.poi.ss.usermodel.Row;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads a generic excel file and maps it into classes that mirror its schema
|
||||||
|
*/
|
||||||
public class EXCELParser {
|
public class EXCELParser {
|
||||||
|
|
||||||
public <R> List<R> parse(InputStream file, String classForName)
|
public <R> List<R> parse(InputStream file, String classForName)
|
||||||
|
|
|
@ -3,6 +3,9 @@ package eu.dnetlib.dhp.actionmanager.project.utils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the model class for the topic excel file
|
||||||
|
*/
|
||||||
public class EXCELTopic implements Serializable {
|
public class EXCELTopic implements Serializable {
|
||||||
private String rcn;
|
private String rcn;
|
||||||
private String language;
|
private String language;
|
||||||
|
|
|
@ -20,6 +20,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import eu.dnetlib.dhp.actionmanager.project.httpconnector.HttpConnector;
|
import eu.dnetlib.dhp.actionmanager.project.httpconnector.HttpConnector;
|
||||||
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
|
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the parsing of a csv file and writes the Serialization of it in hdfs
|
||||||
|
*/
|
||||||
public class ReadCSV implements Closeable {
|
public class ReadCSV implements Closeable {
|
||||||
private static final Log log = LogFactory.getLog(ReadCSV.class);
|
private static final Log log = LogFactory.getLog(ReadCSV.class);
|
||||||
private final Configuration conf;
|
private final Configuration conf;
|
||||||
|
|
|
@ -17,6 +17,10 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import eu.dnetlib.dhp.actionmanager.project.httpconnector.HttpConnector;
|
import eu.dnetlib.dhp.actionmanager.project.httpconnector.HttpConnector;
|
||||||
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
|
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the parsing of an excel file and writes the Serialization of it in hdfs
|
||||||
|
*/
|
||||||
|
|
||||||
public class ReadExcel implements Closeable {
|
public class ReadExcel implements Closeable {
|
||||||
private static final Log log = LogFactory.getLog(ReadCSV.class);
|
private static final Log log = LogFactory.getLog(ReadCSV.class);
|
||||||
private final Configuration conf;
|
private final Configuration conf;
|
||||||
|
|
Loading…
Reference in New Issue