while (path != null) {
// first, check for a setting pointing to a defined standard.
String settingDataName = DataRepository.createDataName(path,
SETTING_DATA_NAME);
SimpleData d = data.getSimpleValue(settingDataName);
if (d != null && d.test()) {
String defectTypeName = d.format();
if (defectTypeName.trim().length() > 0)
return getByName(defectTypeName, data);
}
// next, check for an ad-hoc standard, specified directly for this
// particular path
String contentDataName = DataRepository.createDataName(path,
CONTENTS_DATA_NAME);
d = data.getSimpleValue(contentDataName);
if (d != null && d.test())
return getFromContents(d.format());
// no luck - move up the hierarchy
path = DataRepository.chopPath(path);
}