Class ArchiveEntryName

java.lang.Object
org.apache.rat.document.DocumentName
org.apache.rat.document.ArchiveEntryName
All Implemented Interfaces:
Comparable<DocumentName>

public class ArchiveEntryName extends DocumentName
The DocumentName for an ArchiveEntry.
  • Constructor Details

    • ArchiveEntryName

      public ArchiveEntryName(DocumentName archiveFileName, String 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

      public File asFile()
      Description copied from class: DocumentName
      Creates a file from the fully qualified document name.
      Overrides:
      asFile in class DocumentName
      Returns:
      a new File object.
    • asPath

      public Path asPath()
      Description copied from class: DocumentName
      Creates 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:
      asPath in class DocumentName
      Returns:
      a new Path object.
    • resolve

      public DocumentName resolve(String child)
      Description copied from class: DocumentName
      Creates 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:
      resolve in class DocumentName
      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

      public String getBaseName()
      Description copied from class: DocumentName
      Gets the fully qualified basename of the document.
      Overrides:
      getBaseName in class DocumentName
      Returns:
      the fully qualified basename of the document.
    • localized

      public String localized(String dirSeparator)
      Description copied from class: DocumentName
      Gets the portion of the name that is not part of the base name. The resulting name will always start with the directory separator.
      Overrides:
      localized in class DocumentName
      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.