Class MakeFile

java.lang.Object
scrapper.fileCreator.MakeFile

public class MakeFile extends Object
Fetches data from given doc (link).

Without Formatter.java, builds raw data (useful for debugging).

Process:

Call constructor (load file to write to, use external filewriter).

Use setPrasedPage to set link to fetch data from

Call scrap to grab values

Scrap calls Store internally and finally writes to file.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    MakeFile(File file, FileWriter fileWriter)
    After creating this object, you must set the doc (setParsedPage)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This function should be called when ready to run all the methods inside this class (so after setters are made).
    void
    setParsedPage(org.jsoup.nodes.Document parsedPage)
    Sets the current page to parse.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MakeFile

      public MakeFile(File file, FileWriter fileWriter)
      After creating this object, you must set the doc (setParsedPage)
      Parameters:
      file - File to store into.
  • Method Details

    • scrap

      public void scrap() throws IOException
      This function should be called when ready to run all the methods inside this class (so after setters are made). Helps create TableValues and calls Store();
      Throws:
      IOException
    • setParsedPage

      public void setParsedPage(org.jsoup.nodes.Document parsedPage)
      Sets the current page to parse. Call this method each time you want to scrap a page.
      Parameters:
      parsedPage - Page to parse