private void readUserIds() throws IOException, IllegalStateException { if (isUsersFileSpecified() && !isUserItemFileSpecified()) { userIds = readIDList(usersFile); } else if (isUserItemFileSpecified() && !isUsersFileSpecified()) { readUserItemFilterIfNeeded(); userIds = extractAllUserIdsFromUserItemFilter(userItemFilter); } else if (!isUsersFileSpecified()) { throw new IllegalStateException("Neither usersFile nor userItemFile options are specified"); } else { throw new IllegalStateException("usersFile and userItemFile options cannot be used simultaneously"); } }
private void readItemIds() throws IOException, IllegalStateException { if (isItemsFileSpecified() && !isUserItemFileSpecified()) { itemIds = readIDList(itemsFile); } else if (isUserItemFileSpecified() && !isItemsFileSpecified()) { readUserItemFilterIfNeeded(); itemIds = extractAllItemIdsFromUserItemFilter(userItemFilter); } else if (!isItemsFileSpecified()) { throw new IllegalStateException("Neither itemsFile nor userItemFile options are specified"); } else { throw new IllegalStateException("itemsFile and userItemFile options cannot be specified simultaneously"); } }
private void readUserIds() throws IOException, IllegalStateException { if (isUsersFileSpecified() && !isUserItemFileSpecified()) { userIds = readIDList(usersFile); } else if (isUserItemFileSpecified() && !isUsersFileSpecified()) { readUserItemFilterIfNeeded(); userIds = extractAllUserIdsFromUserItemFilter(userItemFilter); } else if (!isUsersFileSpecified() && !isUserItemFileSpecified()) { throw new IllegalStateException("Neither usersFile nor userItemFile options are specified"); } else { throw new IllegalStateException("usersFile and userItemFile options cannot be used simultaneously"); } }
private void readItemIds() throws IOException, IllegalStateException { if (isItemsFileSpecified() && !isUserItemFileSpecified()) { itemIds = readIDList(itemsFile); } else if (isUserItemFileSpecified() && !isItemsFileSpecified()) { readUserItemFilterIfNeeded(); itemIds = extractAllItemIdsFromUserItemFilter(userItemFilter); } else if (!isItemsFileSpecified() && !isUserItemFileSpecified()) { throw new IllegalStateException("Neither itemsFile nor userItemFile options are specified"); } else { throw new IllegalStateException("itemsFile and userItemFile options cannot be specified simultaneously"); } }
/** * Reads user ids and item ids from files specified in a job configuration * * @throws IOException if an error occurs during file read operation * * @throws IllegalStateException if userItemFile option is specified together with usersFile or itemsFile */ public void readIDs() throws IOException, IllegalStateException { if (isUserItemFileSpecified()) { readUserItemFilterIfNeeded(); } if (isUsersFileSpecified() || isUserItemFilterSpecified()) { readUserIds(); } if (isItemsFileSpecified() || isUserItemFilterSpecified()) { readItemIds(); } }
/** * Reads user ids and item ids from files specified in a job configuration * * @throws IOException if an error occurs during file read operation * * @throws IllegalStateException if userItemFile option is specified together with usersFile or itemsFile */ public void readIDs() throws IOException, IllegalStateException { if (isUserItemFileSpecified()) { readUserItemFilterIfNeeded(); } if (isUsersFileSpecified() || isUserItemFilterSpecified()) { readUserIds(); } if (isItemsFileSpecified() || isUserItemFilterSpecified()) { readItemIds(); } }