Package xal.tools
Class URLReference
java.lang.Object
xal.tools.URLReference
URLReference
-
Method Summary
Modifier and TypeMethodDescriptionGet the full URL Specstatic URLReference
getInstance
(URL possibleRoot, String fullURLSpec) Create a new reference testing whether the url spec is rooted in the root.Get the URL spec which is relative to the root if possible and absolute if notstatic URLReference[]
getValidReferences
(URL possibleRoot, String[] urlSpecs) Generate and return URL References for all url Specs which are validboolean
isRooted()
Test whether the URL Spec is rooted in the possible rootstatic boolean
isRootedIn
(File directory, File file) Test whether the file is rooted in the directorystatic boolean
isRootedIn
(URL rootURL, String urlSpec) Test whether the URL spec is rooted in the specified root URLstatic boolean
isRootedIn
(URL rootURL, URL url) Test whether the URL is rooted in the specified root URLboolean
isValid()
Test whether the URL spec represents a valid filetoString()
Overridden to return the URL spec
-
Method Details
-
getInstance
Create a new reference testing whether the url spec is rooted in the root.- Parameters:
possibleRoot
- possible root for the specified full URL specfullURLSpec
- full URL spec to represent
-
getFullURLSpec
Get the full URL Spec -
getURLSpec
Get the URL spec which is relative to the root if possible and absolute if not -
isRootedIn
Test whether the file is rooted in the directory -
isRootedIn
Test whether the URL is rooted in the specified root URL -
isRootedIn
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
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
Overridden to return the URL spec
-