|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.io.AbstractReader infovis.table.io.AbstractTableReader infovis.graph.io.HTMLGraphReader
public class HTMLGraphReader
The HTMLGraphReader is creates a graph from html web sites.
Field Summary | |
---|---|
static String |
COLUMN_DATE
|
static String |
COLUMN_LENGTH
|
static String |
COLUMN_MIME_TYPE
|
static String |
COLUMN_NAME
|
static String |
COLUMN_REF
|
static String |
COLUMN_TITLE
|
static String |
COLUMN_URL
|
Constructor Summary | |
---|---|
HTMLGraphReader(String name,
Graph graph)
Constructor for HTMLGraphReader. |
Method Summary | |
---|---|
boolean |
add(String url)
Adds a specified url to the queue of URL to load. |
boolean |
add(URL url)
Adds a specified url to the queue of URL to load. |
void |
annotateWithLog(BufferedReader in,
String path)
DOCUMENT ME! |
boolean |
considerURL(URL url)
Test whether a specified URL should be considered for loading. |
ObjectColumn |
createUrlColumn(ObjectColumn obj)
Creates a column of URLs. |
URL |
getBase()
|
PrintStream |
getLog()
Returns the log. |
LinkedList |
getQueue()
Returns the list of URL strings on the queue |
URL |
getRealRoot()
Returns the realRoot. |
Map |
getUrlMap()
Returns the URL map. |
boolean |
isAddingURL()
|
boolean |
load()
Main method for loading the file. |
int |
loadOne(String urlString)
|
URL |
normalize(URL url)
Normalize a specified URL. |
boolean |
remove(String urlString)
|
void |
setAddingURL(boolean b)
|
void |
setLog(PrintStream log)
Sets the log. |
void |
setQueue(LinkedList list)
Sets the list of URLs to load, as strings |
void |
setRealRoot(URL realRoot)
Sets the realRoot. |
Methods inherited from class infovis.table.io.AbstractTableReader |
---|
close, getBuffer, getBufferedReader, getCommentChar, getField, getIn, getTable, ignoreLine, isEof, read, readInt, readLine, readQuoted, setBuffer, setCommentChar, setEof, setTable, skipToEol |
Methods inherited from class infovis.io.AbstractReader |
---|
createColumn, getEncoding, getName, guessFieldType, setEncoding, setIn, setName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COLUMN_NAME
public static final String COLUMN_URL
public static final String COLUMN_LENGTH
public static final String COLUMN_DATE
public static final String COLUMN_MIME_TYPE
public static final String COLUMN_TITLE
public static final String COLUMN_REF
Constructor Detail |
---|
public HTMLGraphReader(String name, Graph graph)
name
- the URL to load.graph
- the Graph to read.Method Detail |
---|
public boolean considerURL(URL url)
url
- the url.
true
if a specified URL should be
considered for loading.public boolean add(String url)
url
- the url.
true
if the URL has been queued.public URL normalize(URL url)
url
- the URL.
public boolean add(URL url)
url
- the url.
true
if the URL has been queued.public boolean remove(String urlString)
public int loadOne(String urlString) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public boolean load()
AbstractReader
load
in class AbstractReader
AbstractReader.load()
public ObjectColumn createUrlColumn(ObjectColumn obj)
obj
- an ObjectColumn which will contain the urls.
If null
, a new one will be created with "URL" as name.public Map getUrlMap()
public PrintStream getLog()
public void setLog(PrintStream log)
log
- The log to setpublic void annotateWithLog(BufferedReader in, String path)
in
- DOCUMENT ME!path
- DOCUMENT ME!public URL getRealRoot()
public void setRealRoot(URL realRoot)
realRoot
- The realRoot to setpublic LinkedList getQueue()
public void setQueue(LinkedList list)
list
- the list of URLs to load, as stringspublic boolean isAddingURL()
public void setAddingURL(boolean b)
public URL getBase()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |