Package org.bridgedb.pairs
Class SyscodeBasedCodeMapper
- java.lang.Object
-
- org.bridgedb.pairs.SyscodeBasedCodeMapper
-
- All Implemented Interfaces:
CodeMapper
public class SyscodeBasedCodeMapper extends Object implements CodeMapper
Basic code mapper which always uses xref.id and DataSource.systemCode- Author:
- Christian
-
-
Constructor Summary
Constructors Constructor Description SyscodeBasedCodeMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdSysCodePairtoIdSysCodePair(Xref xref)Creates an IdSysCodePair based on a xref.XreftoXref(IdSysCodePair pair)Creates a xref based on an IdSysCodePair Changes the ref.id and dataSource.systemCode if required.
-
-
-
Method Detail
-
toIdSysCodePair
public IdSysCodePair toIdSysCodePair(Xref xref)
Description copied from interface:CodeMapperCreates an IdSysCodePair based on a xref. Changes the ref.id and dataSource.systemCode if required.- Specified by:
toIdSysCodePairin interfaceCodeMapper- Returns:
- The pair used to represent this xref
-
toXref
public Xref toXref(IdSysCodePair pair) throws BridgeDBException
Description copied from interface:CodeMapperCreates a xref based on an IdSysCodePair Changes the ref.id and dataSource.systemCode if required.- Specified by:
toXrefin interfaceCodeMapper- Returns:
- The xref used to represent this pair
- Throws:
BridgeDBException- Normally thrown if the pair is invalid, incomplete or can not be converted to a valid xref. If the syscode does not convert to a valid DataSource
-
-