MCPcopy Create free account
hub / github.com/GateNLP/gate-core / verifyInput

Method verifyInput

src/main/java/gate/creole/BootStrap.java:482–496  ·  view source on GitHub ↗

verify if the class name contains only letters and digits the path of the new project is a directory

(String className, String pathNewProject)

Source from the content-addressed store, hash-verified

480 * the path of the new project is a directory
481 */
482 public void verifyInput(String className, String pathNewProject)
483 throws GateException {
484 // verify the input
485 // class name contains only letters and digits
486 char[] classNameChars = className.toCharArray();
487 for (int i=0;i<classNameChars.length;i++){
488 if (!Character.isLetterOrDigit(classNameChars[i]))
489 throw new GateException("Only letters and digits in the class name");
490 }
491
492 // verify if it exits a directory of given path
493 File dir = new File(pathNewProject);
494 if (!dir.isDirectory())
495 throw new GateException("The folder is not a directory");
496 }
497
498 /***/
499 public void executableFile(String nameFile)

Callers 1

createResourceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected