Package org.bridgedb.file
Class IDMappingReaderFromText
- java.lang.Object
-
- org.bridgedb.file.IDMappingReaderFromDelimitedReader
-
- org.bridgedb.file.IDMappingReaderFromText
-
- All Implemented Interfaces:
IDMappingReader
public class IDMappingReaderFromText extends IDMappingReaderFromDelimitedReader
Class for reading ID mapping data from delimited text file.- Author:
- gjj
-
-
Field Summary
Fields Modifier and Type Field Description protected URLurl-
Fields inherited from class org.bridgedb.file.IDMappingReaderFromDelimitedReader
dsValid, idMappingValid, regExDataSourceDelimiter, regExIDDelimiter
-
-
Constructor Summary
Constructors Constructor Description IDMappingReaderFromText(URL url, char[] dataSourceDelimiters)Transitivity is unsupported.IDMappingReaderFromText(URL url, char[] dataSourceDelimiters, char[] regExIDDelimiter)Transitivity is unsupported.IDMappingReaderFromText(URL url, char[] dataSourceDelimiters, char[] regExIDDelimiter, boolean transitivity)Constructor from theURLof a tab-delimited text file, delimiters to separate between different data sources and IDs and transitivity support.IDMappingReaderFromText(URL url, String regExDataSourceDelimiter)Transitivity is unsupported.IDMappingReaderFromText(URL url, String regExDataSourceDelimiter, String regExIDDelimiter)Transitivity is unsupported.IDMappingReaderFromText(URL url, String regExDataSourceDelimiter, String regExIDDelimiter, boolean transitivity)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetDataSourceDelimiters(char[] dataSourceDelimiters)Set delimiters between data sources.voidsetIDDelimiters(char[] idDelimiters)Set delimiters between data IDs.protected static Stringstrs2regex(char[] chs)-
Methods inherited from class org.bridgedb.file.IDMappingReaderFromDelimitedReader
addIDMapping, getDataSources, getIDMappings, getTransitivity, readData, readDataSources, readIDMappings, setDataSources, setTransitivity
-
-
-
-
Field Detail
-
url
protected final URL url
-
-
Constructor Detail
-
IDMappingReaderFromText
public IDMappingReaderFromText(URL url, char[] dataSourceDelimiters) throws IDMapperException
Transitivity is unsupported. No delimiter between IDs.- Parameters:
url- urlURLof the filedataSourceDelimiters- delimiters between data sources- Throws:
IDMapperException- if failed to read file
-
IDMappingReaderFromText
public IDMappingReaderFromText(URL url, char[] dataSourceDelimiters, char[] regExIDDelimiter) throws IDMapperException
Transitivity is unsupported.- Parameters:
url- urlURLof the filedataSourceDelimiters- delimiters between data sourcesregExIDDelimiter- delimiters between IDs- Throws:
IDMapperException- if failed to read file
-
IDMappingReaderFromText
public IDMappingReaderFromText(URL url, char[] dataSourceDelimiters, char[] regExIDDelimiter, boolean transitivity) throws IDMapperException
Constructor from theURLof a tab-delimited text file, delimiters to separate between different data sources and IDs and transitivity support.- Parameters:
url- urlURLof the filedataSourceDelimiters- delimiters between data sourcesregExIDDelimiter- delimiters between IDstransitivity- support transitivity if true- Throws:
IDMapperException- if failed to read file
-
IDMappingReaderFromText
public IDMappingReaderFromText(URL url, String regExDataSourceDelimiter) throws IDMapperException
Transitivity is unsupported. No delimiters between IDs.- Parameters:
url- theURLof the delimited text fileregExDataSourceDelimiter- regular expression of delimiter between data sources- Throws:
IDMapperException- if failed to read
-
IDMappingReaderFromText
public IDMappingReaderFromText(URL url, String regExDataSourceDelimiter, String regExIDDelimiter) throws IDMapperException
Transitivity is unsupported.- Parameters:
url- theURLof the delimited text fileregExDataSourceDelimiter- regular expression of delimiter between data sourcesregExIDDelimiter- regular expression of delimiter between IDs- Throws:
IDMapperException- if failed to read
-
IDMappingReaderFromText
public IDMappingReaderFromText(URL url, String regExDataSourceDelimiter, String regExIDDelimiter, boolean transitivity) throws IDMapperException
- Parameters:
url- theURLof the delimited text fileregExDataSourceDelimiter- regular expression of delimiter between data sourcesregExIDDelimiter- regular expression of delimiter between IDstransitivity- transitivity support- Throws:
IDMapperException- if failed to read
-
-
Method Detail
-
setDataSourceDelimiters
public void setDataSourceDelimiters(char[] dataSourceDelimiters)
Set delimiters between data sources.- Parameters:
dataSourceDelimiters- delimiters between data sources
-
setIDDelimiters
public void setIDDelimiters(char[] idDelimiters)
Set delimiters between data IDs.- Parameters:
idDelimiters- delimiters between data IDs
-
strs2regex
protected static String strs2regex(char[] chs)
-
-