hepdata is hosted by Hepforge, IPPP Durham

cedar.hepdata.model
Class Axis

java.lang.Object
  extended by cedar.hepdata.model.Axis
All Implemented Interfaces:
HDPersistable
Direct Known Subclasses:
XAxis, YAxis

public abstract class Axis
extends java.lang.Object
implements HDPersistable

An Axis is a property of a Dataset, containing header information and a set of Values. XAxis and YAxis are concrete implementations. One Dataset may have multiple Axes.

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

Field Summary
protected  java.util.List<Systematic> systematics
          Collection of systematics on the axis
protected  java.util.Map<java.lang.Integer,Value> values
          Collection of values on the axis
 
Constructor Summary
Axis(HDObjectReader reader)
          Builds an Axis from a file *** to be moved to migration code only
Axis(int paperId, int dsId, int id)
          Builds axis by specifying key information
 
Method Summary
 void addSystematic(Systematic sys)
           
 void addValue(java.lang.Integer id, Value val)
           
 boolean equals(java.lang.Object o)
          Axes are equal if they have the same paper,dataset and axis id
 int getDatasetId()
           
 java.lang.String getHeader()
           
 int getId()
          Return the axis ID
 int getPaperId()
           
 java.util.List<Systematic> getSystematics()
           
 java.util.Map<java.lang.Integer,Value> getValues()
           
 void setDatasetId(int id)
           
 void setHeader(java.lang.String s)
           
 void setId(int id)
          Set the internal ID code
 void setPaperId(int id)
           
 void toDb()
          Save Axis to database *** This shouldn't be here!
 java.lang.String toString()
          Produce a string representation of the object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

values

protected java.util.Map<java.lang.Integer,Value> values
Collection of values on the axis


systematics

protected java.util.List<Systematic> systematics
Collection of systematics on the axis

Constructor Detail

Axis

public Axis(HDObjectReader reader)
     throws HDException
Builds an Axis from a file *** to be moved to migration code only

Throws:
HDException


Axis

public Axis(int paperId,
            int dsId,
            int id)
Builds axis by specifying key information

Method Detail

toDb

public void toDb()
          throws HDException
Save Axis to database *** This shouldn't be here!

Throws:
HDException


equals

public boolean equals(java.lang.Object o)
Axes are equal if they have the same paper,dataset and axis id

Overrides:
equals in class java.lang.Object


getId

public int getId()
Return the axis ID

Specified by:
getId in interface HDPersistable
Returns:
axId


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


getPaperId

public int getPaperId()

setPaperId

public void setPaperId(int id)

getDatasetId

public int getDatasetId()

setDatasetId

public void setDatasetId(int id)

getHeader

public java.lang.String getHeader()

setHeader

public void setHeader(java.lang.String s)

addValue

public void addValue(java.lang.Integer id,
                     Value val)

getValues

public java.util.Map<java.lang.Integer,Value> getValues()

getSystematics

public java.util.List<Systematic> getSystematics()

addSystematic

public void addSystematic(Systematic sys)

toString

public java.lang.String toString()
Description copied from interface: HDPersistable
Produce a string representation of the object

Specified by:
toString in interface HDPersistable
Overrides:
toString in class java.lang.Object


Generated 20060512 1623

HEPData