net.sf.freecol.common.model
Class ExportData

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

public class ExportData
extends FreeColObject

Objects of this class hold the export data for a particular type of goods.


Field Summary
private  boolean exported
          Describe export here.
private  int exportLevel
          Describe exportLevel here.
private  int highLevel
          Describe highLevel here.
private  int lowLevel
          Describe lowLevel here.
 
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
ExportData()
          Package constructor: This class is only supposed to be constructed by Colony.
ExportData(GoodsType goodsType)
          Creates a new ExportData instance.
ExportData(GoodsType goodsType, boolean exported, int exportLevel)
          Creates a new ExportData instance.
ExportData(GoodsType goodsType, boolean exported, int lowLevel, int highLevel, int exportLevel)
          Creates a new ExportData instance.
ExportData(GoodsType goodsType, ExportData template)
          Creates a new ExportData instance.
 
Method Summary
 int getExportLevel()
          Get the ExportLevel value.
 int getHighLevel()
          Get the HighLevel value.
 int getLowLevel()
          Get the LowLevel value.
static java.lang.String getXMLElementTagName()
          Returns the tag name of the root element representing this object.
 boolean isExported()
          Get the Export value.
protected  void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
          Initialize this object from an XML-representation of this object.
 void setExported(boolean newExport)
          Set the Export value.
 void setExportLevel(int newExportLevel)
          Set the ExportLevel value.
 void setHighLevel(int newHighLevel)
          Set the HighLevel value.
 void setLowLevel(int newLowLevel)
          Set the LowLevel value.
protected  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, readAttributes, readChild, readChild, readChildren, readChildren, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXML, readFromXMLElement, 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

highLevel

private int highLevel
Describe highLevel here.


lowLevel

private int lowLevel
Describe lowLevel here.


exportLevel

private int exportLevel
Describe exportLevel here.


exported

private boolean exported
Describe export here.

Constructor Detail

ExportData

public ExportData()
Package constructor: This class is only supposed to be constructed by Colony.


ExportData

public ExportData(GoodsType goodsType)
Creates a new ExportData instance.

Parameters:
goodsType - a GoodsType value

ExportData

public ExportData(GoodsType goodsType,
                  boolean exported,
                  int lowLevel,
                  int highLevel,
                  int exportLevel)
Creates a new ExportData instance.

Parameters:
goodsType - a GoodsType value
exported - a boolean value
lowLevel - an int value
highLevel - an int value
exportLevel - an int value

ExportData

public ExportData(GoodsType goodsType,
                  boolean exported,
                  int exportLevel)
Creates a new ExportData instance.

Parameters:
goodsType - a GoodsType value
exported - a boolean value
exportLevel - an int value

ExportData

public ExportData(GoodsType goodsType,
                  ExportData template)
Creates a new ExportData instance.

Parameters:
goodsType - a GoodsType value
template - an ExportData value
Method Detail

getHighLevel

public final int getHighLevel()
Get the HighLevel value.

Returns:
an int value

setHighLevel

public final void setHighLevel(int newHighLevel)
Set the HighLevel value.

Parameters:
newHighLevel - The new HighLevel value.

getLowLevel

public final int getLowLevel()
Get the LowLevel value.

Returns:
an int value

setLowLevel

public final void setLowLevel(int newLowLevel)
Set the LowLevel value.

Parameters:
newLowLevel - The new LowLevel value.

getExportLevel

public final int getExportLevel()
Get the ExportLevel value.

Returns:
an int value

setExportLevel

public final void setExportLevel(int newExportLevel)
Set the ExportLevel value.

Parameters:
newExportLevel - The new ExportLevel value.

isExported

public final boolean isExported()
Get the Export value.

Returns:
a boolean value

setExported

public final void setExported(boolean newExport)
Set the Export value.

Parameters:
newExport - The new Export value.

toXMLImpl

protected 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.

readFromXMLImpl

protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
                        throws javax.xml.stream.XMLStreamException
Initialize this object from an XML-representation of this object.

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

getXMLElementTagName

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

Returns:
"exportData".