package list_builder;

import java.io.File;

/**
 * Created by NThering on 11/22/2017.
 */

public class Public
{
    /*
     * Returns text file that contains a list of the categories and the names of the articles under each category in this format:
     * Category
     *      Sub Category
     *          Article Name
     *          Article Name
     *      Sub Category
     *          Article Name
     * Category
     *      Sub Category
     *          Article Name
     *      Sub Category
     *      Sub Category
     * etc.
     *
     *  Enumerate through all categories/sub categories and use:
     *  networking.Public.getArticlesFromCategory( int mainCategoryID, int subCategoryID, false )
     *
     *  Look at am_utils.CUtils and the unit tests for Article Proccessing for examples of how to enumerate through categories.
     */
    public static File BuildDatabaseOverview()
    {
        return null;
    }

    /*
     * Returns text file for the given category that contains the title of the articles in that category, names of their authors, and their abstracts in this format:
     * Article Name
     *      Authors: Authors
     *      Abstract: Abstract Text
     * Article Name
     *      Authors: Authors
     *      Abstract: Abstract Text
     * etc.
     *
     * Enumerate through all sub categories in the given category and use:
     * Use networking.Public.getArticlesFromCategory( mainCategoryID, int subCategoryID, true )
     */
    public static File BuildDetailedCategoryListing( int mainCategoryID )
    {
        return null;
    }
}

@@ -32,16 +32,231 @@
 ava.
-io.File;
+util.*;%0Aimport java.io.*;%0Aimport am_utils.DefaultCategories; //import am_utils package%0Aimport am_utils.MainCategory;%0Aimport am_utils.SubCategory;%0Aimport am_utils.CUtils;%0Aimport networking.Public; //import networking package
 %0A%0A/*
@@ -280,16 +280,27 @@
 Thering 
+and belmaz 
 on 11/22
@@ -999,17 +999,16 @@
 cle Proc
-c
 essing f
@@ -1059,32 +1059,125 @@
 gories.%0A     */%0A
+%0A%0A    private static BufferedReader br = null;%0A    private static BufferedWriter bw = null;%0A%0A
     public stati
@@ -1206,31 +1206,51 @@
 erview()
+ throws IOException
 %0A    %7B%0A
+%0A
         
 return n
@@ -1237,35 +1237,591 @@
  %7B%0A%0A        
-return null
+List%3CObject%3E listyList = new ArrayList%3C%3E();%0A%0A        DefaultCategories dCat = new DefaultCategories();%0A        MainCategory mCat%5B%5D = new dCat.getDefaultCategories();%0A        File file = new File(%22categoryList.txt%22);%0A        bw = new BufferedWriter(new FileWriter(%22categoryList.txt%22, true));%0A%0A        for(int i = 0; i %3C def.size(); i++)%0A        %7B%0A            bw.write(mCat%5Bi%5D);%0A            for(int j = 0; j %3C mCat%5Bi%5D.size(); j++)%0A            %7B%0A                bw.newLine();%0A                bw.write(mCat%5Bi%5D.children()%5Bj%5D);%0A            %7D%0A        %7D%0A%0A%0A        return file
 ;%0A    %7D%0A%0A   
@@ -2358,16 +2358,17 @@
      */%0A
+%0A
     publ
@@ -2415,35 +2415,479 @@
 ing(
- int mainCategoryID )%0A    %7B
+) throws IOException%0A    %7B%0A        File file = new File(%22detailedCategoryList.txt%22);%0A        bw = new BufferedWriter(new FileWriter(%22detailedCategoryList.txt%22, true));%0A%0A%0A        for(int i = 0; i%3C ls.size(); i++)%0A        %7B%0A            //ArrayList%3CArticleInfo%3E ls = Public.getArticlesFromCategory();%0A%0A            bw.write(Public.getArticlesFromCategory(i));%0A            for(int j = 0; j%3CPublic.getArticlesFromCategory().size(); j++)%0A            %7B%0A%0A            %7D%0A        %7D%0A%0A
 %0A   
@@ -2898,20 +2898,20 @@
  return 
-null
+file
 ;%0A    %7D%0A

Update on List Builder