Package org.cip4.jdflib.elementwalker
Class URLExtractor
java.lang.Object
org.cip4.jdflib.elementwalker.ElementWalker
org.cip4.jdflib.elementwalker.BaseElementWalker
org.cip4.jdflib.elementwalker.URLExtractor
- All Implemented Interfaces:
IElementConverter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassthe URL walkerclassthe resource walker note the naming convention Walkxxx so that it is automagically instantiated by the super classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final Stringprotected booleanprotected final Fileprotected Set<UrlUtil.URLProtocol>Fields inherited from class org.cip4.jdflib.elementwalker.ElementWalker
theFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProtocol(UrlUtil.URLProtocol protocol) add a protocol to the list of protocols that are supportedgeneric converter that converts an elementgetSaved()Getter for list of saved filesbooleanvoidsetDeleteFile(boolean deleteFile) voidsetWantLog(boolean bWant) toString()Methods inherited from class org.cip4.jdflib.elementwalker.BaseElementWalker
getFactoryMethods inherited from class org.cip4.jdflib.elementwalker.ElementWalker
walkTree, walkTreeKidsFirst
-
Field Details
-
dir
-
baseURL
-
protocols
-
currentURL
-
saved
-
deleteFile
protected boolean deleteFile
-
-
Constructor Details
-
URLExtractor
- Parameters:
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 environment
-
-
Method Details
-
isDeleteFile
public boolean isDeleteFile()- Returns:
- the deleteFile
-
setDeleteFile
public void setDeleteFile(boolean deleteFile) - Parameters:
deleteFile- the deleteFile to set; if true files are move rather than copied note that files are NOT removed from zip or mime packages
-
getSaved
Getter for list of saved files- Returns:
- the saved
-
setWantLog
public void setWantLog(boolean bWant) - Parameters:
bWant- if true, we will log each move
-
addProtocol
add a protocol to the list of protocols that are supported- Parameters:
protocol- the protocol to add
-
convert
Description copied from interface:IElementConvertergeneric converter that converts an element- Specified by:
convertin interfaceIElementConverter- Parameters:
root- the element to convert- Returns:
- the converted element
- See Also:
-
toString
- Overrides:
toStringin classElementWalker- See Also:
-