SigPath

org.sigpath.task.navigator
Class TExportBase

java.lang.Object
  extended by org.sigpath.task.util.BaseTask
      extended by org.sigpath.task.navigator.TExportBase
Direct Known Subclasses:
TExportChangeLog, TExportComplex, TExportConcentrationMeasurement, TExportEnzymaticReaction, TExportKinetic, TExportKineticCustom, TExportLiteratureReference, TExportLiteratureReferences, TExportModel, TExportModifiedChemical, TExportNamedChemical, TExportNamedChemicalInteraction, TExportOrganism, TExportPathway, TExportPendingList, TExportProtein, TExportReaction, TExportSmallMolecule, TExportUserComment

public class TExportBase
extends BaseTask

Navigator Base Class for Exporting SigPath datamodel objects to SigPathSubmission. TODO: More methods may be added to BaseTask class.


Field Summary
protected  List idRefActions
           
protected  SigpathSubmission root
           
 
Fields inherited from class org.sigpath.task.util.BaseTask
SEPARATOR
 
Constructor Summary
TExportBase(NavigatorEntityManager entityManager, SigpathSubmission root, HashMap spidsToTempIDs, List idRefActions)
           
 
Method Summary
protected  Change_log addChangeLog(SigPathEntity spe)
          Adds Change Log Information to XML Document.
protected  Reviews addReviews(SigPathEntity spe)
          Adds Review Information to XML Document.
protected  void addStandalone(Model spModel)
          adds a standalone model to the submission (assumes the submission is standalone)
protected  String clearEmptyField(String description)
           
 Molecule[] componentsToMolecules(SigPathEntity entity)
          Converts the components of a complex into XLM molecules.
protected  InteractionRef createInteractionReference(Interaction interaction)
          Return an XML interaction-ref element.
 Molecule createMolecule(Chemical sp_chem, HashMap spidsToTempIDs, SigpathSubmission root)
          Creates a Castor molecule object given a SigPath chemical.
protected  String getACDB(Chemical chemical)
          Returns a valid ACDB for a Chemical object.
 CustomKinetic getCustomKinetic(Kinetic kinetic)
          Gets the kinetic custom when the parameter is of class (KineticCustom).
protected  NavigatorEntityManager getEntityManager()
           
protected  EnzymaticParameters getEnzymaticReactionParameters(EnzymaticReaction spEnzymaticReaction)
           
protected  Enzyme getEnzyme(EnzymaticReaction jdoInstance)
           
protected  Formula getFormula(KineticCustom kinetic)
           
protected  HashMap getIdMap()
          Gets HashMap.
protected  KineticBindings getKineticBindings(KineticInteraction kInt)
           
protected  KineticRef getKineticRef(KineticInteraction reaction)
          here the distinction between
 NamedChemicalRef[] getNamedChemicalRef(NamedChemicalInteraction jdoInstance)
           
protected  ParametersBindingsDeclaration getParametersBindingsDeclaration(KineticCustom kinetic)
           
protected  PreviousVersion getPreviousVersion(Model spModel)
           
 Left getReactionLeftSide(Collection left)
           
 Modifiers getReactionMidleSide(Collection modifiers)
           
protected  Parameters getReactionParameters(Reaction reaction)
           
 Right getReactionRightSide(Collection right)
           
protected  SpeciesBindingsDeclaration getSpeciesBindingsDeclaration(KineticCustom kinetic)
           
 boolean isStandaloneOutput()
          Deprecated. Use TExportStandaloneModel instead
protected  void postProcessConcentrationMeasurement(ConcentrationMeasurement spCM, Concentration_measurement cm)
           
protected  void postProcessEnzymaticReaction(EnzymaticReaction enzymaticReaction, EnzymaticReaction castorInstance)
           
protected  void postProcessModel(Model spModel, Model model)
           
protected  void postProcessPendingList(PendingList jdoInstance, Pending_list castorInstance)
           
protected  void postProcessReaction(Reaction jdoInstance, Reaction castorInstance)
           
protected  void processChemicals(Collection molecs, StringBuffer text)
          get short names for chemicals and builds a reaction's description while doing this
protected  void setExcludedReactions(Model spModel, Model model)
           
static boolean setSpid(Chemical sp_chem, Molecule mol)
          Sets a spid attribute on the molecule only if the chemical does not refers to background information, and if no idref is provided for the molecule.
 void setStandaloneOutput(boolean standaloneOutput)
          Deprecated. Use TExportStandaloneModel instead
 
Methods inherited from class org.sigpath.task.util.BaseTask
addInContactWiths, getCompartment, getCreatedBy, getExcludedReactions, getModelCompartments, getMoleculeConcentration, getTargetUnit, localConcentrationToLocation, setOutsides, setUniqueIdsForCompartments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

protected SigpathSubmission root

idRefActions

protected List idRefActions
Constructor Detail

TExportBase

public TExportBase(NavigatorEntityManager entityManager,
                   SigpathSubmission root,
                   HashMap spidsToTempIDs,
                   List idRefActions)
Method Detail

createInteractionReference

protected InteractionRef createInteractionReference(Interaction interaction)
Return an XML interaction-ref element.

Parameters:
interaction - The interaction the reference will point to.
Returns:
InteractionRef

getIdMap

protected HashMap getIdMap()
Gets HashMap.

Returns:
Hashmap of SPIDs to TempIDs

isStandaloneOutput

public boolean isStandaloneOutput()
Deprecated. Use TExportStandaloneModel instead

Should this model be exported standalone?

Returns:
True if the model should be exported so that it can be reimported in a fresh database.

setStandaloneOutput

public void setStandaloneOutput(boolean standaloneOutput)
Deprecated. Use TExportStandaloneModel instead

Decide if the output should be standalone. Standalone outputs will contain all the information needed to reconstruct a model in a fresh database. In practice, when standalone output is set to true, the XML output will include molecules even if they are background information. The model will also include reactions and nzymatic reactions that it references. Standalone outputs are useful to generate standalone XML submissions for models. This comes handy when building regression tests for model export.

Parameters:
standaloneOutput - true to generate standalone output. false (default) otherwise.

addChangeLog

protected Change_log addChangeLog(SigPathEntity spe)
Adds Change Log Information to XML Document.


addReviews

protected Reviews addReviews(SigPathEntity spe)
Adds Review Information to XML Document.


addStandalone

protected void addStandalone(Model spModel)
adds a standalone model to the submission (assumes the submission is standalone)

Parameters:
spModel -

clearEmptyField

protected String clearEmptyField(String description)

componentsToMolecules

public Molecule[] componentsToMolecules(SigPathEntity entity)
Converts the components of a complex into XLM molecules.

Parameters:
entity -
Returns:
org.sigpath.bioimport.reaction2.Molecule[]

createMolecule

public Molecule createMolecule(Chemical sp_chem,
                               HashMap spidsToTempIDs,
                               SigpathSubmission root)
Creates a Castor molecule object given a SigPath chemical. If the chemical has already been added to the submission then the molecule is created with an idRef to that castor chemical. If the chemical has not already been added and it is a complex or a modified chemical, then the Castor complex or modified chemical is created and the molecule has an idRef to that castor component. If the chemical has not already been added, and it is not a complex or a modified chemical then the molecule is created with the accession code/database pair and organism. SigPath tries to optimize which accession code/database pair to use, so that the pair identifies a single chemical in the current database. The current strategy is to look for accession codes from SwissProt, find the first one which uniquely identifies a chemical in the current database and return it. If no accession code for SwissProt is available, then the first accession code found is used.

Parameters:
sp_chem - Sigpath Chemical
spidsToTempIDs - HashMap that maps spids to idRefs
root - SigpathSubmission root
Returns:
org.sigpath.bioimport.reaction2.Molecule Castor molecule

setSpid

public static boolean setSpid(Chemical sp_chem,
                              Molecule mol)
Sets a spid attribute on the molecule only if the chemical does not refers to background information, and if no idref is provided for the molecule.

Parameters:
sp_chem - Chemical (source)
mol - molecule (destination).
Returns:
True if the spid attribute was set, false otherwise.

getCustomKinetic

public CustomKinetic getCustomKinetic(Kinetic kinetic)
Gets the kinetic custom when the parameter is of class (KineticCustom). The method uses the TExportKineticCustom export class

Parameters:
kinetic -
Returns:
CustomKinetic

getEnzymaticReactionParameters

protected EnzymaticParameters getEnzymaticReactionParameters(EnzymaticReaction spEnzymaticReaction)

getEnzyme

protected Enzyme getEnzyme(EnzymaticReaction jdoInstance)

getFormula

protected Formula getFormula(KineticCustom kinetic)
                      throws SigPathDatabaseException
Throws:
SigPathDatabaseException

getKineticBindings

protected KineticBindings getKineticBindings(KineticInteraction kInt)
                                      throws SigPathDatabaseException
Throws:
SigPathDatabaseException

getKineticRef

protected KineticRef getKineticRef(KineticInteraction reaction)
here the distinction between

Parameters:
reaction -
Returns:
KineticRef

getNamedChemicalRef

public NamedChemicalRef[] getNamedChemicalRef(NamedChemicalInteraction jdoInstance)

getParametersBindingsDeclaration

protected ParametersBindingsDeclaration getParametersBindingsDeclaration(KineticCustom kinetic)

getReactionLeftSide

public Left getReactionLeftSide(Collection left)

getReactionMidleSide

public Modifiers getReactionMidleSide(Collection modifiers)

getReactionParameters

protected Parameters getReactionParameters(Reaction reaction)

getReactionRightSide

public Right getReactionRightSide(Collection right)

getSpeciesBindingsDeclaration

protected SpeciesBindingsDeclaration getSpeciesBindingsDeclaration(KineticCustom kinetic)
                                                            throws SigPathDatabaseException
Throws:
SigPathDatabaseException

postProcessConcentrationMeasurement

protected void postProcessConcentrationMeasurement(ConcentrationMeasurement spCM,
                                                   Concentration_measurement cm)

getACDB

protected String getACDB(Chemical chemical)
Returns a valid ACDB for a Chemical object. Preference is given to the SWISSPROT database

Parameters:
chemical - The chemical to get the ACDB for
Returns:
A valid ACDB or null if none could be found

postProcessEnzymaticReaction

protected void postProcessEnzymaticReaction(EnzymaticReaction enzymaticReaction,
                                            EnzymaticReaction castorInstance)

postProcessReaction

protected void postProcessReaction(Reaction jdoInstance,
                                   Reaction castorInstance)

processChemicals

protected void processChemicals(Collection molecs,
                                StringBuffer text)
                         throws SigPathDatabaseException
get short names for chemicals and builds a reaction's description while doing this

Parameters:
molecs -
text -
Throws:
SigPathDatabaseException

getPreviousVersion

protected PreviousVersion getPreviousVersion(Model spModel)

setExcludedReactions

protected void setExcludedReactions(Model spModel,
                                    Model model)

postProcessModel

protected void postProcessModel(Model spModel,
                                Model model)

postProcessPendingList

protected void postProcessPendingList(PendingList jdoInstance,
                                      Pending_list castorInstance)

getEntityManager

protected NavigatorEntityManager getEntityManager()

SigPath

Copyright © 2002-2005 Institute for Computational Biomedicine, All Rights Reserved.