/*
* Make sure the File name conforms to the '<name>-wfs' format. If not,
* throw an InvalidWFSException.
*/
if (this.root.getName().endsWith(WFS.WFS_DIRECTORY_SUFFIX) == false) {
throw new InvalidWFSException("WFS URI has an invalid name: " + uri.toString());
}
/* Check to see if it exists and it is a directory */
if (create == false && (this.root.exists() == false || this.root.isDirectory() == false)) {
throw new InvalidWFSException("WFS URI is not a directory: " + root.getCanonicalPath());
}
else if (create == true && this.root.exists() == true) {
/* If we wish to create it, but it already exists */
throw new IOException("WFS URI already exists: " + uri.toString());
}