com.objex.panywhere
Class Family

java.lang.Object
  extended by com.objex.panywhere.Family
All Implemented Interfaces:
java.io.Serializable

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

The Family contains and maintains a list of all persons in the pedigree.

See Also:
Serialized Form

Constructor Summary
Family()
          Creates a new family with default properties
 
Method Summary
 boolean addIndividual(Individual a_added_member, Individual a_to_member)
          Adds the specified Individual to this family.
 void addPropertyChangeListener(java.beans.PropertyChangeListener lstnr)
          Enables users of Family Bean to register for property change events
 void deleteAll()
          Removes / deletes all Individuals in the Family Model.
 java.lang.String getFamilyID()
          Retrives the family ID for this family
 java.lang.String getFamilyName()
          Retrieves the family Name for this family
 Individual getIndividual(Individual member)
          Gets / retrieves the Individuals specified from the family and returns his Individual object.
 Individual getIndividual(java.lang.String memberid)
          Gets / retrives the Individual whose ID is specified from the family and returns his Individual object.
static Family getInstance()
          Return the current instance of Family.
 java.util.Map getMembers()
           
 int getNumIndividuals()
           
 java.lang.Object[] getUPNList()
          Retrieve an List of UPN's of all individuals in this family
 void removeIndividual(Individual member)
          Removes / deletes specified Individual from this family or Pedigree.
 void removePropertyChangeListener(java.beans.PropertyChangeListener lstnr)
          Enables users of Family bean to remove property change events listeners
 void setFamilyID(java.lang.String rhs)
          Sets the family id property.
 void setFamilyName(java.lang.String name)
          Sets the family name property
 void setMembers(java.util.Map fMembers)
          Adds the Individuals contained in Map fMembers to the Family Model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Family

public Family()
Creates a new family with default properties

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener lstnr)
Enables users of Family Bean to register for property change events


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener lstnr)
Enables users of Family bean to remove property change events listeners


getInstance

public static Family getInstance()
Return the current instance of Family. May be null if no Family object has been instantiated


addIndividual

public boolean addIndividual(Individual a_added_member,
                             Individual a_to_member)
Adds the specified Individual to this family. Fires an IndividualAddEvent to show that a new Individual has been added to the Pedigree Family model. If the Individual already exists, the old one will be replaced and no AddEvents will be generated.

Parameters:
a_added_member - The new Individual to be added. * @param a_to_member The Individual to whom the new person was added. THis may be null if person was added unconnected

removeIndividual

public void removeIndividual(Individual member)
Removes / deletes specified Individual from this family or Pedigree. Fires a IndividualDeleteEvent if delete was successful

Parameters:
member - The Individual to be deleted

deleteAll

public void deleteAll()
Removes / deletes all Individuals in the Family Model. No DeleteEvents will be generated. To get DeleteEvents, use the #removeIndividual(Individual) method.


getIndividual

public Individual getIndividual(Individual member)
Gets / retrieves the Individuals specified from the family and returns his Individual object. This method is an overloaded version of getIndividual(String memberid) which is useful in retrieving the most up to date object reference for the Individual.

Parameters:
member - The individual whose object is to be retrieved
Returns:
Indvidual An Individual object

getIndividual

public Individual getIndividual(java.lang.String memberid)
Gets / retrives the Individual whose ID is specified from the family and returns his Individual object.

Parameters:
memberid - The UPN of the Individual to be retrieved s
Returns:
Indvidual An Individual object

setFamilyID

public void setFamilyID(java.lang.String rhs)
Sets the family id property.

Parameters:
rhs - The new ID of this family

getFamilyID

public java.lang.String getFamilyID()
Retrives the family ID for this family

Returns:
String value -- ID of family

setFamilyName

public void setFamilyName(java.lang.String name)
Sets the family name property

Parameters:
name - The name of the family

getFamilyName

public java.lang.String getFamilyName()
Retrieves the family Name for this family

Returns:
String value -- NAme of family -- Same as Header

setMembers

public void setMembers(java.util.Map fMembers)
Adds the Individuals contained in Map fMembers to the Family Model

Parameters:
fMembers - The Map containing Individual objects keyed by Individual.upn

getMembers

public java.util.Map getMembers()
Returns:
the Map whose contents are Individual objects keyed by Unique Person Number (UPN) of the Indvidual

getNumIndividuals

public int getNumIndividuals()
Returns:
the total number of Individuals in this family

getUPNList

public java.lang.Object[] getUPNList()
Retrieve an List of UPN's of all individuals in this family

Returns:
Array of UPN Object entries or an empty array if the family has no members