eaLib API Docs
Last Modified : January 7 2002

mss.ea.ini
Class XMLFileInitialization

java.lang.Object
  |
  +--mss.ea.core.GeneticOperator
        |
        +--mss.ea.ini.Initialization
              |
              +--mss.ea.ini.XMLFileInitialization
All Implemented Interfaces:
IndividualSource

public class XMLFileInitialization
extends Initialization

This operator initializaes a stream with data from a XML file. The file must contain an individual stream which has been serialized with JSX.

Since:
0.2.2
Version:
$Revision: 1.2 $ $Date: 2001/11/26 09:24:33 $
Author:
Andreas Rummler

Field Summary
protected  boolean jsxAvailable
          Unused at the moment.
protected  java.io.File xmlFile
          File, to read XML data from.
 
Fields inherited from class mss.ea.ini.Initialization
number, setSize
 
Fields inherited from class mss.ea.core.GeneticOperator
description, ID, name
 
Constructor Summary
XMLFileInitialization(java.io.File file)
          Constructor.
XMLFileInitialization(java.lang.String file)
          Constructor.
 
Method Summary
 ChromosomeSet createSet()
          Dummy method.
 IndividualStream getStream()
          Reads the stream from the given file.
 
Methods inherited from class mss.ea.ini.Initialization
getChromosomeSize, getIndividualNumber, next, setChromosomeSize, setIndividualNumber
 
Methods inherited from class mss.ea.core.GeneticOperator
getDescription, getID, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xmlFile

protected java.io.File xmlFile
File, to read XML data from.

jsxAvailable

protected boolean jsxAvailable
Unused at the moment.
Constructor Detail

XMLFileInitialization

public XMLFileInitialization(java.lang.String file)
Constructor.
Parameters:
file - name of the XML file

XMLFileInitialization

public XMLFileInitialization(java.io.File file)
Constructor.
Parameters:
file - XML file to read data from
Method Detail

getStream

public IndividualStream getStream()
Reads the stream from the given file. In case the file does not exist or is corrupt (or whatever), an error message is printed and an empty stream is returned.
Overrides:
getStream in class Initialization
Returns:
stream of new individuals

createSet

public ChromosomeSet createSet()
Dummy method.
Overrides:
createSet in class Initialization
Returns:
always null

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS