software.common
Class Prow

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

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

A row in the P table of the punchboard

Author:
stefan
See Also:
Serialized Form

Nested Class Summary
static class Prow.ChosenPage
           
static class Prow.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 s1Attr
           
static java.lang.String s2Attr
           
static java.lang.String voteAttr
           
 
Constructor Summary
Prow()
          empty constructor
Prow(org.xml.sax.Attributes attrs)
           
Prow(org.w3c.dom.Node row)
           
 
Method Summary
 byte[] getC1()
           
 byte[] getC2()
           
 Prow.ChosenPage getChosenPage()
           
 int getId()
           
static Prow.Operation getOperation()
           
 byte[] getPage1()
           
 byte[] getPage2()
           
 byte[] getS1()
           
 byte[] getS2()
           
 byte[] getVote()
           
 void setC1(byte[] c1)
           
 void setC2(byte[] c2)
           
 void setChosenPage(Prow.ChosenPage chosenPage)
           
 void setId(int id)
           
static void setOperation(Prow.Operation operation)
           
 void setPage1(byte[] page1)
           
 void setPage2(byte[] page2)
           
 void setS1(byte[] s1)
           
 void setS2(byte[] s2)
           
 void setVote(byte[] vote)
           
 java.lang.String toString()
          creates an xml representation of the P 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
Constructor Detail

Prow

public Prow()
empty constructor


Prow

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

Prow

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

getC1

public byte[] getC1()

setC1

public void setC1(byte[] c1)

getC2

public byte[] getC2()

setC2

public void setC2(byte[] c2)

getChosenPage

public Prow.ChosenPage getChosenPage()

setChosenPage

public void setChosenPage(Prow.ChosenPage chosenPage)

getId

public int getId()

setId

public void setId(int id)

getVote

public byte[] getVote()

setVote

public void setVote(byte[] vote)

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)

getOperation

public static Prow.Operation getOperation()

setOperation

public static void setOperation(Prow.Operation operation)
Parameters:
operation - the operation that all the P rows will have

toString

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

Overrides:
toString in class java.lang.Object