use of net.sourceforge.processdash.data.repository.SimplePrefixLocalDataNameFilter in project processdash by dtuma.
the class DefaultImportInstructionSpecProvider method scanForInstructions.
private void scanForInstructions() {
Iterator keys = data.getKeys(null, new SimplePrefixLocalDataNameFilter(new PatternList(INSTRUCTIONS_DATANAME)));
while (keys.hasNext()) {
String dataName = (String) keys.next();
if (!dataName.endsWith("/" + INSTRUCTIONS_DATANAME))
continue;
ListData l = ListData.asListData(data.getSimpleValue(dataName));
if (l == null || !l.test())
continue;
for (int i = 1; i < l.size(); i += 2) {
String id = l.get(i - 1).toString();
if (cache.containsKey(id))
continue;
String spec = l.get(i).toString();
Element specXml;
try {
specXml = parseSpec(spec).getDocumentElement();
} catch (Exception e) {
specXml = null;
}
cache.put(id, specXml);
}
}
}
Aggregations