src/PredFinder/db/PlayerDB.cpp
/**
 * Finds all of the unique player URIs that could match the
 * specified player name assuming that play for a particular team.
 * Multiple returns are allowed since some players share the
 * same name, even on the same team in the same season, although
 * it's unlikely.
 *
 * @param player The string name of the player to check for.
 * @param team The optional NFL team URI to restrict by.
 * @param season The optional NFL season year to restrict by.
 * @return A vector of player URIs; for most situations, its
 * length will be 1.
 *
 * @author nward@bbn.com
 * @date 2010.08.17
 **/
Finds all of the unique player URIs that could match the
specified player name assuming that play for a particular team.
Multiple returns are allowed since some players share the
same name, even on the same team in the same season, although
it's unlikely.

@param player The string name of the player to check for.
@param team The optional NFL team URI to restrict by.
@param season The optional NFL season year to restrict by.
@return A vector of player URIs; for most situations, its
length will be 1.


Finds all of the unique player URIs that could match the specified player name assuming that play for a particular team . Multiple returns are allowed since some players share the same name even on the same team in the same season although it ' s unlikely . @param player The string name of the player to check for . @param team The optional NFL team URI to restrict by . @param season The optional NFL season year to restrict by . @return A vector of player URIs ; for most situations its length will be 1 .
std::vector<std::wstring> PlayerDB::get_uris_for_player(const std::wstring & player, const std::wstring & team, int season) const {
	std::vector<std::wstring> player_uris;
	PlayerResultMap player_team_results = get_teams_for_player(player, season);
	if (team != L"") {
		BOOST_FOREACH(PlayerResultMap::value_type player_team, player_team_results) {
			std::set<std::wstring>::iterator team_i = player_team.second.find(team);
			if (team_i != player_team.second.end()) {
				player_uris.push_back(player_team.first);
			}
		}
	} else {
		BOOST_FOREACH(PlayerResultMap::value_type player_team, player_team_results) {
			player_uris.push_back(player_team.first);
		}
	}
	return player_uris;
}
std :: vector < std :: wstring > PlayerDB :: get_uris_for_player ( const std :: wstring & player , const std :: wstring & team , int season ) const { std :: vector < std :: wstring > player_uris ; PlayerResultMap player_team_results = get_teams_for_player ( player , season ) ; if ( team != L" " ) { BOOST_FOREACH ( PlayerResultMap :: value_type player_team , player_team_results ) { std :: set < std :: wstring > :: iterator team_i = player_team . second . find ( team ) ; if ( team_i != player_team . second . end ( ) ) { player_uris . push_back ( player_team . first ) ; } } } else { BOOST_FOREACH ( PlayerResultMap :: value_type player_team , player_team_results ) { player_uris . push_back ( player_team . first ) ; } } return player_uris ; }
Finds all of the unique player URIs that could match the
 specified player name assuming that play for a particular team.
Finds all of the unique player URIs that could match the specified player name assuming that play for a particular team .
// Result vector
 // Find all URI/team combinations for this player name
 // If a team was specified, restrict the URI search to that
 // See if this player played for this team
 // Just use all of the URIs found
 // Done
