org.archive.crawler.writer
Class MirrorWriterProcessor.EndSegment
java.lang.Object
org.archive.crawler.writer.MirrorWriterProcessor.PathSegment
org.archive.crawler.writer.MirrorWriterProcessor.EndSegment
- Enclosing class:
- MirrorWriterProcessor
class MirrorWriterProcessor.EndSegment
- extends MirrorWriterProcessor.PathSegment
This class represents the last segment (component) of a URI path.
|
Constructor Summary |
MirrorWriterProcessor.EndSegment(java.lang.String uriPath,
int beginIndex,
int endIndex,
int maxSegLen,
boolean caseSensitive,
CrawlURI curi,
java.util.Map characterMap,
java.lang.String dotBegin,
java.lang.String query,
java.lang.String suffix,
int maxPathLen,
boolean suffixAtEnd)
Creates an EndSegment. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MirrorWriterProcessor.EndSegment
MirrorWriterProcessor.EndSegment(java.lang.String uriPath,
int beginIndex,
int endIndex,
int maxSegLen,
boolean caseSensitive,
CrawlURI curi,
java.util.Map characterMap,
java.lang.String dotBegin,
java.lang.String query,
java.lang.String suffix,
int maxPathLen,
boolean suffixAtEnd)
- Creates an EndSegment.
- Parameters:
uriPath - the path part of the URIbeginIndex - the beginning index, inclusive, of the substring
of uriPath to be usedendIndex - the ending index, exclusive, of the substring
of uriPath to be usedmaxSegLen - the maximum number of characters allowed in one
file system path segment (component)caseSensitive - if true, the file system is assumed to be
case-sensitive; otherwise the file system is assumed to be
case-insensitive but case-preservingcuri - the URIcharacterMap - maps characters (as length-1 String values) in
the URI path and query to replacement String valuesdotBegin - if non-null, this replaces a '.' at
the beginning of the segmentquery - the query part of the URI, or null if nonesuffix - if non-null, use this as the suffix in preference to
any suffix that uriPath might havemaxPathLen - the maximum number of characters allowed in a
file system pathsuffixAtEnd - if true, the suffix is placed at the end of the
path, after the query (if any); otherwise, the suffix is placed
before the query
- Throws:
java.lang.IllegalArgumentException - if
beginIndex is negative.
java.lang.IllegalArgumentException - if
endIndex is less than beginIndex.
java.lang.IllegalArgumentException - if
maxSegLen is too small.
addToPath
void addToPath(MirrorWriterProcessor.URIToFileReturn currentPath)
- Description copied from class:
MirrorWriterProcessor.PathSegment
- Adds this segment to a file path.
This is the key method of this class.
It extends the given path by one segment,
named to obey all constraints.
A new directory is created if necessary.
- Specified by:
addToPath in class MirrorWriterProcessor.PathSegment
- Parameters:
currentPath - the current path, to which this segment is added
Copyright © 2003-2011 Internet Archive. All Rights Reserved.