Fixed Rule for METADATA::COLLECTION
This commit is contained in:
parent
6b7feaee29
commit
58f9dc9cad
|
@ -164,13 +164,7 @@ public class TestRules extends ContextTest {
|
|||
}
|
||||
};
|
||||
|
||||
for(File dir : rulesDirectory.listFiles()) {
|
||||
if(!dir.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
File[] elaborationFilesNoMatch = dir.listFiles(filenameFilter);
|
||||
|
||||
for(File elaborationFileNoMatch : elaborationFilesNoMatch) {
|
||||
for(File elaborationFileNoMatch : rulesDirectory.listFiles(filenameFilter)) {
|
||||
logger.info("Comparing examples which must not match from file {}", elaborationFileNoMatch.getName());
|
||||
try(BufferedReader br = new BufferedReader(new FileReader(elaborationFileNoMatch))) {
|
||||
for(String line; (line = br.readLine()) != null;) {
|
||||
|
@ -208,7 +202,7 @@ public class TestRules extends ContextTest {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.info(
|
||||
"-----------------------------------------------------------------------------------------------------\n\n\n");
|
||||
}
|
||||
|
@ -218,7 +212,7 @@ public class TestRules extends ContextTest {
|
|||
allRules();
|
||||
File rulesDirectory = getRulesDirectory();
|
||||
File rulesDirFile = new File(rulesDirectory, "Thredds");
|
||||
File rulesFile = new File(rulesDirFile, "Thredds_METADATA::OTHER.json");
|
||||
File rulesFile = new File(rulesDirFile, "Thredds_METADATA::COLLECTION.json");
|
||||
testRule(rulesFile);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "SDI",
|
||||
"serviceNameRegex": "Thredds",
|
||||
"calledMethodRegex": "^(\/){1}(?<Protocol>[a-zA-Z0-9]*){1}(\/public\/netcdf\/){1}(?<Collection>[a-zA-Z0-9_-]*)(\/){1}(.*\\.(nc|asc|tiff)).{1,}"
|
||||
"calledMethodRegex": "^(\/){1}(?<Protocol>[a-zA-Z0-9]*){1}(\/public\/netcdf\/){1}(?<Collection>[a-zA-Z0-9_-]*(?<!(..\\.nc)))(\/){1}.*(?<!(..\\.nc|.\\.asc|\\.tiff))$"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "SDI",
|
||||
"serviceName": "Thredds",
|
||||
"calledMethod": "${Protocol}::${Collection}"
|
||||
"calledMethod": "METADATA::${Collection}"
|
||||
}
|
||||
}
|
|
@ -2,11 +2,11 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "SDI",
|
||||
"serviceNameRegex": "Thredds",
|
||||
"calledMethodRegex": "^(\/){1}(?<Protocol>[a-zA-Z0-9]*){1}(\/public\/netcdf\/){1}([^\/]*\\.(nc|asc|tiff)).{1,}"
|
||||
"calledMethodRegex": "^(\/){1}(?<Protocol>[a-zA-Z0-9]*){1}(\/public\/netcdf\/){1}((.*\\.(nc|asc|tiff)).{1,})"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "SDI",
|
||||
"serviceName": "Thredds",
|
||||
"calledMethod": "${Protocol}::OTHER"
|
||||
"calledMethod": "METADATA::OTHER"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
Service Class,Service Name,Called Method
|
||||
SDI,Thredds,/style/ncss/layout.css
|
||||
SDI,Thredds,/tds.css
|
||||
SDI,Thredds,/folder.gif
|
||||
SDI,Thredds,/godiva2/css/calendar-blue.css
|
||||
SDI,Thredds,/godiva2/css/godiva2.css
|
||||
SDI,Thredds,/style/ncss/main.css
|
||||
SDI,Thredds,/tdsCat.css
|
||||
SDI,Thredds,/tdsDap.css
|
||||
SDI,Thredds,/
|
||||
SDI,Thredds,/godiva2/theme/default/img/close.gif
|
||||
SDI,Thredds,/godiva2/images/ajax-loader.gif
|
||||
SDI,Thredds,/godiva2/img/blank.gif
|
||||
SDI,Thredds,/godiva2/theme/default/style.css
|
||||
SDI,Thredds,/js/lib/OpenLayers-2.12/theme/default/style.css
|
||||
SDI,Thredds,/style/ncss/form.css
|
||||
SDI,Thredds,/threddsIcon.gif
|
|
Loading…
Reference in New Issue