uk.ac.ebi.intenz.domain.enzyme
Class EnzymaticReactions

java.lang.Object
  extended by uk.ac.ebi.intenz.domain.enzyme.EnzymaticReactions
All Implemented Interfaces:
Iterable<EnzymaticReactions.VisibleReaction>, Collection<EnzymaticReactions.VisibleReaction>

public class EnzymaticReactions
extends Object
implements Collection<EnzymaticReactions.VisibleReaction>

A collection of alternative reactions catalysed by one enzyme entry. Each reaction can have a view set independently, and a IUBMB flag (main reaction assigned by the organization to an EC number). Note that only Rhea reactions can have this flag set (i.e. textual descriptions will never have it).
Note that sequential reactions (steps in an overall reaction) and coupled reactions (elementary reactions in undefined order) should be handled in Rhea.

Author:
rafalcan

Nested Class Summary
 class EnzymaticReactions.VisibleReaction
          Utility class to wrap a Reaction with the views where it is available and the IUBMB flag.
 
Constructor Summary
EnzymaticReactions()
           
 
Method Summary
 boolean add(EnzymaticReactions.VisibleReaction arg0)
           
 boolean add(EnzymaticReactions er)
          Adds several reactions to the list in one go.
 boolean add(uk.ac.ebi.rhea.domain.Reaction reaction, String view, boolean iubmb)
          Adds a reaction to the list.
 boolean addAll(Collection<? extends EnzymaticReactions.VisibleReaction> arg0)
           
 void clear()
           
 boolean contains(Object arg0)
           
 boolean containsAll(Collection<?> arg0)
           
 boolean equals(Object obj)
           
 EnzymaticReactions forView(View theView)
          Filters this collection of reactions for a given view.
 uk.ac.ebi.rhea.domain.Reaction getReaction(int i)
           
 boolean getReactionIubmbFlag(int i)
          Has a reaction the IUBMB flag set?
 List<uk.ac.ebi.rhea.domain.Reaction> getReactions(View theView)
           
 EnzymeViewConstant getReactionView(int i)
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<EnzymaticReactions.VisibleReaction> iterator()
           
 boolean remove(Object arg0)
           
 boolean removeAll(Collection<?> arg0)
           
 void removeReaction(uk.ac.ebi.rhea.domain.Reaction reaction)
          Removes a reaction from the list, no matter its view.
 boolean retainAll(Collection<?> arg0)
           
 void setReactions(LinkedHashSet<EnzymaticReactions.VisibleReaction> reactions)
           
 int size()
           
 Object[] toArray()
           
<VisibleReaction>
VisibleReaction[]
toArray(VisibleReaction[] arg0)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnzymaticReactions

public EnzymaticReactions()
Method Detail

size

public int size()
Specified by:
size in interface Collection<EnzymaticReactions.VisibleReaction>
Returns:
the number of reactions held by this object.

getReaction

public uk.ac.ebi.rhea.domain.Reaction getReaction(int i)

getReactions

public List<uk.ac.ebi.rhea.domain.Reaction> getReactions(View theView)
Parameters:
view -
Returns:
a List containing the Reactions whose view match the parameter. For the IntEnz view, if there is at least one public Rhea reaction, only public Rhea reactions are returned. Obsolete Rhea reactions are ignored.

forView

public EnzymaticReactions forView(View theView)
Filters this collection of reactions for a given view.

Parameters:
view - the view used as filter.
Returns:
a subset of this collection, containing only reactions in the given view. For the IntEnz view, if there is at least one public Rhea reaction, only public Rhea reactions are returned.
Since:
4.3.0

getReactionView

public EnzymeViewConstant getReactionView(int i)

getReactionIubmbFlag

public boolean getReactionIubmbFlag(int i)
Has a reaction the IUBMB flag set?

Parameters:
i - the index of the reaction.
Returns:
the IUBMB flag.
Since:
4.2.7

add

public boolean add(uk.ac.ebi.rhea.domain.Reaction reaction,
                   String view,
                   boolean iubmb)
Adds a reaction to the list. If it is already listed, even with a different web view, nothing is done.

Parameters:
reaction -
view -
iubmb -
Returns:
true if the set of reactions is changed.

add

public boolean add(EnzymaticReactions er)
Adds several reactions to the list in one go.

Parameters:
er -
Returns:
true if the set of reactions is changed.

removeReaction

public void removeReaction(uk.ac.ebi.rhea.domain.Reaction reaction)
Removes a reaction from the list, no matter its view.

Parameters:
reaction -

setReactions

public void setReactions(LinkedHashSet<EnzymaticReactions.VisibleReaction> reactions)

equals

public boolean equals(Object obj)
Specified by:
equals in interface Collection<EnzymaticReactions.VisibleReaction>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<EnzymaticReactions.VisibleReaction>
Overrides:
hashCode in class Object

iterator

public Iterator<EnzymaticReactions.VisibleReaction> iterator()
Specified by:
iterator in interface Iterable<EnzymaticReactions.VisibleReaction>
Specified by:
iterator in interface Collection<EnzymaticReactions.VisibleReaction>

add

public boolean add(EnzymaticReactions.VisibleReaction arg0)
Specified by:
add in interface Collection<EnzymaticReactions.VisibleReaction>

addAll

public boolean addAll(Collection<? extends EnzymaticReactions.VisibleReaction> arg0)
Specified by:
addAll in interface Collection<EnzymaticReactions.VisibleReaction>

clear

public void clear()
Specified by:
clear in interface Collection<EnzymaticReactions.VisibleReaction>

contains

public boolean contains(Object arg0)
Specified by:
contains in interface Collection<EnzymaticReactions.VisibleReaction>

containsAll

public boolean containsAll(Collection<?> arg0)
Specified by:
containsAll in interface Collection<EnzymaticReactions.VisibleReaction>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<EnzymaticReactions.VisibleReaction>

remove

public boolean remove(Object arg0)
Specified by:
remove in interface Collection<EnzymaticReactions.VisibleReaction>

removeAll

public boolean removeAll(Collection<?> arg0)
Specified by:
removeAll in interface Collection<EnzymaticReactions.VisibleReaction>

retainAll

public boolean retainAll(Collection<?> arg0)
Specified by:
retainAll in interface Collection<EnzymaticReactions.VisibleReaction>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<EnzymaticReactions.VisibleReaction>

toArray

public <VisibleReaction> VisibleReaction[] toArray(VisibleReaction[] arg0)
Specified by:
toArray in interface Collection<EnzymaticReactions.VisibleReaction>


Copyright © 2013 EMBL-EBI. All Rights Reserved.