@Test public void splitToSectionsDetailed() { List<OrganizationSection> sections = sectionsSplitter.splitToSectionsDetailed("university of california, department of chemistry"); assertEquals(2, sections.size()); OrganizationSection expectedSection1 = new OrganizationSection(OrgSectionType.UNIVERSITY, new String[]{"university", "of", "california"}, 0); assertEquals(expectedSection1, sections.get(0)); OrganizationSection expectedSection2 = new OrganizationSection(OrgSectionType.UNKNOWN, new String[]{"department", "of", "chemistry"}, -1); assertEquals(expectedSection2, sections.get(1)); }
public List<OrganizationSection> splitToSectionsDetailed(String organizationName) { List<String> sections = splitToSections(organizationName); List<OrganizationSection> sectionsDetailed = Lists.newArrayList(); for (String section : sections) { OrganizationSection sectionDetailed = buildSectionDetailed(section); sectionsDetailed.add(sectionDetailed); } return sectionsDetailed; }
OrganizationSectionsSplitter implements Serializable { public List<OrganizationSection> splitToSectionsDetailed(String organizationName) { List<String> sections = splitToSections(organizationName); List<OrganizationSection> sectionsDetailed = Lists.newArrayList(); for (String section : sections) { OrganizationSection sectionDetailed = buildSectionDetailed(section); sectionsDetailed.add(sectionDetailed); } return sectionsDetailed; } }
OrganizationSectionsSplitter implements Serializable { public List<OrganizationSection> splitToSectionsDetailed(String organizationName) { List<String> sections = splitToSections(organizationName); List<OrganizationSection> sectionsDetailed = Lists.newArrayList(); for (String section : sections) { OrganizationSection sectionDetailed = buildSectionDetailed(section); sectionsDetailed.add(sectionDetailed); } return sectionsDetailed; }  }
OrganizationSectionsSplitter implements Serializable { public List<OrganizationSection> splitToSectionsDetailed(String organizationName) { List<String> sections = splitToSections(organizationName); List<OrganizationSection> sectionsDetailed = Lists.newArrayList(); for (String section : sections) { OrganizationSection sectionDetailed = buildSectionDetailed(section); sectionsDetailed.add(sectionDetailed); } return sectionsDetailed; }  List<String> splitToSections(String organizationName); List<OrganizationSection> splitToSectionsDetailed(String organizationName); }
OrganizationSectionsSplitter implements Serializable { public List<OrganizationSection> splitToSectionsDetailed(String organizationName) { List<String> sections = splitToSections(organizationName); List<OrganizationSection> sectionsDetailed = Lists.newArrayList(); for (String section : sections) { OrganizationSection sectionDetailed = buildSectionDetailed(section); sectionsDetailed.add(sectionDetailed); } return sectionsDetailed; }  List<String> splitToSections(String organizationName); List<OrganizationSection> splitToSectionsDetailed(String organizationName);  }