Package org.biojavax.bio.db.biosql
Class BioSQLCrossReferenceResolver
- java.lang.Object
-
- org.biojavax.bio.db.biosql.BioSQLCrossReferenceResolver
-
- All Implemented Interfaces:
CrossReferenceResolver
public class BioSQLCrossReferenceResolver extends Object implements CrossReferenceResolver
A simple implementation of CrossReferenceResolver- Since:
- 1.5
- Author:
- Richard Holland, Mark Schreiber, David Scott
-
-
Constructor Summary
Constructors Constructor Description BioSQLCrossReferenceResolver(Object session)Requires a Hibernate session to work correctly.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BioEntrygetRemoteBioEntry(CrossRef cr)Given theCrossRefreturn the correspondingBioEntrySymbolListgetRemoteSymbolList(CrossRef cr, Alphabet a)Given a cross reference, return the corresponding symbol list.
-
-
-
Constructor Detail
-
BioSQLCrossReferenceResolver
public BioSQLCrossReferenceResolver(Object session)
Requires a Hibernate session to work correctly. The session parameter is a Hibernate Session object and must not be null. It is this session that database objects will be retrieved from/persisted to.- See Also:
- org.hibernate.Session
-
-
Method Detail
-
getRemoteSymbolList
public SymbolList getRemoteSymbolList(CrossRef cr, Alphabet a)
Given a cross reference, return the corresponding symbol list.- Specified by:
getRemoteSymbolListin interfaceCrossReferenceResolver- Parameters:
cr- the cross reference to look up.a- the alphabet to construct the infinitely ambiguous symbol list over if it cannot be found.- Returns:
- the symbol list matching it. If none, return an infintely-ambiguous symbol list rather than null.
-
getRemoteBioEntry
public BioEntry getRemoteBioEntry(CrossRef cr)
Given theCrossRefreturn the correspondingBioEntry- Specified by:
getRemoteBioEntryin interfaceCrossReferenceResolver- Parameters:
cr- the cross reference- Returns:
- The cross referenced entry (most likely a
RichSequenceor null if it cannot be found.
-
-