Package org.apache.rat.document
Class DocumentName.FSInfo
java.lang.Object
org.apache.rat.document.DocumentName.FSInfo
- All Implemented Interfaces:
Comparable<DocumentName.FSInfo>
- Enclosing class:
DocumentName
The file system information needed to process document names.
-
Constructor Summary
ConstructorsConstructorDescriptionFSInfo
(String name, FileSystem fileSystem) Constructor.FSInfo
(FileSystem fileSystem) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(DocumentName.FSInfo other) Gets the directory separator.boolean
static DocumentName.FSInfo
int
hashCode()
boolean
Gets the case-sensitivity flag.Removes.
and..
from filenames.Retrieves the root extracted from the name.String[]
Tokenizes the string based on the directory separator of this DocumentName.toString()
Gets the common name for the underlying file system.
-
Constructor Details
-
FSInfo
Constructor. Extracts the necessary data from the file system.- Parameters:
fileSystem
- the file system to extract data from.
-
FSInfo
Constructor. Extracts the necessary data from the file system.- Parameters:
fileSystem
- the file system to extract data from.
-
-
Method Details
-
getDefault
-
toString
Gets the common name for the underlying file system. -
dirSeparator
Gets the directory separator.- Returns:
- The directory separator.
-
isCaseSensitive
public boolean isCaseSensitive()Gets the case-sensitivity flag.- Returns:
- the case-sensitivity flag.
-
rootFor
Retrieves the root extracted from the name.- Parameters:
name
- the name to extract the root from- Returns:
- an optional containing the root or empty.
-
tokenize
Tokenizes the string based on the directory separator of this DocumentName.- Parameters:
source
- the source to tokenize.- Returns:
- the array of tokenized strings.
-
normalize
Removes.
and..
from filenames.- Parameters:
pattern
- the file name pattern- Returns:
- the normalized file name.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<DocumentName.FSInfo>
-
equals
-
hashCode
public int hashCode()
-