software.common
Class Drow

java.lang.Object
  extended by software.common.Drow
All Implemented Interfaces:
java.io.Serializable

public class Drow
extends java.lang.Object
implements java.io.Serializable

A row in the D table of the punchboard

Author:
stefan
See Also:
Serialized Form

Nested Class Summary
static class Drow.ChosenSide
           
static class Drow.Operation
           
 
Field Summary
static java.lang.String c1Attr
           
static java.lang.String c2Attr
           
static java.lang.String choosePageAttr
           
static java.lang.String idAttr
           
static java.lang.String page1Attr
           
static java.lang.String page2Attr
           
static java.lang.String pidAttr
           
static java.lang.String ridAttr
           
static java.lang.String s1Attr
           
static java.lang.String s2Attr
           
static java.lang.String voteAttr
           
 
Constructor Summary
Drow()
          empty constructor
Drow(org.xml.sax.Attributes attrs)
           
Drow(org.w3c.dom.Node row)
           
 
Method Summary
 byte[] getC1()
           
 byte[] getC2()
           
 Drow.ChosenSide getChosenSide()
           
 int getId()
           
static Drow.Operation getOperation()
           
 byte[] getPage1()
           
 byte[] getPage2()
           
 int getPid()
           
 int getRid()
           
 byte[] getS1()
           
 byte[] getS2()
           
 byte[] getVote()
           
 void setC1(byte[] c1)
           
 void setC2(byte[] c2)
           
 void setChosenSide(Drow.ChosenSide chosenPage)
           
 void setId(int id)
           
static void setOperation(Drow.Operation operation)
           
 void setPage1(byte[] page1)
           
 void setPage2(byte[] page2)
           
 void setPid(int pid)
           
 void setRid(int rid)
           
 void setS1(byte[] s1)
           
 void setS2(byte[] s2)
           
 void setVote(byte[] vote)
           
 java.lang.String toString()
          creates an xml representation of the D row.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

idAttr

public static final java.lang.String idAttr
See Also:
Constant Field Values

voteAttr

public static final java.lang.String voteAttr
See Also:
Constant Field Values

page1Attr

public static final java.lang.String page1Attr
See Also:
Constant Field Values

page2Attr

public static final java.lang.String page2Attr
See Also:
Constant Field Values

s1Attr

public static final java.lang.String s1Attr
See Also:
Constant Field Values

s2Attr

public static final java.lang.String s2Attr
See Also:
Constant Field Values

c1Attr

public static final java.lang.String c1Attr
See Also:
Constant Field Values

c2Attr

public static final java.lang.String c2Attr
See Also:
Constant Field Values

choosePageAttr

public static final java.lang.String choosePageAttr
See Also:
Constant Field Values

pidAttr

public static final java.lang.String pidAttr
See Also:
Constant Field Values

ridAttr

public static final java.lang.String ridAttr
See Also:
Constant Field Values
Constructor Detail

Drow

public Drow()
empty constructor


Drow

public Drow(org.w3c.dom.Node row)
     throws java.lang.Exception
Parameters:
row - a DOM node contaning a D row
Throws:
java.lang.Exception

Drow

public Drow(org.xml.sax.Attributes attrs)
     throws java.lang.Exception
Parameters:
attrs - a SAX set of attributes contaning a D row
Throws:
java.lang.Exception
Method Detail

getPid

public int getPid()

setPid

public void setPid(int pid)

getRid

public int getRid()

setRid

public void setRid(int rid)

getC1

public byte[] getC1()

setC1

public void setC1(byte[] c1)

getC2

public byte[] getC2()

setC2

public void setC2(byte[] c2)

getChosenSide

public Drow.ChosenSide getChosenSide()

setChosenSide

public void setChosenSide(Drow.ChosenSide chosenPage)

getId

public int getId()

setId

public void setId(int id)

getPage1

public byte[] getPage1()

setPage1

public void setPage1(byte[] page1)

getPage2

public byte[] getPage2()

setPage2

public void setPage2(byte[] page2)

getS1

public byte[] getS1()

setS1

public void setS1(byte[] s1)

getS2

public byte[] getS2()

setS2

public void setS2(byte[] s2)

getVote

public byte[] getVote()

setVote

public void setVote(byte[] vote)

getOperation

public static Drow.Operation getOperation()

setOperation

public static void setOperation(Drow.Operation operation)
Parameters:
operation - the opperation performed on all the rows of all D tables

toString

public java.lang.String toString()
creates an xml representation of the D row. It takes into consideration if it should publish or open the commitments, on which side and if it should publish results (d3) or not

Overrides:
toString in class java.lang.Object