com.objex.panywhere
Class ImportEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.objex.panywhere.ImportEvent
All Implemented Interfaces:
java.io.Serializable

public class ImportEvent
extends java.util.EventObject

An avent that is fired during XML imports. You can learn the imported individual, total number of inidviduals in the import file, and /or error messages depending on when and how the event was fired. For those interested in tracking the individuals as they are imported, implementing the individualImported(ImportEvent) of the Import listener interface will tell them which individual was imported resulting in the generation of the event.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ImportEvent(java.lang.Object source)
          Creates a new instance of ImportEvent.
ImportEvent(java.lang.Object source, Individual ind, int ai_num_inds)
          Creates a new instance of ImportEvent.
ImportEvent(java.lang.Object source, int ai_num_inds)
          Creates an ImportEvent specifying source and number of Individuals imported
ImportEvent(java.lang.Object source, java.lang.String as_abort_message)
          Creates an ImportEvent specifying source and an abort message if the import has been aborted due to an error
 
Method Summary
 Individual getImportedIndividual()
          Getter for property importedIndividual.
 java.lang.String getMessage()
          If the import was aborted due to an error, this value will have the error message otherwise returns an empty string
 int getNumIndividuals()
          Returns the total number of individuals to be imported from the XML file if invoked after the import has been initiated and preparsing is complete.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImportEvent

public ImportEvent(java.lang.Object source,
                   Individual ind,
                   int ai_num_inds)
Creates a new instance of ImportEvent.

Parameters:
source - Pedigree instance is the source of all ImportEvent events
ind - The Individual who has been imported -- can be null if the event is fired to show the beginning of an import operation
ai_num_inds - The total number of Individuals in this import file

ImportEvent

public ImportEvent(java.lang.Object source,
                   int ai_num_inds)
Creates an ImportEvent specifying source and number of Individuals imported

Parameters:
ai_num_inds - The total number of Individuals in this import file

ImportEvent

public ImportEvent(java.lang.Object source,
                   java.lang.String as_abort_message)
Creates an ImportEvent specifying source and an abort message if the import has been aborted due to an error


ImportEvent

public ImportEvent(java.lang.Object source)
Creates a new instance of ImportEvent.

Parameters:
source - Pedigree instance is the source of all ImportEvent events
Method Detail

getImportedIndividual

public Individual getImportedIndividual()
Getter for property importedIndividual.

Returns:
Value of property importedIndividual.

getNumIndividuals

public int getNumIndividuals()
Returns the total number of individuals to be imported from the XML file if invoked after the import has been initiated and preparsing is complete. If preparsing of the import file has not yet been done, the method will return a vlaue of zero (0)


getMessage

public java.lang.String getMessage()
If the import was aborted due to an error, this value will have the error message otherwise returns an empty string