String namerName = "Eta Namer";
String namerMatchPattern = "([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])_eta_211.nc$";
String namerSubstitutionPattern = "NCEP Eta $1-$2-$3 $4:00:00 GMT";
String dsName = "NCEP Eta 2004-05-08 12:00:00 GMT";
InvDatasetImpl dsParent = new InvDatasetImpl( null, parentDsName );
InvDatasetImpl ds = new InvDatasetImpl( null, null, null, null, dsUrlPath );
DatasetNamer dsNamer = new DatasetNamer( dsParent, namerName, true, DatasetNamerType.REGULAR_EXPRESSION,
namerMatchPattern, namerSubstitutionPattern,
null, null );
assertTrue( "Namer <" + dsNamer.getName() + "> failed to name dataset <urlPath=" + ds.getUrlPath() + ">",
dsNamer.nameDataset( ds));
assertTrue( "Dataset name <" + ds.getName() + "> does not match expected <" + dsName + ">.",
ds.getName().equals( dsName ));
// DatasetNamer( InvDataset parentDs,
// String name, boolean addLevel, DatasetNamerType type,
// String matchPattern, String substitutePattern,
// String attribContainer, String attribName)