Package xal.tools

Class URLReference

java.lang.Object
xal.tools.URLReference

public class URLReference extends Object
URLReference
  • Method Details

    • getInstance

      public static URLReference getInstance(URL possibleRoot, String fullURLSpec)
      Create a new reference testing whether the url spec is rooted in the root.
      Parameters:
      possibleRoot - possible root for the specified full URL spec
      fullURLSpec - full URL spec to represent
    • getFullURLSpec

      public String getFullURLSpec()
      Get the full URL Spec
    • getURLSpec

      public String getURLSpec()
      Get the URL spec which is relative to the root if possible and absolute if not
    • isRootedIn

      public static boolean isRootedIn(File directory, File file)
      Test whether the file is rooted in the directory
    • isRootedIn

      public static boolean isRootedIn(URL rootURL, URL url)
      Test whether the URL is rooted in the specified root URL
    • isRootedIn

      public static boolean isRootedIn(URL rootURL, String urlSpec)
      Test whether the URL spec is rooted in the specified root URL
    • isRooted

      public boolean isRooted()
      Test whether the URL Spec is rooted in the possible root
    • getValidReferences

      public static URLReference[] getValidReferences(URL possibleRoot, String[] urlSpecs)
      Generate and return URL References for all url Specs which are valid
    • isValid

      public boolean isValid()
      Test whether the URL spec represents a valid file
    • toString

      public String toString()
      Overridden to return the URL spec
      Overrides:
      toString in class Object