public class URLGenerator extends BaseGenerator
| Modifier and Type | Class and Description |
|---|---|
static class |
URLGenerator.Mode |
static interface |
URLGenerator.URLFilter
Defines url filter.
|
| Constructor and Description |
|---|
URLGenerator(String... startFrom) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptOnlyMatchingURL(String regex)
Can be used to filter url.
|
void |
addHostFilter(String... hosts)
Can be used to filter url according to the host.
|
void |
addURL(String url)
Add an url to process.
|
void |
begin()
Begin the graph generation.
|
void |
declineMatchingURL(String regex)
Can be used to filter url.
|
void |
enableProgression(boolean on) |
boolean |
nextEvents()
Perform the next step in generating the graph.
|
void |
setDepthLimit(int depthLimit)
Set the maximum steps before stop.
|
void |
setDirected(boolean on)
Create directed edges.
|
void |
setEdgeWeightAttribute(String attribute)
Set the attribute key used to store weight of edges.
|
void |
setMode(URLGenerator.Mode mode)
Set the way that url are converted to node id.
|
void |
setNodeWeightAttribute(String attribute)
Set the attribute key used to store weight of nodes.
|
void |
setThreadCount(int count)
Set the amount of threads used to parse urls.
|
addEdgeAttribute, addEdgeLabels, addNodeAttribute, addNodeLabels, end, isUsingInternalGraph, removeEdgeAttribute, removeNodeAttribute, setDirectedEdges, setEdgeAttributesRange, setNodeAttributesRange, setRandomSeed, setUseInternalGraphaddAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBeginspublic URLGenerator(String... startFrom)
public void begin()
GeneratorGenerator.nextEvents() method to add elements to the graph.public boolean nextEvents()
Generatorpublic void addURL(String url)
url - a new urlpublic void setDirected(boolean on)
on - true to create directed edgespublic void setNodeWeightAttribute(String attribute)
attribute - attribute key of the weight of nodespublic void setEdgeWeightAttribute(String attribute)
attribute - attribute key of the weight of edgespublic void setMode(URLGenerator.Mode mode)
mode - mode specifying how to convert url to have node idpublic void setThreadCount(int count)
nextEvents() step. At the end of this method, all working thread
have stop.count - amount of threadspublic void setDepthLimit(int depthLimit)
depthLimit - public void enableProgression(boolean on)
public void acceptOnlyMatchingURL(String regex)
regex - public void declineMatchingURL(String regex)
regex - public void addHostFilter(String... hosts)
hosts - list of accepted hostsCopyright © 2015. All rights reserved.