hepdata is hosted by Hepforge, IPPP Durham

cedar.hepdata.model
Class Reaction

java.lang.Object
  extended by cedar.hepdata.model.Reaction
All Implemented Interfaces:
HDPersistable

public class Reaction
extends java.lang.Object
implements HDPersistable

A HEP process which may generate data

Version:
$Date: 2006-02-02 16:35:56 +0000 (Thu, 02 Feb 2006) $ $Revision: 500 $
Author:
S Butterworth

Constructor Summary
Reaction(HDObjectReader reader)
          builds a reaction from a file
Reaction(int reactionId)
          Build a reaction from the DB.
Reaction(int paperId, int dsId, int axId, java.lang.String description)
          Build a reaction from a description.
 
Method Summary
 void addFinalParticle(Particle particle)
          Adds a particle to the collection of particles produced in the reaction.
 int getAxisId()
           
 Particle getBeam()
           
 int getDatasetId()
          for migration purposes - actually reaction is associated with a number of papers
 java.lang.String getDescription()
           
 java.util.Collection<Particle> getFinalParticles()
          Returns an enumeration of Particles produced in the reaction
 java.lang.String getFState()
           
 int getId()
          Return the unique ID of this reaction
 int getPaperId()
          for migration purposes - actually reaction is associated with a number of papers
 Particle getTarget()
           
 boolean hasLegacyPaperId()
           
 void setAxisId(int id)
           
 void setBeam(Particle p1)
           
 void setDatasetId(int id)
          for migration purposes - actually reaction is associated with a number of papers
 void setDescription(java.lang.String s)
           
 void setFState(java.lang.String fs)
           
 void setHasLegacyPaperId(boolean b)
           
 void setId(int id)
          Set the internal ID code
 void setPaperId(int id)
          for migration purposes - actually reaction is associated with a number of papers
 void setTarget(Particle p2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cedar.hepdata.model.HDPersistable
toString
 

Constructor Detail

Reaction

public Reaction(HDObjectReader reader)
         throws HDException
builds a reaction from a file

Throws:
HDException


Reaction

public Reaction(int reactionId)
         throws HDException
Build a reaction from the DB.

Parameters:
reactionId - int, the unique ID.
Throws:
HDException


Reaction

public Reaction(int paperId,
                int dsId,
                int axId,
                java.lang.String description)
         throws HDException
Build a reaction from a description.

Parameters:
description - String.
Throws:
HDException

Method Detail

getId

public int getId()
Return the unique ID of this reaction

Specified by:
getId in interface HDPersistable
Returns:
reactionId


setId

public void setId(int id)
Description copied from interface: HDPersistable
Set the internal ID code

Specified by:
setId in interface HDPersistable
Parameters:
id - internal ID used to define (part of) the


getAxisId

public int getAxisId()

setAxisId

public void setAxisId(int id)

getBeam

public Particle getBeam()

getTarget

public Particle getTarget()

setBeam

public void setBeam(Particle p1)

setTarget

public void setTarget(Particle p2)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String s)

getFState

public java.lang.String getFState()

setFState

public void setFState(java.lang.String fs)

getFinalParticles

public java.util.Collection<Particle> getFinalParticles()
Returns an enumeration of Particles produced in the reaction


addFinalParticle

public void addFinalParticle(Particle particle)
Adds a particle to the collection of particles produced in the reaction. If there is already one of these particles in the collection, increase the muliplicity of the particle in the collection.

Parameters:
particle - to be added to collection


getPaperId

public int getPaperId()
for migration purposes - actually reaction is associated with a number of papers


setPaperId

public void setPaperId(int id)
for migration purposes - actually reaction is associated with a number of papers


getDatasetId

public int getDatasetId()
for migration purposes - actually reaction is associated with a number of papers


setDatasetId

public void setDatasetId(int id)
for migration purposes - actually reaction is associated with a number of papers


hasLegacyPaperId

public boolean hasLegacyPaperId()

setHasLegacyPaperId

public void setHasLegacyPaperId(boolean b)

Generated 20060512 1623

HEPData