Class 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 Detail

      • delimiter

        protected String delimiter
    • Constructor Detail

      • CSVMappingReader

        public CSVMappingReader​(String file)
        Parameters:
        file - input file for reading
      • CSVMappingReader

        public CSVMappingReader​(String file,
                                String delimiter)
        Parameters:
        file - input file for reading
        delimiter - of the file
    • Method Detail

      • 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