org.knowceans.corpus.parsers.nips
Class NipsDownload

java.lang.Object
  extended by org.knowceans.corpus.parsers.nips.NipsDownload

public class NipsDownload
extends java.lang.Object

Saves a defined set of URLs to disk. This usually is the FIRST task in creating a NIPS corpus.

Author:
heinrich

Field Summary
(package private)  java.lang.String localroot
           
(package private)  java.lang.String remoteroot
           
 
Constructor Summary
NipsDownload(java.lang.String localroot)
           
 
Method Summary
private static void download(java.net.URL url, java.lang.String filename)
          Saves the url content to the filename
 void downloadHtml()
          Downloads the HMTL pages to the
 void downloadPdfLinks()
          downloads all pdf links contained in the downloaded overview html pages
static void main(java.lang.String[] args)
           
 java.lang.String readFile(java.lang.String filename)
          reads local file
 void relinkHtml()
           
 void writeFile(java.lang.String filename, java.lang.String content)
          write String to the file
private static java.lang.String zeropad(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localroot

java.lang.String localroot

remoteroot

java.lang.String remoteroot
Constructor Detail

NipsDownload

public NipsDownload(java.lang.String localroot)
Parameters:
localroot -
Method Detail

main

public static void main(java.lang.String[] args)

downloadHtml

public void downloadHtml()
Downloads the HMTL pages to the


downloadPdfLinks

public void downloadPdfLinks()
downloads all pdf links contained in the downloaded overview html pages


relinkHtml

public void relinkHtml()

readFile

public java.lang.String readFile(java.lang.String filename)
reads local file

Parameters:
filename -
Returns:

writeFile

public void writeFile(java.lang.String filename,
                      java.lang.String content)
write String to the file

Parameters:
filename -
content -

download

private static void download(java.net.URL url,
                             java.lang.String filename)
Saves the url content to the filename

Parameters:
url -
filename -

zeropad

private static java.lang.String zeropad(int i)
Parameters:
i -
Returns: