Unverified Commit 3a1ac719 authored by Mathieu Féry (Mathius)'s avatar Mathieu Féry (Mathius)
Browse files

Add many names generator endpoint

TODO : Scifi and Weird names
parent f155c993
......@@ -14,6 +14,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ExecutionException;
......@@ -227,8 +228,12 @@ public class Name implements Serializable {
public static final String femaleType = "Female";
public static final String townType = "Town";
public static final String elementalType = "Elemental";
public static final String specificLocationType = "Location";
public static final String castleType = "Castle";
public static final List<String> genderTypes = Arrays.asList(maleType, femaleType);
public static final List<String> genderAndTownTypes = joinList(genderTypes, townType);
public static final List<String> genderAndTownTypes = joinList(genderTypes, townType);
public static final List<String> genderTownAndCastleTypes = joinList(genderAndTownTypes,
castleType);
public static final List<String> commonFantasySpecies = Arrays.asList(
"Human", "Dwarvish", "Elvish", "Halfling");
public static final List<String> monstrousFantasySpecies = Arrays.asList(
......@@ -237,6 +242,30 @@ public class Name implements Serializable {
"Celestial", "Fiendish", "Modron");
public static final List<String> elementalFantasySpecies = Arrays.asList(
"Air", "Earth", "Fire", "Water");
public static final List<String> fantasySettingsEntity = Arrays.asList(
"Party", "Ship", "Deity");
public static final List<String> fantasySettingsEvent = Arrays.asList(
"Festival", "Blasphemy", "War");
public static final List<String> fantasySettingsItem = Arrays.asList(
"Tome", "Weapon");
public static final List<String> fantasySettingsBaseLocation = Arrays.asList(
"Kingdom", "Castle", "Dungeon", "Geography");
public static final List<String> fantasySettingsSpecificLocation = Collections.singletonList(
"Planar");
public static final List<String> fantasySettingsTown = Arrays.asList(
"Town", "Ward", "Street", "Inn");
public static final List<String> ancientWorldPeople = Arrays.asList(
"Babylonian", "Celtic", "Egyptian", "Greek", "Roman", "Sumerian");
public static final List<String> medievalPeople = Arrays.asList(
"English", "French", "German", "Italian", "Norse", "Saxon", "Slavic", "Spanish");
public static final List<String> baseAsiaticPeople = Arrays.asList(
"Arabic", "Chinese", "Hebrew", "Hindu", "Mongolian", "Persian");
public static final List<String> specificAsiaticPeople = Collections.singletonList(
"Japanese");
public static final List<String> africaPeople = Arrays.asList(
"Congolese", "Egyptian", "Ethiopian", "Malian");
public static final List<String> newWorldPeople = Arrays.asList(
"Algonquin", "Aztec", "Inkan", "Inuit", "Navajo", "Sioux");
public static final List<Name> commonFantasyNames = createAllCombination(
commonFantasySpecies, genderAndTownTypes);
public static final List<Name> monstrousFantasyNames = createAllCombination(
......@@ -245,9 +274,33 @@ public class Name implements Serializable {
outsiderFantasySpecies);
public static final List<Name> elementalFantasyNames = createAllCombination(
elementalFantasySpecies, elementalType);
public static final List<Name> entityFantasyNames = createAllCombination(fantasySettingsEntity);
public static final List<Name> eventFantasyNames = createAllCombination(fantasySettingsEvent);
public static final List<Name> itemFantasyNames = createAllCombination(fantasySettingsItem);
public static final List<Name> locationFantasyNames = joinList(Arrays.asList(
createAllCombination(fantasySettingsBaseLocation),
createAllCombination(fantasySettingsSpecificLocation, specificLocationType)));
public static final List<Name> townFantasyNames = createAllCombination(fantasySettingsTown);
public static final List<Name> allFantasyNames = joinList(Arrays.asList(
commonFantasyNames, monstrousFantasyNames, outsiderFantasyNames, elementalFantasyNames));
public static final List<Name> allNames = allFantasyNames;
commonFantasyNames, monstrousFantasyNames, outsiderFantasyNames, elementalFantasyNames,
entityFantasyNames, eventFantasyNames, itemFantasyNames, locationFantasyNames,
townFantasyNames));
public static final List<Name> ancientWorldPeopleNames = createAllCombination(
ancientWorldPeople, genderAndTownTypes);
public static final List<Name> medievalPeopleNames = createAllCombination(
medievalPeople, genderAndTownTypes);
public static final List<Name> asiaticPeopleNames = joinList(Arrays.asList(
createAllCombination(baseAsiaticPeople, genderAndTownTypes),
createAllCombination(specificAsiaticPeople, genderTownAndCastleTypes)));
public static final List<Name> africaPeopleNames = createAllCombination(
africaPeople, genderAndTownTypes);
public static final List<Name> newWorldPeopleNames = createAllCombination(
newWorldPeople, genderAndTownTypes);
public static final List<Name> allQuasiHistoricalNames = joinList(Arrays.asList(
ancientWorldPeopleNames, medievalPeopleNames, asiaticPeopleNames, africaPeopleNames,
newWorldPeopleNames));
public static final List<Name> allNames = joinList(Arrays.asList(allFantasyNames,
allQuasiHistoricalNames));
public static final Name defaultName = commonFantasyNames.get(0);
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment