hepdata is hosted by Hepforge, IPPP Durham

cedar.hepdata.migration.model
Class Match

java.lang.Object
  extended by cedar.hepdata.migration.model.Match

public class Match
extends java.lang.Object

Contains Match Conditions and Matches for a Systematic Error. In the legacy database, Systematics were matched to datasets,axes and values by a comparision of headers and descriptions in String format. The systematics records contain matching conditions which are matched to dataset and axis headers and descriptions. The resulting matches are stored here.

Version:
$Date: 2006-02-02 15:51:11 +0000 (Thu, 02 Feb 2006) $ $Revision: 499 $
Author:
S Butterworth

Nested Class Summary
protected static class Match.Matched
          A single Match between Systematic conditions and Dataset/Axis header information.
 
Constructor Summary
Match(int paperId)
          Constructs a Match object with conditions unknown.
Match(int paperId, java.lang.String sysn, java.util.Map<java.lang.String,java.lang.String> cond)
          Match is defined by a header and set of conditions to be used to find sets of data matching these conditions.
 
Method Summary
 void addMatch(int pId, int dsId, int yId, int xId, java.lang.String xval)
          Adds object with specified ids and value to Matchable collection
 void addMatch(int pId, int dsId, java.lang.String yId, java.lang.String xId)
          Adds object with specified ids to Matchable collection
 void addMatch(java.lang.Object match)
          Match contains a collection of Matchable objects This method adds to the collection (if object is a suitable one)
static Matchable createMatch(int pId, int dsId, int yId, int xId, java.lang.String xval)
          Returns Matchable object as specified by the input ids
 java.lang.String getConditionHeader()
           
 java.util.Iterator getConditionHeaders()
           
 java.lang.String getConditionValue(java.lang.String head)
           
 java.lang.String getHeader()
           
 java.util.Enumeration getMatch(int dsId)
          returns enumeration of Matchable objects with specified dataset id which conform to header and conditions on this Match object.
 java.util.Enumeration getMatches()
          returns enumeration of Matchable objects conforming to header and conditions on this Match.
 int getPaperId()
           
 boolean nullMatch()
          returns true if this Match has no sets of matching dataset/axis ids
 void removeMatch(Matchable m)
           
 void setPaperId(int id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Match

public Match(int paperId,
             java.lang.String sysn,
             java.util.Map<java.lang.String,java.lang.String> cond)
      throws HDException
Match is defined by a header and set of conditions to be used to find sets of data matching these conditions.

Throws:
HDException


Match

public Match(int paperId)
Constructs a Match object with conditions unknown.

Method Detail

setPaperId

public void setPaperId(int id)

getPaperId

public int getPaperId()

getHeader

public java.lang.String getHeader()

getConditionHeader

public java.lang.String getConditionHeader()

getConditionValue

public java.lang.String getConditionValue(java.lang.String head)

getConditionHeaders

public java.util.Iterator getConditionHeaders()

addMatch

public void addMatch(java.lang.Object match)
              throws HDException
Match contains a collection of Matchable objects This method adds to the collection (if object is a suitable one)

Throws:
HDException


addMatch

public void addMatch(int pId,
                     int dsId,
                     java.lang.String yId,
                     java.lang.String xId)
              throws HDException
Adds object with specified ids to Matchable collection

Throws:
HDException


addMatch

public void addMatch(int pId,
                     int dsId,
                     int yId,
                     int xId,
                     java.lang.String xval)
Adds object with specified ids and value to Matchable collection


removeMatch

public void removeMatch(Matchable m)

createMatch

public static Matchable createMatch(int pId,
                                    int dsId,
                                    int yId,
                                    int xId,
                                    java.lang.String xval)
Returns Matchable object as specified by the input ids


nullMatch

public boolean nullMatch()
returns true if this Match has no sets of matching dataset/axis ids


getMatches

public java.util.Enumeration getMatches()
returns enumeration of Matchable objects conforming to header and conditions on this Match.


getMatch

public java.util.Enumeration getMatch(int dsId)
returns enumeration of Matchable objects with specified dataset id which conform to header and conditions on this Match object.


Generated 20060512 1623

HEPData