Package psidev.psi.mi.jami.tab.io.parser
Class AbstractInteractionLineParser<T extends Interaction,P extends Participant,F extends Feature>
- java.lang.Object
-
- psidev.psi.mi.jami.tab.io.parser.MitabLineParser<T,P,F>
-
- psidev.psi.mi.jami.tab.io.parser.AbstractInteractionLineParser<T,P,F>
-
- All Implemented Interfaces:
MitabLineParserConstants
- Direct Known Subclasses:
AbstractInteractionEvidenceLineParser
,AbstractLightInteractionLineParser
,AbstractModelledInteractionLineParser
public abstract class AbstractInteractionLineParser<T extends Interaction,P extends Participant,F extends Feature> extends MitabLineParser<T,P,F>
Abstract mitab line parser- Since:
20/06/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
-
Fields inherited from class psidev.psi.mi.jami.tab.io.parser.MitabLineParser
jj_nt, token, token_source
-
Fields inherited from interface psidev.psi.mi.jami.tab.io.parser.MitabLineParserConstants
CLOSE_PAREN, COLON, COLUMN_SEPARATOR, COMMENT, DASH, DEFAULT, EOF, FIELD_SEPARATOR, LINE_SEPARATOR, OPEN_PAREN, QUOTED_STRING, RANGE_SEPARATOR, tokenImage, UNRESERVED_STRING
-
-
Constructor Summary
Constructors Constructor Description AbstractInteractionLineParser(InputStream stream)
Constructor for AbstractInteractionLineParser.AbstractInteractionLineParser(InputStream stream, String encoding)
Constructor for AbstractInteractionLineParser.AbstractInteractionLineParser(Reader stream)
Constructor for AbstractInteractionLineParser.AbstractInteractionLineParser(MitabLineParserTokenManager tm)
Constructor for AbstractInteractionLineParser.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
createAliasFromAltId(Interactor interactor, MitabXref ref)
createAliasFromAltId.protected void
createChecksumFromAlias(Interactor interactor, MitabAlias alias)
createChecksumFromAlias.protected void
createChecksumFromAltId(Interactor interactor, MitabXref ref)
createChecksumFromAltId.protected void
createChecksumFromId(Interaction interaction, MitabXref ref)
createChecksumFromId.protected abstract T
createInteraction()
createInteraction.protected Interactor
createInteractorFrom(Collection<MitabXref> uniqueId, Collection<MitabXref> altid, Collection<MitabAlias> aliases, Collection<MitabOrganism> taxid, Collection<MitabCvTerm> type, Collection<MitabXref> xref, Collection<MitabChecksum> checksum, int line, int column, int mitabColumn)
createInteractorFrom.protected void
fillInteractorWithAliases(Collection<MitabAlias> aliases, Interactor interactor)
fillInteractorWithAliases.protected void
fillInteractorWithAlternativeIdentifiers(Collection<MitabXref> altid, Interactor interactor)
fillInteractorWithAlternativeIdentifiers.protected String[]
findInteractorShortNameAndFullNameFrom(Collection<MitabXref> uniqueId, Collection<MitabXref> altid, Collection<MitabAlias> aliases, int line, int column, int mitabColumn)
findInteractorShortNameAndFullNameFrom.InteractorFactory
getInteractorFactory()
Getter for the fieldinteractorFactory
.MitabParserListener
getParserListener()
boolean
hasFinished()
hasFinished.protected void
initialiseExpansionMethod(Collection<MitabCvTerm> expansion, T interaction)
initialiseExpansionMethod.protected void
initialiseInteractionIdentifiers(Collection<MitabXref> interactionIds, T interaction)
initialiseInteractionIdentifiers.protected void
initialiseOrganism(Collection<MitabOrganism> organisms, Interactor interactor)
initialiseOrganism.protected void
processInteractorPool(Collection<MitabXref> xref, InteractorPool interactor)
processInteractorPool.protected void
processTextFor(MitabFeature feature, String text)
processTextFor.void
ReInit(InputStream stream)
Reinitialise.void
ReInit(InputStream stream, String encoding)
Reinitialise.void
ReInit(Reader stream)
Reinitialise.void
ReInit(MitabLineParserTokenManager tm)
Reinitialise.void
setInteractorFactory(InteractorFactory interactorFactory)
Setter for the fieldinteractorFactory
.void
setParserListener(MitabParserListener listener)
-
Methods inherited from class psidev.psi.mi.jami.tab.io.parser.MitabLineParser
alias, aliases, annotation, annotations, author, checksum, checksums, complexExpansion, confidence, confidences, cvTerm, cvTerms, date, dates, disable_tracing, enable_tracing, expansion, feature, features, firstAuthors, generateParseException, getNextToken, getToken, id, ids, MitabLine, negative, organism, parameter, parameters, range, safeFreeText, safePosition, safeStoichiometry, safeString, source, sourceDbs, stoichiometry, stoichiometryList, taxId
-
-
-
-
Constructor Detail
-
AbstractInteractionLineParser
public AbstractInteractionLineParser(InputStream stream)
Constructor for AbstractInteractionLineParser.
- Parameters:
stream
- aInputStream
object.
-
AbstractInteractionLineParser
public AbstractInteractionLineParser(InputStream stream, String encoding)
Constructor for AbstractInteractionLineParser.
- Parameters:
stream
- aInputStream
object.encoding
- aString
object.
-
AbstractInteractionLineParser
public AbstractInteractionLineParser(Reader stream)
Constructor for AbstractInteractionLineParser.
- Parameters:
stream
- aReader
object.
-
AbstractInteractionLineParser
public AbstractInteractionLineParser(MitabLineParserTokenManager tm)
Constructor for AbstractInteractionLineParser.
- Parameters:
tm
- aMitabLineParserTokenManager
object.
-
-
Method Detail
-
getParserListener
public MitabParserListener getParserListener()
- Specified by:
getParserListener
in classMitabLineParser<T extends Interaction,P extends Participant,F extends Feature>
-
setParserListener
public void setParserListener(MitabParserListener listener)
- Specified by:
setParserListener
in classMitabLineParser<T extends Interaction,P extends Participant,F extends Feature>
-
getInteractorFactory
public InteractorFactory getInteractorFactory()
Getter for the field
interactorFactory
.- Returns:
- a
InteractorFactory
object.
-
setInteractorFactory
public void setInteractorFactory(InteractorFactory interactorFactory)
Setter for the field
interactorFactory
.- Parameters:
interactorFactory
- aInteractorFactory
object.
-
ReInit
public void ReInit(InputStream stream)
Reinitialise.- Overrides:
ReInit
in classMitabLineParser<T extends Interaction,P extends Participant,F extends Feature>
- Parameters:
stream
- aInputStream
object.
-
ReInit
public void ReInit(InputStream stream, String encoding)
Reinitialise.- Overrides:
ReInit
in classMitabLineParser<T extends Interaction,P extends Participant,F extends Feature>
- Parameters:
stream
- aInputStream
object.encoding
- aString
object.
-
ReInit
public void ReInit(Reader stream)
Reinitialise.- Overrides:
ReInit
in classMitabLineParser<T extends Interaction,P extends Participant,F extends Feature>
- Parameters:
stream
- aInputStream
object.
-
ReInit
public void ReInit(MitabLineParserTokenManager tm)
Reinitialise.- Overrides:
ReInit
in classMitabLineParser<T extends Interaction,P extends Participant,F extends Feature>
- Parameters:
tm
- aMitabLineParserTokenManager
object.
-
hasFinished
public boolean hasFinished()
hasFinished.
- Specified by:
hasFinished
in classMitabLineParser<T extends Interaction,P extends Participant,F extends Feature>
- Returns:
- a boolean.
-
initialiseInteractionIdentifiers
protected void initialiseInteractionIdentifiers(Collection<MitabXref> interactionIds, T interaction)
initialiseInteractionIdentifiers.
- Parameters:
interactionIds
- aCollection
object.interaction
- a T object.
-
createInteractorFrom
protected Interactor createInteractorFrom(Collection<MitabXref> uniqueId, Collection<MitabXref> altid, Collection<MitabAlias> aliases, Collection<MitabOrganism> taxid, Collection<MitabCvTerm> type, Collection<MitabXref> xref, Collection<MitabChecksum> checksum, int line, int column, int mitabColumn)
createInteractorFrom.
- Parameters:
uniqueId
- aCollection
object.altid
- aCollection
object.aliases
- aCollection
object.taxid
- aCollection
object.type
- aCollection
object.xref
- aCollection
object.checksum
- aCollection
object.line
- a int.column
- a int.mitabColumn
- a int.- Returns:
- a
Interactor
object.
-
processInteractorPool
protected void processInteractorPool(Collection<MitabXref> xref, InteractorPool interactor)
processInteractorPool.
- Parameters:
xref
- aCollection
object.interactor
- aInteractorPool
object.
-
findInteractorShortNameAndFullNameFrom
protected String[] findInteractorShortNameAndFullNameFrom(Collection<MitabXref> uniqueId, Collection<MitabXref> altid, Collection<MitabAlias> aliases, int line, int column, int mitabColumn)
findInteractorShortNameAndFullNameFrom.
- Parameters:
uniqueId
- aCollection
object.altid
- aCollection
object.aliases
- aCollection
object.line
- a int.column
- a int.mitabColumn
- a int.- Returns:
- an array of
String
objects.
-
fillInteractorWithAlternativeIdentifiers
protected void fillInteractorWithAlternativeIdentifiers(Collection<MitabXref> altid, Interactor interactor)
fillInteractorWithAlternativeIdentifiers.
- Parameters:
altid
- aCollection
object.interactor
- aInteractor
object.
-
fillInteractorWithAliases
protected void fillInteractorWithAliases(Collection<MitabAlias> aliases, Interactor interactor)
fillInteractorWithAliases.
- Parameters:
aliases
- aCollection
object.interactor
- aInteractor
object.
-
initialiseOrganism
protected void initialiseOrganism(Collection<MitabOrganism> organisms, Interactor interactor)
initialiseOrganism.
- Parameters:
organisms
- aCollection
object.interactor
- aInteractor
object.
-
createChecksumFromId
protected void createChecksumFromId(Interaction interaction, MitabXref ref)
createChecksumFromId.
- Parameters:
interaction
- aInteraction
object.ref
- aMitabXref
object.
-
createChecksumFromAltId
protected void createChecksumFromAltId(Interactor interactor, MitabXref ref)
createChecksumFromAltId.
- Parameters:
interactor
- aInteractor
object.ref
- aMitabXref
object.
-
createAliasFromAltId
protected void createAliasFromAltId(Interactor interactor, MitabXref ref)
createAliasFromAltId.
- Parameters:
interactor
- aInteractor
object.ref
- aMitabXref
object.
-
createChecksumFromAlias
protected void createChecksumFromAlias(Interactor interactor, MitabAlias alias)
createChecksumFromAlias.
- Parameters:
interactor
- aInteractor
object.alias
- aMitabAlias
object.
-
initialiseExpansionMethod
protected void initialiseExpansionMethod(Collection<MitabCvTerm> expansion, T interaction)
initialiseExpansionMethod.
- Parameters:
expansion
- aCollection
object.interaction
- a T object.
-
createInteraction
protected abstract T createInteraction()
createInteraction.
- Returns:
- a T object.
-
processTextFor
protected void processTextFor(MitabFeature feature, String text)
processTextFor.
- Parameters:
feature
- aMitabFeature
object.text
- aString
object.
-
-