Class Location

java.lang.Object
org.apache.jena.dboe.base.file.Location

public class Location extends Object
Wrapper for a file system directory; can create filenames in that directory. Enforces some simple consistency policies and provides a "typed string" for a filename to reduce errors.
  • Method Details

    • mem

      public static Location mem()
      Return a fresh memory location : always unique, never .equals to another location.
    • mem

      public static Location mem(String name)
      Return a memory location with a name
    • create

      public static Location create(String directoryName)
      Return a location for a directory on disk
    • create

      public static Location create(Path directoryName)
      Return a location for a directory on disk
    • getDirectoryPath

      public String getDirectoryPath()
    • getMetaFile

      public MetaFile getMetaFile()
    • isMem

      public boolean isMem()
    • isMemUnique

      public boolean isMemUnique()
    • getSubLocation

      public Location getSubLocation(String dirname)
    • getSubDirectory

      public String getSubDirectory(String dirname)
    • absolute

      public String absolute(String filename, String extension)
      Return an absolute filename where relative names are resolved from the location
    • absolute

      public String absolute(String filename)
      Return an absolute filename where relative names are resolved from the location
    • exists

      public boolean exists()
      Does the location exist (and it a directory, and is accessible)
    • exists

      public boolean exists(String filename)
    • exists

      public boolean exists(String filename, String ext)
    • getPath

      public String getPath(String filename)
      Return the name of the file relative to this location
    • getPath

      public String getPath(String filename, String ext)
      Return the name of the file, and extension, relative to this location
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object