Class CSVMappingReader
- java.lang.Object
-
- org.aksw.limes.core.io.mapping.reader.AMappingReader
-
- org.aksw.limes.core.io.mapping.reader.CSVMappingReader
-
public class CSVMappingReader extends AMappingReader
Read AMapping from CSV file by default the CSV file delimiter is the comma, need to be set for other delimiters (including tab)- Version:
- Aug 12, 2016
- Author:
- Mohamed Sherif (sherif@informatik.uni-leipzig.de)
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringdelimiter-
Fields inherited from class org.aksw.limes.core.io.mapping.reader.AMappingReader
file
-
-
Constructor Summary
Constructors Constructor Description CSVMappingReader(String file)CSVMappingReader(String file, String delimiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetSDelimiter()AMappingread()AMappingreadThreeColumnFile()Read Mapping from the input 3 column CSV file First column contains source URIs Second column contains linking property Third column contains Target URIsAMappingreadThreeColumnFileWithSimilarity()Read Mapping from the input 3 column CSV file First column contains source URIs Second column contains Target URIs Third column contains similarityAMappingreadTwoColumnFile()Read Mapping from the input 2 column CSV file First column contains source URIs Second column contains Target URIs All similarities is set to 1.0voidsetDelimiter(String delimiter)set the delimiter used for reading the mapping from csv file
-
-
-
Field Detail
-
delimiter
protected String delimiter
-
-
Method Detail
-
read
public AMapping read()
- Specified by:
readin classAMappingReader
-
readTwoColumnFile
public AMapping readTwoColumnFile()
Read Mapping from the input 2 column CSV file First column contains source URIs Second column contains Target URIs All similarities is set to 1.0- Returns:
- AMapping object contains the mapping
-
readThreeColumnFileWithSimilarity
public AMapping readThreeColumnFileWithSimilarity()
Read Mapping from the input 3 column CSV file First column contains source URIs Second column contains Target URIs Third column contains similarity- Returns:
- AMapping object contains the mapping
-
readThreeColumnFile
public AMapping readThreeColumnFile()
Read Mapping from the input 3 column CSV file First column contains source URIs Second column contains linking property Third column contains Target URIs- Returns:
- AMapping object contains the mapping
-
getSDelimiter
public String getSDelimiter()
- Returns:
- the delimiter used for reading the mapping
-
setDelimiter
public void setDelimiter(String delimiter)
set the delimiter used for reading the mapping from csv file- Parameters:
delimiter- to be set
-
-