public void newDomain(File fileToSave){
  try {
    String skeletton="<domain>\n\n</domain>";
    Files.write(Paths.get(fileToSave.toURI()),skeletton.getBytes());
    log.info("Saving domain in " + fileToSave);
    Domain newDomain=XMLDomainReader.extractDomain(fileToSave.getAbsolutePath());
    system.changeDomain(newDomain);
    refresh();
    system.displayComment("Dialogue domain successfully created");
  }
 catch (  IOException e) {
    log.severe("Cannot create new domain: " + e);
  }
}

public void newDomain ( File fileToSave ) { try { String skeletton = "<domain>\n\n</domain>" ; Files . write ( Paths . get ( fileToSave . toURI ( ) ) , skeletton . getBytes ( ) ) ; log . info ( "Saving domain in " + fileToSave ) ; Domain newDomain = XMLDomainReader . extractDomain ( fileToSave . getAbsolutePath ( ) ) ; system . changeDomain ( newDomain ) ; refresh ( ) ; system . displayComment ( "Dialogue domain successfully created" ) ; } catch ( IOException e ) { log . severe ( "Cannot create new domain: " + e ) ; } }
creates a new domain and saves it in the file given as argument .
