public void loadAll()
        {
            
            JFileChooser chooser = new JFileChooser();
            chooser.setSelectedFile(preferredFile);
            int result = chooser.showOpenDialog(null);//this);
            if (result == JFileChooser.APPROVE_OPTION)
            {
                preferredFile = chooser.getSelectedFile();
            }
            
            Scanner input;
            try 
            {
                input = new Scanner(preferredFile);
                int phase = 1;
	
				// read from the file, store relations into arrayList;
		while (input.hasNext())
		{
                    String eater;
                    
                    int personId;
                    boolean personIsMale;
                    String personFirstName;
                    String personLastName;
                    
                    int typeId;
                    String genericName;
                    String fwdMaleName;
                    String fwdFemaleName;
                    String revMaleName;
                    String revFemaleName;
                    
                    int relationId;
                    int person1id;
                    int person2id;
                    int relTypeid;

                    String inputString = input.nextLine();
                        
                    if (inputString.equals("Types"))
                    {
                        phase = 2;
                        continue;
                    }
                    else if (inputString.equals("Relations"))
                    {
                        phase = 3;
                        continue;
                    }
                    
                    
                    String[] part = inputString.split("\t");
                    
                    if (phase == 1)
                    {
                        
                        personId = Integer.parseInt(part[0]);
                        personFirstName = part[1];
                        personLastName = part[2];
                        personIsMale = Boolean.parseBoolean(part[3]);
                    
                        PeopleClass theNewGuy = new PeopleClass(personId, personFirstName, personLastName, personIsMale);

                        personList.add(theNewGuy);

                        lastPersonId = personId;
                        
                    }
                    else if(phase == 2)
                    {
                        typeId = Integer.parseInt(part[0]);
                        genericName = part[1];
			fwdMaleName = part[2];
			fwdFemaleName = part[3];
			revMaleName = part[4];
			revFemaleName = part[5];
				    
			RelationType theNewRel = new RelationType(typeId, genericName, fwdMaleName, fwdFemaleName, revMaleName, revFemaleName);
                        relationTypeList.add(theNewRel);
                        
                        lastRelTypeId = typeId;
                    }
                    else if(phase == 3)
                    {


                        relationId = Integer.parseInt(part[0]);
                        person1id = Integer.parseInt(part[1]);
                        person2id = Integer.parseInt(part[2]);
                        relTypeid = Integer.parseInt(part[3]);

                        PeopleClass person1 = this.getPersonById(person1id);
                        PeopleClass person2 = this.getPersonById(person2id);
                        RelationType relType = this.getRelationTypeById(relTypeid);

                        Relationship newRelationship = new Relationship(relationId,person1,person2,relType);
                        relationshipsList.add(newRelationship);
                        
                        lastRelationshipId = relationId;
                    }
                   
				    
                }
				
				
                input.close();
	    }
            catch(Exception e)
            {
	        	
	    }
        }