net.sf.freecol.common.model
Class NationSummary

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.common.model.NationSummary

public class NationSummary
extends FreeColObject

A summary of an enemy nation.


Field Summary
private  java.lang.String foundingFathers
          The number of founding fathers this (European) player has.
private  java.lang.String gold
          The gold this (European) player has.
private  java.lang.String militaryStrength
          The military strength of this (European) player.
private  java.lang.String navalStrength
          The naval strength of this (European) player.
private  java.lang.String numberOfSettlements
          The number of settlements this player has.
private  java.lang.String numberOfUnits
          The number of units this (European) player has.
private  java.lang.String soL
          The (European) player SoL.
private  java.lang.String stance
          The stance of the player toward the requesting player.
private  java.lang.String tax
          The tax rate of this (European) player.
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, INFINITY, logger, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG
 
Constructor Summary
NationSummary(org.w3c.dom.Element element)
          Creates a new NationSummary instance.
NationSummary(Player player, Player requester)
          Creates a nation summary for the specified player.
 
Method Summary
 java.lang.String getFoundingFathers()
           
 int getGold()
           
 java.lang.String getMilitaryStrength()
           
 java.lang.String getNavalStrength()
           
 java.lang.String getNumberOfSettlements()
           
 java.lang.String getNumberOfUnits()
           
 java.lang.String getSoL()
           
 Player.Stance getStance()
           
 java.lang.String getTax()
           
static java.lang.String getXMLElementTagName()
          Gets the tag name of the root element representing this object.
protected  void readAttributes(javax.xml.stream.XMLStreamReader in)
          Reads the attributes of this object from an XML stream.
 void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
          This method writes an XML-representation of this object to the given stream.
protected  void writeAttributes(javax.xml.stream.XMLStreamWriter out)
          Write the attributes of this object to a stream.
 
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, dumpObject, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, getSpecification, hasAbility, hasAttribute, hasListeners, readAttributes, readChild, readChild, readChildren, readChildren, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXML, readFromXMLElement, readFromXMLImpl, readFromXMLImpl, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, save, save, setId, setSpecification, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLPartialImpl, writeAttribute, writeChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberOfSettlements

private java.lang.String numberOfSettlements
The number of settlements this player has.


numberOfUnits

private java.lang.String numberOfUnits
The number of units this (European) player has.


militaryStrength

private java.lang.String militaryStrength
The military strength of this (European) player.


navalStrength

private java.lang.String navalStrength
The naval strength of this (European) player.


stance

private java.lang.String stance
The stance of the player toward the requesting player.


gold

private java.lang.String gold
The gold this (European) player has.


soL

private java.lang.String soL
The (European) player SoL.


foundingFathers

private java.lang.String foundingFathers
The number of founding fathers this (European) player has.


tax

private java.lang.String tax
The tax rate of this (European) player.

Constructor Detail

NationSummary

public NationSummary(Player player,
                     Player requester)
Creates a nation summary for the specified player.

Parameters:
player - The Player the player to create the summary of.
requester - The Player making the request.

NationSummary

public NationSummary(org.w3c.dom.Element element)
Creates a new NationSummary instance.

Parameters:
element - An Element value.
Method Detail

getNumberOfSettlements

public java.lang.String getNumberOfSettlements()

getNumberOfUnits

public java.lang.String getNumberOfUnits()

getMilitaryStrength

public java.lang.String getMilitaryStrength()

getNavalStrength

public java.lang.String getNavalStrength()

getStance

public Player.Stance getStance()

getGold

public int getGold()

getFoundingFathers

public java.lang.String getFoundingFathers()

getSoL

public java.lang.String getSoL()

getTax

public java.lang.String getTax()

toXMLImpl

public void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
               throws javax.xml.stream.XMLStreamException
This method writes an XML-representation of this object to the given stream.

Specified by:
toXMLImpl in class FreeColObject
Parameters:
out - The target stream.
Throws:
javax.xml.stream.XMLStreamException - if there are any problems writing to the stream.

writeAttributes

protected void writeAttributes(javax.xml.stream.XMLStreamWriter out)
                        throws javax.xml.stream.XMLStreamException
Write the attributes of this object to a stream.

Overrides:
writeAttributes in class FreeColObject
Parameters:
out - The target stream.
Throws:
javax.xml.stream.XMLStreamException - if there are any problems writing to the stream.

readAttributes

protected void readAttributes(javax.xml.stream.XMLStreamReader in)
                       throws javax.xml.stream.XMLStreamException
Reads the attributes of this object from an XML stream.

Overrides:
readAttributes in class FreeColObject
Parameters:
in - The XML input stream.
Throws:
javax.xml.stream.XMLStreamException - if a problem was encountered during parsing.

getXMLElementTagName

public static java.lang.String getXMLElementTagName()
Gets the tag name of the root element representing this object.

Returns:
"nationSummary"