added meta crawler
This commit is contained in:
parent
eba6757f1d
commit
9f3cefd7aa
|
@ -24,7 +24,8 @@ public class WMICrawler extends Crawler {
|
||||||
return WMICrawlerOS.getInstance().process(config);
|
return WMICrawlerOS.getInstance().process(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getInternalMeta(Config config) throws Exception {
|
@Override
|
||||||
|
public Object getInternalMeta(Config c) throws Exception {
|
||||||
|
|
||||||
List<Config> metaConfigList = loadMetaConfig();
|
List<Config> metaConfigList = loadMetaConfig();
|
||||||
|
|
||||||
|
@ -35,7 +36,7 @@ public class WMICrawler extends Crawler {
|
||||||
for(Config metaConfig : metaConfigList) {
|
for(Config metaConfig : metaConfigList) {
|
||||||
|
|
||||||
for(int indexI = 0; indexI < metaConfig.getItems().size(); ++indexI) {
|
for(int indexI = 0; indexI < metaConfig.getItems().size(); ++indexI) {
|
||||||
ofResultSet = os.processWMI(config, metaConfig.getItems().get(indexI));
|
ofResultSet = os.processWMI(c, metaConfig.getItems().get(indexI));
|
||||||
if(ofResultSet != null) {
|
if(ofResultSet != null) {
|
||||||
retlist.add(ofResultSet);
|
retlist.add(ofResultSet);
|
||||||
}
|
}
|
||||||
|
@ -45,6 +46,7 @@ public class WMICrawler extends Crawler {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<Config> loadMetaConfig() throws IOException {
|
private List<Config> loadMetaConfig() throws IOException {
|
||||||
ClassLoader classLoader = getClass().getClassLoader();
|
ClassLoader classLoader = getClass().getClassLoader();
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user