private boolean isValid(String line,Pattern pattern){
  if (globalMatcher != null) {
    globalMatcher.reset();
  }
  globalMatcher=pattern.matcher(line);
  return globalMatcher.matches();
}

private boolean isValid ( String line , Pattern pattern ) { if ( globalMatcher != null ) { globalMatcher . reset ( ) ; } globalMatcher = pattern . matcher ( line ) ; return globalMatcher . matches ( ) ; }
verifies that the given line from the model file is a valid for a given pattern
