Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package lapr.project.model;
- import java.util.ArrayList;
- import java.util.List;
- import lapr.project.utils.*;
- /**
- *
- * @author LAPR2-2017/2018-G013
- * 1151182 - Tomás Magalhães <1151182@isep.ipp.pt>
- * 1161383 - João Sousa <1161383@isep.ipp.pt>
- * 1161641 - Miguel Costa <1161641@isep.ipp.pt>
- * 1171164 - João Ribeiro <1171164@isep.ipp.pt>
- * 1171169 - José Ferreira <1171169@isep.ipp.pt> */
- public class Data {
- public static EventCenter initializeData() {
- EventCenter eCenter = new EventCenter();
- Product p1 = new Product("Product 1");
- Product p2 = new Product("Product 2");
- Product p3 = new Product("Product 3");
- Product p4 = new Product("Product 4");
- Product p5 = new Product("Product 5");
- Product p6 = new Product("Product 6");
- Product p7 = new Product("Product 7");
- Product p8 = new Product("Product 8");
- Product p9 = new Product("Product 9");
- List<Product> lp1 = new ArrayList<>();
- List<Product> lp2 = new ArrayList<>();
- List<Product> lp3 = new ArrayList<>();
- List<Product> lp4 = new ArrayList<>();
- List<Product> lp5 = new ArrayList<>();
- List<Product> lp6 = new ArrayList<>();
- List<Product> lp7 = new ArrayList<>();
- List<Product> lp8 = new ArrayList<>();
- List<Product> lp9 = new ArrayList<>();
- lp1.add(p1);
- lp2.add(p2);
- lp3.add(p3);
- lp4.add(p4);
- lp5.add(p5);
- lp6.add(p6);
- lp7.add(p7);
- lp8.add(p8);
- lp9.add(p9);
- String topic1 = "Topic 1";
- String topic2 = "Topic 2";
- String topic3 = "Topic 3";
- String topic4 = "Topic 4";
- String topic5 = "Topic 5";
- String topic6 = "Topic 6";
- String topic7 = "Topic 7";
- String topic8 = "Topic 8";
- String topic9 = "Topic 9";
- List<String> lt1 = new ArrayList<>();
- List<String> lt2 = new ArrayList<>();
- List<String> lt3 = new ArrayList<>();
- List<String> lt4 = new ArrayList<>();
- List<String> lt5 = new ArrayList<>();
- List<String> lt6 = new ArrayList<>();
- List<String> lt7 = new ArrayList<>();
- List<String> lt8 = new ArrayList<>();
- List<String> lt9 = new ArrayList<>();
- lt1.add(topic1);
- lt2.add(topic2);
- lt3.add(topic3);
- lt4.add(topic4);
- lt5.add(topic5);
- lt6.add(topic6);
- lt7.add(topic7);
- lt8.add(topic8);
- lt9.add(topic9);
- StaffMember teste = new StaffMember(new User("Diogo Alberto Costa", "digaac1", "digaac1@email.pt", 12345678));
- EventManager evf = new EventManager(new User("Samuel", "q", "ddd@gmail.com", 12345678));
- eCenter.getEventRegister().getEventManagerList().add(evf);
- Review r1 = new Review("r1", 1, 2, 1, 4);
- Review r2 = new Review("r2", 4, 3, 1, 5);
- Review r3 = new Review("r3", 3, 3, 1, 5);
- Review r4 = new Review(1, 2, 4, 3, 5, teste);
- Review r5 = new Review(1, 2, 1, 2, 5, teste);
- Review r6 = new Review("r6", 4, 5, 2, 2);
- Review r7 = new Review("r7", 3, 3, 1, 1);
- Review r8 = new Review("r8", 2, 3, 3, 4);
- Review r9 = new Review("r9", 1, 3, 3, 4);
- List<Review> rList1 = new ArrayList<>();
- List<Review> rList2 = new ArrayList<>();
- List<Review> rList3 = new ArrayList<>();
- List<Review> rList4 = new ArrayList<>();
- List<Review> rList5 = new ArrayList<>();
- List<Review> rList6 = new ArrayList<>();
- List<Review> rList7 = new ArrayList<>();
- List<Review> rList8 = new ArrayList<>();
- List<Review> rList9 = new ArrayList<>();
- rList1.add(r1);
- rList2.add(r2);
- rList3.add(r3);
- rList4.add(r4);
- rList5.add(r5);
- rList6.add(r6);
- rList7.add(r7);
- rList8.add(r8);
- rList9.add(r9);
- Workshop w1 = new Workshop("w1", "Des 10");
- Workshop w2 = new Workshop("w2", "Desc 20");
- Workshop w3 = new Workshop("w3", "Desc 30");
- Workshop w4 = new Workshop("w4", "Desc 40");
- Workshop w5 = new Workshop("w5", "Desc 50");
- Workshop w6 = new Workshop("w6", "Desc 60");
- Workshop w7 = new Workshop("w7", "Desc 70");
- Workshop w8 = new Workshop("w8", "Desc 80");
- Workshop w9 = new Workshop("w9", "Desc 90");
- Workshop w10 = new Workshop("w10", "Desc 100");
- Workshop w11 = new Workshop("w11", "Desc 110");
- Workshop w12 = new Workshop("w12", "Desc 120");
- User u1 = new User("Tomas Magalhães", "tomasm1", "tomasm1@email.pt", 12345678);
- User u2 = new User("Joao Sousa", "joaos1", "joaos1@email.pt", 12345678);
- User u3 = new User("Miguel Costa", "miguelc1", "miguelc1@email.pt", 12345678);
- User u4 = new User("João Ribeiro", "joaor1", "joaor1@email.pt", 12345678);
- User u5 = new User("José Ferreira", "josef1", "josef1@email.pt", 12345678);
- User u6 = new User("Helder Costa", "helderc1", "helderc1@email.pt", 12345678);
- User u7 = new User("Ana Silva", "anasilva1", "anasilva1@email.pt", 12345678);
- User u8 = new User("Hugo Magalhães", "hugom1", "hugom1@email.pt", 12345678);
- User u9 = new User("Diogo Alberto Costa", "digaac1", "digaac1@email.pt", 12345678);
- User u10 = new User("Amilcar Sousa", "amilcars1", "amilcars1@email.pt", 12345678);
- User u11 = new User("Sunny Florida", "sunnyf1", "sunnyf1@email.pt", 12345678);
- User u12 = new User("Fernando Alberto", "fernandoa1", "fernandoa1@email.pt", 12345678);
- User u13 = new User("Antonio Ramos", "antonior1", "antonior1@email.pt", 12345678);
- User u14 = new User("Alice Sousa", "alices", "alices@email.pt", 12345678);
- User u15 = new User("Dino Torres", "dinot", "dinot@email.pt", 12345678);
- User u16 = new User("Nuno Torres", "nunot", "nunot@email.pt", 12345678);
- User u17 = new User("Martim Melo", "martimm", "martimm@email.pt", 12345678);
- User u18 = new User("Rui Oliveira", "ruioli", "ruioli@email.pt", 12345678);
- User u19 = new User("Nuno Dias", "nunodi", "nunodi@email.pt", 12345678);
- User u20 = new User("Antonio Perez", "antoniop", "antoniop@email.pt", 12345678);
- User u21 = new User("Ederson Moraes", "edersonm", "edersonm@email.pt", 12345678);
- User u22 = new User("Anderson Luis", "andersonl", "andersonl@email.pt", 12345678);
- User u23 = new User("Ruben Dias", "rubend", "rubend@email.pt", 12345678);
- User u24 = new User("Andre Almeida", "andrea", "andrea@email.pt", 12345678);
- User u25 = new User("Luis Vieira", "luisv", "luisv@email.pt", 12345678);
- List<RelativeDistance> relativeDistance1 = new ArrayList<>();
- RelativeDistance rd1 = new RelativeDistance("Stand2", 10);
- relativeDistance1.add(rd1);
- List<RelativeDistance> relativeDistance2 = new ArrayList<>();
- RelativeDistance rd2 = new RelativeDistance("Stand3", 30);
- relativeDistance2.add(rd2);
- List<RelativeDistance> relativeDistance3 = new ArrayList<>();
- RelativeDistance rd3 = new RelativeDistance("Stand4", 15);
- relativeDistance3.add(rd3);
- List<RelativeDistance> relativeDistance4 = new ArrayList<>();
- RelativeDistance rd4 = new RelativeDistance("Stand5", 10);
- relativeDistance4.add(rd4);
- List<RelativeDistance> relativeDistance5 = new ArrayList<>();
- RelativeDistance rd5 = new RelativeDistance("Stand6", 20);
- relativeDistance5.add(rd5);
- List<RelativeDistance> relativeDistance6 = new ArrayList<>();
- RelativeDistance rd6 = new RelativeDistance("Stand1", 10);
- relativeDistance6.add(rd6);
- List<RelativeDistance> relativeDistance7 = new ArrayList<>();
- RelativeDistance rd7 = new RelativeDistance("Stand2", 10);
- relativeDistance7.add(rd7);
- List<RelativeDistance> relativeDistance8 = new ArrayList<>();
- RelativeDistance rd8 = new RelativeDistance("Stand2", 10);
- relativeDistance8.add(rd8);
- List<RelativeDistance> relativeDistance9 = new ArrayList<>();
- RelativeDistance rd9 = new RelativeDistance("Stand4", 15);
- relativeDistance9.add(rd9);
- Stand st1 = new Stand("Stand 1", 20, relativeDistance1);
- Stand st2 = new Stand("Stand 2", 35, relativeDistance2);
- Stand st3 = new Stand("Stand 3", 44, relativeDistance3);
- Stand st4 = new Stand("Stand 4", 30, relativeDistance4);
- Stand st5 = new Stand("Stand 5", 50, relativeDistance5);
- Stand st6 = new Stand("Stand 6", 100, relativeDistance6);
- Stand st7 = new Stand("Stand 7", 88, relativeDistance6);
- Stand st8 = new Stand("Stand 8", 101, relativeDistance6);
- Stand st9 = new Stand("Stand 9", 20, relativeDistance6);
- Keyword k1 = new Keyword("key 1");
- Keyword k2 = new Keyword("key 2");
- Keyword k3 = new Keyword("key 3");
- Keyword k4 = new Keyword("key 4");
- Keyword k5 = new Keyword("key 5");
- Keyword k6 = new Keyword("key 6");
- Keyword k7 = new Keyword("key 7");
- Keyword k8 = new Keyword("key 8");
- Keyword k9 = new Keyword("key 9");
- Keyword k10 = new Keyword("key 10");
- Keyword k11 = new Keyword("key 11");
- Keyword k12 = new Keyword("key 12");
- List<Keyword> kList1 = new ArrayList<>();
- List<Keyword> kList2 = new ArrayList<>();
- List<Keyword> kList3 = new ArrayList<>();
- List<Keyword> kList4 = new ArrayList<>();
- List<Keyword> kList5 = new ArrayList<>();
- List<Keyword> kList6 = new ArrayList<>();
- List<Keyword> kList7 = new ArrayList<>();
- List<Keyword> kList8 = new ArrayList<>();
- List<Keyword> kList9 = new ArrayList<>();
- kList1.add(k1);
- kList1.add(k2);
- kList2.add(k3);
- kList3.add(k4);
- kList3.add(k5);
- kList3.add(k6);
- kList4.add(k7);
- kList5.add(k8);
- kList6.add(k9);
- kList7.add(k10);
- kList8.add(k11);
- kList9.add(k12);
- ApplicationList appList1 = new ApplicationList();
- Application app1 = new Application("Application 1", "Company 1", 999999999, 911111111, 100, lp1, 2, lt1, AppState.ACCEPTED, rList1, w1, u17, st1, kList1);
- Application app2 = new Application("Application 2", "Company 2", 888888888, 922222222, 50, lp2, 21, lt2, AppState.REJECTED, rList2, w2, u18, st2, kList2);
- appList1.add(app1);
- appList1.add(app2);
- ApplicationList appList2 = new ApplicationList();
- Application app3 = new Application("Application 3", "Company 3", 777777777, 933333333, 220, lp3, 30, lt3, AppState.ACCEPTED, rList3, w3, u19, st3, kList3);
- appList2.add(app3);
- ApplicationList appList3 = new ApplicationList();
- Application app4 = new Application("Application 4", "Company 4", 666666666, 944444444, 100, lp4, 2, lt4, AppState.PENDING, rList4, w4, u20, st4, kList4);
- Application app5 = new Application("Application 5", "Company 5", 555555555, 955555555, 100, lp5, 2, lt5, AppState.ACCEPTED, rList5, w5, u21, st5, kList5);
- appList3.add(app4);
- appList3.add(app5);
- ApplicationList appList4 = new ApplicationList();
- Application app6 = new Application("Application 6", "Company 6", 444444444, 966666666, 133, lp6, 8, lt6, AppState.REJECTED, rList6, w6, u22, st6, kList6);
- appList4.add(app6);
- ApplicationList appList5 = new ApplicationList();
- Application app7 = new Application("Application 7", "Company 7", 333333333, 977777777, 10, lp7, 55, lt7, AppState.PENDING, rList7, w7, u23, st7, kList7);
- Application app8 = new Application("Application 8", "Company 8", 222222222, 988888888, 39, lp8, 29, lt8, AppState.REJECTED, rList8, w8, u24, st8, kList8);
- appList5.add(app7);
- appList5.add(app8);
- ApplicationList appList6 = new ApplicationList();
- Application app9 = new Application("Application 9", "Company 9", 111, 999, 49, lp9, 48, lt9, AppState.ACCEPTED, rList9, w9, u25, st9, kList9);
- appList6.add(app9);
- ApplicationRegister appReg = new ApplicationRegister();
- appReg.addApp(app1);
- appReg.addApp(app2);
- appReg.addApp(app3);
- appReg.addApp(app4);
- appReg.addApp(app5);
- appReg.addApp(app6);
- appReg.addApp(app7);
- appReg.addApp(app8);
- appReg.addApp(app9);
- eCenter.setAppRegister(appReg);
- UserRegister ur = new UserRegister();
- ur.addUser(u1);
- ur.addUser(u2);
- ur.addUser(u3);
- ur.addUser(u4);
- ur.addUser(u5);
- ur.addUser(u6);
- ur.addUser(u7);
- ur.addUser(u8);
- ur.addUser(u9);
- ur.addUser(u10);
- ur.addUser(u11);
- ur.addUser(u12);
- ur.addUser(u13);
- ur.addUser(u14);
- ur.addUser(u15);
- ur.addUser(u16);
- ur.addUser(u17);
- ur.addUser(u18);
- ur.addUser(u19);
- ur.addUser(u20);
- ur.addUser(u21);
- ur.addUser(u22);
- ur.addUser(u23);
- ur.addUser(u24);
- ur.addUser(u25);
- eCenter.setUserRegister(ur);
- List<StaffMember> smList1 = new ArrayList<>();
- StaffMember sm1 = new StaffMember(u7);
- smList1.add(sm1);
- List<StaffMember> smList2 = new ArrayList<>();
- StaffMember sm2 = new StaffMember(u8);
- smList1.add(sm2);
- List<StaffMember> smList3 = new ArrayList<>();
- StaffMember sm3 = new StaffMember(u9);
- smList3.add(sm3);
- List<StaffMember> smList4 = new ArrayList<>();
- StaffMember sm4 = new StaffMember(u10);
- smList1.add(sm4);
- List<StaffMember> smList5 = new ArrayList<>();
- StaffMember sm5 = new StaffMember(u11);
- smList1.add(sm5);
- List<StaffMember> smList6 = new ArrayList<>();
- StaffMember sm6 = new StaffMember(u12);
- smList1.add(sm6);
- List<Organizer> orgList1 = new ArrayList<>();
- List<Organizer> orgList2 = new ArrayList<>();
- List<Organizer> orgList3 = new ArrayList<>();
- List<Organizer> orgList4 = new ArrayList<>();
- List<Organizer> orgList5 = new ArrayList<>();
- List<Organizer> orgList6 = new ArrayList<>();
- Organizer o1 = new Organizer(u1);
- Organizer o2 = new Organizer(u2);
- Organizer o3 = new Organizer(u3);
- Organizer o4 = new Organizer(u4);
- Organizer o5 = new Organizer(u5);
- Organizer o6 = new Organizer(u6);
- orgList1.add(o1);
- orgList2.add(o2);
- orgList3.add(o3);
- orgList4.add(o4);
- orgList5.add(o5);
- orgList6.add(o6);
- Date di1 = new Date(2018, 01, 31);
- Date di2 = new Date(2018, 01, 30);
- Date di3 = new Date(2018, 01, 29);
- Date di4 = new Date(2018, 01, 28);
- Date di5 = new Date(2018, 01, 27);
- Date di6 = new Date(2018, 01, 26);
- Date di7 = new Date(2018, 01, 25);
- Date di8 = new Date(2018, 01, 24);
- Date di9 = new Date(2018, 01, 23);
- Date df1 = new Date(2018, 02, 01);
- Date df2 = new Date(2018, 01, 31);
- Date df3 = new Date(2018, 01, 30);
- Date df4 = new Date(2018, 01, 29);
- Date df5 = new Date(2018, 01, 28);
- Date df6 = new Date(2018, 01, 27);
- Date df7 = new Date(2018, 01, 26);
- Date df8 = new Date(2018, 01, 25);
- Date df9 = new Date(2018, 01, 24);
- SubmissionPeriod sp1 = new SubmissionPeriod(di1, df1);
- SubmissionPeriod sp2 = new SubmissionPeriod(di2, df2);
- SubmissionPeriod sp3 = new SubmissionPeriod(di3, df3);
- SubmissionPeriod sp4 = new SubmissionPeriod(di4, df4);
- SubmissionPeriod sp5 = new SubmissionPeriod(di5, df5);
- SubmissionPeriod sp6 = new SubmissionPeriod(di6, df6);
- SubmissionPeriod sp7 = new SubmissionPeriod(di7, df7);
- SubmissionPeriod sp8 = new SubmissionPeriod(di8, df8);
- SubmissionPeriod sp9 = new SubmissionPeriod(di9, df9);
- List<Workshop> wl1 = new ArrayList<>();
- wl1.add(w1);
- wl1.add(w2);
- wl1.add(w3);
- wl1.add(w4);
- wl1.add(w5);
- wl1.add(w6);
- List<Workshop> wl2 = new ArrayList<>();
- wl2.add(w3);
- wl2.add(w4);
- wl2.add(w12);
- List<Workshop> wl3 = new ArrayList<>();
- wl3.add(w5);
- wl3.add(w6);
- wl1.add(w12);
- List<Workshop> wl4 = new ArrayList<>();
- wl4.add(w7);
- wl4.add(w8);
- wl1.add(w12);
- List<Workshop> wl5 = new ArrayList<>();
- wl5.add(w9);
- wl5.add(w10);
- wl1.add(w12);
- List<Workshop> wl6 = new ArrayList<>();
- wl6.add(w11);
- wl6.add(w12);
- wl1.add(w2);
- List<Workshop> wTest = new ArrayList<>();
- wTest.add(w1);
- wTest.add(w2);
- wTest.add(w3);
- wTest.add(w4);
- wTest.add(w5);
- wTest.add(w6);
- wTest.add(w7);
- wTest.add(w8);
- wTest.add(w9);
- wTest.add(w10);
- wTest.add(w11);
- wTest.add(w12);
- Survey s1 = new Survey("Survey 1", wl1);
- Survey s2 = new Survey("Survey 2", wl2);
- Survey s3 = new Survey("Survey 3", wl3);
- Survey s4 = new Survey("Survey 4", wl4);
- Survey s5 = new Survey("Survey 5", wl5);
- Survey s6 = new Survey("Survey 6", wl6);
- List<Survey> surveyList1 = new ArrayList<>();
- List<Survey> surveyList2 = new ArrayList<>();
- List<Survey> surveyList3 = new ArrayList<>();
- List<Survey> surveyList4 = new ArrayList<>();
- List<Survey> surveyList5 = new ArrayList<>();
- List<Survey> surveyList6 = new ArrayList<>();
- surveyList1.add(s1);
- surveyList1.add(s2);
- surveyList1.add(s3);
- surveyList1.add(s4);
- surveyList1.add(s5);
- surveyList1.add(s6);
- surveyList2.add(s2);
- surveyList3.add(s3);
- surveyList4.add(s4);
- surveyList5.add(s5);
- surveyList6.add(s6);
- StandList slist1 = new StandList();
- StandList slist2 = new StandList();
- StandList slist3 = new StandList();
- StandList slist4 = new StandList();
- StandList slist5 = new StandList();
- StandList slist6 = new StandList();
- slist1.addStand(st1);
- slist2.addStand(st2);
- slist3.addStand(st3);
- slist4.addStand(st4);
- slist5.addStand(st5);
- slist6.addStand(st6);
- EventManager eManager1 = new EventManager(u13);
- EventManager eManager2 = new EventManager(u14);
- EventManager eManager3 = new EventManager(u15);
- EventManager eManager4 = new EventManager(u16);
- //Zé pôs para testar
- StandList standList = new StandList();
- Stand stand1 = new Stand("stand1", 20, new ArrayList<>());
- Stand stand2 = new Stand("stand2", 30, new ArrayList<>());
- stand2.getRelativeDistanceList().add(new RelativeDistance("stand1", 30));
- Stand stand3 = new Stand("stand3", 40, new ArrayList<>());
- stand3.getRelativeDistanceList().add(new RelativeDistance("stand1", 50));
- stand3.getRelativeDistanceList().add(new RelativeDistance("stand2", 20));
- Stand stand4 = new Stand("stand4", 50, new ArrayList<>());
- stand4.getRelativeDistanceList().add(new RelativeDistance("stand1", 10));
- stand4.getRelativeDistanceList().add(new RelativeDistance("stand2", 40));
- stand4.getRelativeDistanceList().add(new RelativeDistance("stand3", 30));
- standList.getStandList().add(stand1);
- standList.getStandList().add(stand2);
- standList.getStandList().add(stand3);
- standList.getStandList().add(stand4);
- //--------------------------------
- Exhibition ex1 = new Exhibition("Exhibition 1", "Exhibition Desc 1", "Place 1", "Exhibition", smList1, orgList1, sp1, wTest, appList1, surveyList1, standList, eManager1);
- Exhibition ex2 = new Exhibition("Exhibition 2", "Exhibition Desc 2", "Place 2", "Exhibition", smList2, orgList2, sp2, wl2, appList2, surveyList2, slist2, eManager2);
- Exhibition ex3 = new Exhibition("Exhibition 3", "Exhibition Desc 3", "Place 3", "Exhibition", smList3, orgList3, sp3, wl3, appList3, surveyList3, slist3, eManager2);
- Congress c1 = new Congress("Congress 1", "Congress Desc 1", "Place 4", "Congress", smList4, orgList4, sp4, wl4, appList4, surveyList4, slist4, eManager3);
- Congress c2 = new Congress("Congress 2", "Congress Desc 2", "Place 5", "Congress", smList5, orgList5, sp5, wl5, appList5, surveyList5, slist5, eManager1);
- Congress c3 = new Congress("Congress 3", "Congress Desc 3", "Place 6", "Congress", smList6, orgList6, sp6, wl6, appList6, surveyList6, slist6, eManager4);
- eCenter.getEventRegister().getEventManagerList().add(eManager4);
- eCenter.getEventRegister().getEventManagerList().add(eManager3);
- eCenter.getEventRegister().getEventManagerList().add(eManager2);
- eCenter.getEventRegister().getEventManagerList().add(eManager1);
- eCenter.getEventRegister().addEvent(ex1);
- eCenter.getEventRegister().addEvent(ex2);
- eCenter.getEventRegister().addEvent(ex3);
- eCenter.getEventRegister().addEvent(c1);
- eCenter.getEventRegister().addEvent(c2);
- eCenter.getEventRegister().addEvent(c3);
- return eCenter;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement