public class URLExtractor extends BaseElementWalker implements IElementConverter
| Modifier and Type | Class and Description |
|---|---|
class |
URLExtractor.WalkElement
the URL walker
|
class |
URLExtractor.WalkURL
the resource walker note the naming convention Walkxxx so that it is automagically instantiated by the super classes
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseURL |
protected String |
currentURL |
protected File |
dir |
protected Set<UrlUtil.URLProtocol> |
protocols |
protected Set<String> |
saved |
logtheFactory| Constructor and Description |
|---|
URLExtractor(File dumpDir,
String currentURL,
String baseURL) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProtocol(UrlUtil.URLProtocol protocol)
add a protocol to the list of protocols that are supported
|
KElement |
convert(KElement e)
generic converter that converts an element
|
protected BaseWalkerFactory |
getFactory() |
String |
toString() |
constructWalkerswalkTree, walkTreeKidsFirstprotected final File dir
protected final String baseURL
protected Set<UrlUtil.URLProtocol> protocols
protected final String currentURL
public URLExtractor(File dumpDir, String currentURL, String baseURL)
dumpDir - the local directory where any files are dumpedcurrentURL - the current local input url for relative urls - in general this will be a file url (cwd)baseURL - the base output url of the extracted data, for instance in an http server environmentpublic void addProtocol(UrlUtil.URLProtocol protocol)
protocol - the protocol to addprotected BaseWalkerFactory getFactory()
getFactory in class BaseElementWalkerpublic KElement convert(KElement e)
IElementConverterconvert in interface IElementConvertere - the element to convertIElementConverter.convert(org.cip4.jdflib.core.KElement)public String toString()
toString in class ElementWalkerElementWalker.toString()Copyright © 2013. All Rights Reserved.