Rat must be able to distinguish files in multiple file systems; most notably Windows® and Linux®. In addition, we want Rat to produce reports that are comparable across the platforms. To achieve these goals the org.apache.rat.document.impl.DocumentName
class was developed.
All documents in the Rat system have a base directory. Different UIs will set the base directory differently. For example:
build.xml
file is located.When reporting a document Rat will report the path from the base directory to the file; the path relative to the base directory.
The DocumentName
comprises:
name
: The fully qualified file name as provided by the underlying file system.baseName
: The fully qualified base directory name as provided by the underlying file system.dirSeparator
: The directory separator string used by the underlying file system.isCaseSensitive
: The case-sensitive flag for the underlying file system.The class DocumentName
also provides a static value that identifies the case-sensitivity of the underlying operating system.
DocumentName
also provides methods to:
DocumentName
implements
equals()
,hashCode()
Comparable<DocumentName>
.name
and baseName
set to the same underlying file system value.