Class MinimalFeatureEvidenceUpdater
- java.lang.Object
-
- psidev.psi.mi.jami.enricher.impl.minimal.MinimalFeatureEnricher<FeatureEvidence>
-
- psidev.psi.mi.jami.enricher.impl.minimal.MinimalFeatureEvidenceEnricher
-
- psidev.psi.mi.jami.enricher.impl.minimal.MinimalFeatureEvidenceUpdater
-
- All Implemented Interfaces:
EventListener
,FeatureEnricher<FeatureEvidence>
,EnricherListener<Protein>
,InteractorEnricherListener<Protein>
,ProteinEnricherListener
,MIEnricher<FeatureEvidence>
,ProteinListeningFeatureEnricher<FeatureEvidence>
,AliasesChangeListener<Protein>
,AnnotationsChangeListener<Protein>
,ChecksumsChangeListener<Protein>
,IdentifiersChangeListener<Protein>
,InteractorChangeListener<Protein>
,PolymerChangeListener<Protein>
,ProteinChangeListener
,XrefsChangeListener<Protein>
public class MinimalFeatureEvidenceUpdater extends MinimalFeatureEvidenceEnricher
Provides minimal update of feature evidence. - update minimal properties of feature. See MinimalFeatureUpdater - update detection methods if cv term enricher is not null - Ignore all other properties of a feature- Since:
- 13/08/13
- Author:
- Gabriel Aldam (galdam@ebi.ac.uk)
-
-
Constructor Summary
Constructors Modifier Constructor Description MinimalFeatureEvidenceUpdater()
Constructor for MinimalFeatureEvidenceUpdater.protected
MinimalFeatureEvidenceUpdater(MinimalFeatureUpdater<FeatureEvidence> minimalUpdater)
Constructor for MinimalFeatureEvidenceUpdater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CvTermEnricher
getCvTermEnricher()
Gets the subEnricher for CvTerms.FeatureEnricherListener<FeatureEvidence>
getFeatureEnricherListener()
Retrieves the listener of feature changes.protected MinimalFeatureUpdater<FeatureEvidence>
getMinimalUpdater()
Getter for the fieldminimalUpdater
.void
onAddedAlias(Protein o, Alias added)
Listen to the event where an alias has been added to the object aliases.void
onAddedAnnotation(Protein o, Annotation added)
Listen to the event where an annotation has been added to the object annotations.void
onAddedChecksum(Protein interactor, Checksum added)
Listen to the event where a checksum has been added to the interactor checksums.void
onAddedIdentifier(Protein o, Xref added)
Listen to the event where an identifier has been added to the protein identifiers.void
onAddedXref(Protein o, Xref added)
Listen to the event where a xref has been added to the protein xrefs.void
onEnrichmentComplete(Protein object, EnrichmentStatus status, String message)
onEnrichmentComplete.void
onEnrichmentError(Protein object, String message, Exception e)
onEnrichmentError.void
onFullNameUpdate(Protein interactor, String oldFullName)
Listens for the event where the fullName has been changed.void
onInteractorTypeUpdate(Protein interactor, CvTerm old)
Listen to the event where the interactor type has been initialised.protected void
onInvalidRange(FeatureEvidence feature, Range range, Collection<String> errorMessages)
onInvalidRange.void
onOrganismUpdate(Protein interactor, Organism o)
Listen to the event where the organism of a interactor has been initialised.protected void
onOutOfDateRange(FeatureEvidence feature, Range range, Collection<String> errorMessages, String oldSequence)
onOutOfDateRange.void
onRemovedAlias(Protein o, Alias removed)
Listen to the event where an alias has been removed from the object aliases.void
onRemovedAnnotation(Protein o, Annotation removed)
Listen to the event where an annotation has been removed from the object annotations.void
onRemovedChecksum(Protein interactor, Checksum removed)
Listen to the event where a checksum has been removed from the interactor checksums.void
onRemovedIdentifier(Protein o, Xref removed)
Listen to the event where an identifier has been removed from the protein identifiers.void
onRemovedXref(Protein o, Xref removed)
Listen to the event where a xref has been removed from the interactor xrefs.void
onSequenceUpdate(Protein protein, String oldSequence)
Listen to the event where the sequence of a protein has been changed.void
onShortNameUpdate(Protein interactor, String oldShortName)
Listens for the event where the shortName has been changed.protected void
processDetectionMethods(FeatureEvidence featureToEnrich, FeatureEvidence source)
processDetectionMethods.void
setCvTermEnricher(CvTermEnricher cvTermEnricher)
setCvTermEnricher.void
setFeatureEnricherListener(FeatureEnricherListener<FeatureEvidence> featureEnricherListener)
setFeatureEnricherListener.protected boolean
updateRangePositions()
updateRangePositions.-
Methods inherited from class psidev.psi.mi.jami.enricher.impl.minimal.MinimalFeatureEvidenceEnricher
mergeDetectionMethods, processDetectionMethods, processOtherProperties, processOtherProperties
-
Methods inherited from class psidev.psi.mi.jami.enricher.impl.minimal.MinimalFeatureEnricher
enrich, enrich, enrich, processFeatureType, processFeatureType, processFullName, processIdentifiers, processMinimalUpdates, processMinimalUpdates, processRanges, processRanges, processRangeStatus, processShortLabel, setFeaturesWithRangesToUpdate
-
-
-
-
Constructor Detail
-
MinimalFeatureEvidenceUpdater
public MinimalFeatureEvidenceUpdater()
Constructor for MinimalFeatureEvidenceUpdater.
-
MinimalFeatureEvidenceUpdater
protected MinimalFeatureEvidenceUpdater(MinimalFeatureUpdater<FeatureEvidence> minimalUpdater)
Constructor for MinimalFeatureEvidenceUpdater.
- Parameters:
minimalUpdater
- aMinimalFeatureUpdater
object.
-
-
Method Detail
-
processDetectionMethods
protected void processDetectionMethods(FeatureEvidence featureToEnrich, FeatureEvidence source) throws EnricherException
processDetectionMethods.
- Overrides:
processDetectionMethods
in classMinimalFeatureEvidenceEnricher
- Parameters:
featureToEnrich
- aFeatureEvidence
object.source
- aFeatureEvidence
object.- Throws:
EnricherException
- if any.
-
setFeatureEnricherListener
public void setFeatureEnricherListener(FeatureEnricherListener<FeatureEvidence> featureEnricherListener)
setFeatureEnricherListener.
Sets the listener of feature changes. Can be null.- Specified by:
setFeatureEnricherListener
in interfaceFeatureEnricher<FeatureEvidence>
- Overrides:
setFeatureEnricherListener
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
featureEnricherListener
- aFeatureEnricherListener
object.
-
getFeatureEnricherListener
public FeatureEnricherListener<FeatureEvidence> getFeatureEnricherListener()
Retrieves the listener of feature changes. May be null if changes are not being listened to.- Specified by:
getFeatureEnricherListener
in interfaceFeatureEnricher<FeatureEvidence>
- Overrides:
getFeatureEnricherListener
in classMinimalFeatureEnricher<FeatureEvidence>
- Returns:
- The current listener of feature changes.
-
setCvTermEnricher
public void setCvTermEnricher(CvTermEnricher cvTermEnricher)
setCvTermEnricher.
Sets the subEnricher for CvTerms. Can be null.- Specified by:
setCvTermEnricher
in interfaceFeatureEnricher<FeatureEvidence>
- Overrides:
setCvTermEnricher
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
cvTermEnricher
- aCvTermEnricher
object.
-
getCvTermEnricher
public CvTermEnricher getCvTermEnricher()
Gets the subEnricher for CvTerms. Can be null.- Specified by:
getCvTermEnricher
in interfaceFeatureEnricher<FeatureEvidence>
- Overrides:
getCvTermEnricher
in classMinimalFeatureEnricher<FeatureEvidence>
- Returns:
- The CvTerm enricher which is being used.
-
onSequenceUpdate
public void onSequenceUpdate(Protein protein, String oldSequence)
Listen to the event where the sequence of a protein has been changed. If oldSequence is null, it means that the sequence has been initialised. If the sequence of the protein is null, it means that the sequence of the protein has been reset- Specified by:
onSequenceUpdate
in interfacePolymerChangeListener<Protein>
- Overrides:
onSequenceUpdate
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
protein
- : updated polymeroldSequence
- : old sequence
-
onShortNameUpdate
public void onShortNameUpdate(Protein interactor, String oldShortName)
Listens for the event where the shortName has been changed.- Specified by:
onShortNameUpdate
in interfaceInteractorChangeListener<Protein>
- Overrides:
onShortNameUpdate
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
interactor
- The interactor which has changed.oldShortName
- The old shortName.
-
onFullNameUpdate
public void onFullNameUpdate(Protein interactor, String oldFullName)
Listens for the event where the fullName has been changed.- Specified by:
onFullNameUpdate
in interfaceInteractorChangeListener<Protein>
- Overrides:
onFullNameUpdate
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
interactor
- The interactor which has changed.oldFullName
- The old fullName.
-
onOrganismUpdate
public void onOrganismUpdate(Protein interactor, Organism o)
Listen to the event where the organism of a interactor has been initialised. This event happens when a interactor does not have any organisms- Specified by:
onOrganismUpdate
in interfaceInteractorChangeListener<Protein>
- Overrides:
onOrganismUpdate
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
interactor
- The interactor which has changed.o
- aOrganism
object.
-
onInteractorTypeUpdate
public void onInteractorTypeUpdate(Protein interactor, CvTerm old)
Listen to the event where the interactor type has been initialised. This event happens when a interactor does not have any interactor types- Specified by:
onInteractorTypeUpdate
in interfaceInteractorChangeListener<Protein>
- Overrides:
onInteractorTypeUpdate
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
interactor
- The interactor which has changed.old
- aCvTerm
object.
-
onAddedAlias
public void onAddedAlias(Protein o, Alias added)
Listen to the event where an alias has been added to the object aliases.- Specified by:
onAddedAlias
in interfaceAliasesChangeListener<Protein>
- Overrides:
onAddedAlias
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
o
- The object which has changed.added
- The added alias.
-
onRemovedAlias
public void onRemovedAlias(Protein o, Alias removed)
Listen to the event where an alias has been removed from the object aliases.- Specified by:
onRemovedAlias
in interfaceAliasesChangeListener<Protein>
- Overrides:
onRemovedAlias
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
o
- The object which has changed.removed
- The removed alias.
-
onAddedAnnotation
public void onAddedAnnotation(Protein o, Annotation added)
Listen to the event where an annotation has been added to the object annotations.- Specified by:
onAddedAnnotation
in interfaceAnnotationsChangeListener<Protein>
- Overrides:
onAddedAnnotation
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
o
- : the parent of this annotationadded
- : the added annotation
-
onRemovedAnnotation
public void onRemovedAnnotation(Protein o, Annotation removed)
Listen to the event where an annotation has been removed from the object annotations.- Specified by:
onRemovedAnnotation
in interfaceAnnotationsChangeListener<Protein>
- Overrides:
onRemovedAnnotation
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
o
- : the parent of this annotationremoved
- : the removed annotation
-
onAddedChecksum
public void onAddedChecksum(Protein interactor, Checksum added)
Listen to the event where a checksum has been added to the interactor checksums.- Specified by:
onAddedChecksum
in interfaceChecksumsChangeListener<Protein>
- Overrides:
onAddedChecksum
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
interactor
- The interactor which has changed.added
- The added checksum.
-
onRemovedChecksum
public void onRemovedChecksum(Protein interactor, Checksum removed)
Listen to the event where a checksum has been removed from the interactor checksums.- Specified by:
onRemovedChecksum
in interfaceChecksumsChangeListener<Protein>
- Overrides:
onRemovedChecksum
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
interactor
- The interactor which has changed.removed
- The removed checksum.
-
onAddedIdentifier
public void onAddedIdentifier(Protein o, Xref added)
Listen to the event where an identifier has been added to the protein identifiers.- Specified by:
onAddedIdentifier
in interfaceIdentifiersChangeListener<Protein>
- Overrides:
onAddedIdentifier
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
o
- The object which has changed.added
- The added identifier
-
onRemovedIdentifier
public void onRemovedIdentifier(Protein o, Xref removed)
Listen to the event where an identifier has been removed from the protein identifiers.- Specified by:
onRemovedIdentifier
in interfaceIdentifiersChangeListener<Protein>
- Overrides:
onRemovedIdentifier
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
o
- The object which has changed.removed
- The removed identifier.
-
onAddedXref
public void onAddedXref(Protein o, Xref added)
Listen to the event where a xref has been added to the protein xrefs.- Specified by:
onAddedXref
in interfaceXrefsChangeListener<Protein>
- Overrides:
onAddedXref
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
o
- The object which has changed.added
- The added Xref.
-
onRemovedXref
public void onRemovedXref(Protein o, Xref removed)
Listen to the event where a xref has been removed from the interactor xrefs.- Specified by:
onRemovedXref
in interfaceXrefsChangeListener<Protein>
- Overrides:
onRemovedXref
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
o
- The object which has changed.removed
- The removed Xref.
-
updateRangePositions
protected boolean updateRangePositions()
updateRangePositions.
- Overrides:
updateRangePositions
in classMinimalFeatureEnricher<FeatureEvidence>
- Returns:
- a boolean.
-
onInvalidRange
protected void onInvalidRange(FeatureEvidence feature, Range range, Collection<String> errorMessages)
onInvalidRange.
- Overrides:
onInvalidRange
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
feature
- a F object.range
- aRange
object.errorMessages
- aCollection
object.
-
onOutOfDateRange
protected void onOutOfDateRange(FeatureEvidence feature, Range range, Collection<String> errorMessages, String oldSequence)
onOutOfDateRange.
- Overrides:
onOutOfDateRange
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
feature
- a F object.range
- aRange
object.errorMessages
- aCollection
object.oldSequence
- aString
object.
-
onEnrichmentComplete
public void onEnrichmentComplete(Protein object, EnrichmentStatus status, String message)
onEnrichmentComplete.
- Specified by:
onEnrichmentComplete
in interfaceEnricherListener<Protein>
- Overrides:
onEnrichmentComplete
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
object
- a T object.status
- aEnrichmentStatus
object.message
- aString
object.
-
onEnrichmentError
public void onEnrichmentError(Protein object, String message, Exception e)
onEnrichmentError.
- Specified by:
onEnrichmentError
in interfaceEnricherListener<Protein>
- Overrides:
onEnrichmentError
in classMinimalFeatureEnricher<FeatureEvidence>
- Parameters:
object
- a T object.message
- aString
object.e
- aException
object.
-
getMinimalUpdater
protected MinimalFeatureUpdater<FeatureEvidence> getMinimalUpdater()
Getter for the field
minimalUpdater
.- Returns:
- a
MinimalFeatureUpdater
object.
-
-