Class ArchiveEntryName
java.lang.Object
org.apache.rat.document.DocumentName
org.apache.rat.document.ArchiveEntryName
- All Implemented Interfaces:
Comparable<DocumentName>
The DocumentName for an ArchiveEntry.
-
Nested Class Summary
Nested classes/interfaces inherited from class DocumentName
DocumentName.Builder, DocumentName.FSInfo -
Constructor Summary
ConstructorsConstructorDescriptionArchiveEntryName(DocumentName archiveFileName, String archiveEntryName) Constucts an archive file name from an archive file document name and an entry name. -
Method Summary
Modifier and TypeMethodDescriptionasFile()Creates a file from the fully qualified document name.asPath()Creates a path from the document name.Gets the fully qualified basename of the document.Gets the portion of the name that is not part of the base name.Creates a new DocumentName by adding the child to the current name.Methods inherited from class DocumentName
builder, builder, builder, builder, builder, compareTo, equals, fsInfo, getBaseDocumentName, getDirectorySeparator, getName, getPath, getRoot, getShortName, hashCode, isCaseSensitive, localized, toString
-
Constructor Details
-
ArchiveEntryName
Constucts an archive file name from an archive file document name and an entry name.- Parameters:
archiveFileName- the archive file document name.archiveEntryName- the archive entry name.
-
-
Method Details
-
asFile
Description copied from class:DocumentNameCreates a file from the fully qualified document name.- Overrides:
asFilein classDocumentName- Returns:
- a new File object.
-
asPath
Description copied from class:DocumentNameCreates a path from the document name. This method uses the fully qualified name without the root. this results in a relative file name from the root.- Overrides:
asPathin classDocumentName- Returns:
- a new Path object.
-
resolve
Description copied from class:DocumentNameCreates a new DocumentName by adding the child to the current name. Resulting documentName will have the same base name. Directory separator is normalized to the directory separator for this file system. If the child string:- Is blank
- This DocumentName is returned.
- Starts with the file system root
- The root must match the root of this DocumentName and the directory structure must start with the directory structure of the basename for this DocumentName.
- Starts with the directory separator character
- Result will be a tree starting at the directory specified by the basename.
- Does not start with a directory separator character
- Result will be a tree starting at the directory specified by this DocumentName
- Overrides:
resolvein classDocumentName- Parameters:
child- the child to add (must use directory separator from this document name).- Returns:
- the new document name with the same
DocumentName.baseName, directory sensitivity and case sensitivity as this one.
-
getBaseName
Description copied from class:DocumentNameGets the fully qualified basename of the document.- Overrides:
getBaseNamein classDocumentName- Returns:
- the fully qualified basename of the document.
-
localized
Description copied from class:DocumentNameGets the portion of the name that is not part of the base name. The resulting name will always start with the directory separator.- Overrides:
localizedin classDocumentName- Parameters:
dirSeparator- The character(s) to use to separate directories in the result.- Returns:
- the portion of the name that is not part of the base name.
-