Package de.unirostock.sems.bives.ds.rn
Class ReactionNetworkReaction
- java.lang.Object
-
- de.unirostock.sems.bives.ds.rn.ReactionNetworkEntity
-
- de.unirostock.sems.bives.ds.rn.ReactionNetworkReaction
-
- All Implemented Interfaces:
GraphEntity
public class ReactionNetworkReaction extends ReactionNetworkEntity
The Class ReactionNetworkReaction representing a reaction in a reaction network.- Author:
- Martin Scharm
-
-
Field Summary
-
Fields inherited from class de.unirostock.sems.bives.ds.rn.ReactionNetworkEntity
docA, docB, id, labelA, labelB, singleDoc
-
Fields inherited from interface de.unirostock.sems.bives.ds.GraphEntity
DELETE, INSERT, MODIFIED, UNMODIFIED
-
-
Constructor Summary
Constructors Constructor Description ReactionNetworkReaction(ReactionNetwork rn, String labelA, String labelB, de.unirostock.sems.xmlutils.ds.DocumentNode docA, de.unirostock.sems.xmlutils.ds.DocumentNode docB, ReactionNetworkCompartment compartmentA, ReactionNetworkCompartment compartmentB, boolean reversible)
Instantiates a new ReactionNetwork reaction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInputA(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a reactant of this reaction in its original version.void
addInputB(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a reactant of this reaction in its modified version.void
addModA(ReactionNetworkSubstance subst, SBOTerm sbo)
Adds the modifier of this reaction in its original version.void
addModB(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a modifier of this reaction in its modified version.void
addOutputA(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a product of this reaction in its original version.void
addOutputB(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a product of this reaction in its modified version.ReactionNetworkCompartment
getCompartment()
Gets the compartment.Collection<ReactionNetworkSubstanceRef>
getInputs()
Gets the reactants.int
getModification()
Gets the modification of this entity.Collection<ReactionNetworkSubstanceRef>
getModifiers()
Gets the modifiers.Collection<ReactionNetworkSubstanceRef>
getOutputs()
Gets the products.String
getSBO()
Gets the sbo.boolean
isReversible()
Checks if is reversible.void
setCompartmentA(ReactionNetworkCompartment compartment)
Sets the compartment in original version.void
setCompartmentB(ReactionNetworkCompartment compartment)
Sets the compartment in modified version.void
setSingleDocument()
Sets the single document flag.
-
-
-
Constructor Detail
-
ReactionNetworkReaction
public ReactionNetworkReaction(ReactionNetwork rn, String labelA, String labelB, de.unirostock.sems.xmlutils.ds.DocumentNode docA, de.unirostock.sems.xmlutils.ds.DocumentNode docB, ReactionNetworkCompartment compartmentA, ReactionNetworkCompartment compartmentB, boolean reversible)
Instantiates a new ReactionNetwork reaction.- Parameters:
rn
- the reaction networklabelA
- the label of that reaction in the original documentlabelB
- the label of that reaction in the modified documentdocA
- the original documentdocB
- the modified documentcompartmentA
- the compartment acompartmentB
- the compartment breversible
- the reversible flag
-
-
Method Detail
-
setCompartmentA
public void setCompartmentA(ReactionNetworkCompartment compartment)
Sets the compartment in original version.- Parameters:
compartment
- the compartment in original version
-
setCompartmentB
public void setCompartmentB(ReactionNetworkCompartment compartment)
Sets the compartment in modified version.- Parameters:
compartment
- the compartment in modified version
-
getCompartment
public ReactionNetworkCompartment getCompartment()
Gets the compartment. Will return:- the original compartment, if it's the same compartment as in the modified version
- the compartment all substances involved in this reactions are from, if all substances originate from the same compartment
- null, otherwise
- Returns:
- the compartment
-
addInputA
public void addInputA(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a reactant of this reaction in its original version.- Parameters:
subst
- the substancesbo
- the SBOTerm describing the interaction
-
addOutputA
public void addOutputA(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a product of this reaction in its original version.- Parameters:
subst
- the substancesbo
- the SBOTerm describing the interaction
-
addModA
public void addModA(ReactionNetworkSubstance subst, SBOTerm sbo) throws BivesUnsupportedException
Adds the modifier of this reaction in its original version.- Parameters:
subst
- the substancesbo
- the SBOTerm describing the modification- Throws:
BivesUnsupportedException
- if one edges contains two types of modifications
-
addInputB
public void addInputB(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a reactant of this reaction in its modified version.- Parameters:
subst
- the substancesbo
- the SBOTerm describing the interaction
-
addOutputB
public void addOutputB(ReactionNetworkSubstance subst, SBOTerm sbo)
Add a product of this reaction in its modified version.- Parameters:
subst
- the substancesbo
- the SBOTerm describing the interaction
-
addModB
public void addModB(ReactionNetworkSubstance subst, SBOTerm sbo) throws BivesUnsupportedException
Add a modifier of this reaction in its modified version.- Parameters:
subst
- the substancesbo
- the SBOTerm describing the modification- Throws:
BivesUnsupportedException
- if one edges contains two types of modifications
-
getInputs
public Collection<ReactionNetworkSubstanceRef> getInputs()
Gets the reactants.- Returns:
- the reactants
-
getOutputs
public Collection<ReactionNetworkSubstanceRef> getOutputs()
Gets the products.- Returns:
- the products
-
getModifiers
public Collection<ReactionNetworkSubstanceRef> getModifiers()
Gets the modifiers.- Returns:
- the modifiers
-
getSBO
public String getSBO()
Gets the sbo.- Returns:
- the sbo
-
isReversible
public boolean isReversible()
Checks if is reversible.- Returns:
- true, if is reversible
-
setSingleDocument
public void setSingleDocument()
Sets the single document flag.- Overrides:
setSingleDocument
in classReactionNetworkEntity
-
getModification
public int getModification()
Description copied from class:ReactionNetworkEntity
Gets the modification of this entity.- Overrides:
getModification
in classReactionNetworkEntity
- Returns:
- the modification
-
-