changed metamap
This commit is contained in:
parent
9a5a8f696c
commit
7f6fe40dae
|
@ -110,7 +110,7 @@ public class WMICrawlerLinux extends WMICrawlerOS {
|
|||
continue;
|
||||
}
|
||||
|
||||
row = new ArrayList<>();
|
||||
row = new ArrayList<>(Arrays.asList(new String[metaMap.size()]));
|
||||
|
||||
String[] datas = line.split(DELIMITER_SPLIT);
|
||||
|
||||
|
@ -118,8 +118,8 @@ public class WMICrawlerLinux extends WMICrawlerOS {
|
|||
tempMap.put(columns.get(indexJ), datas[indexJ]);
|
||||
}
|
||||
|
||||
for(String key : metaMap.keySet()) {
|
||||
row.add(tempMap.get(key));
|
||||
for (Map.Entry<String, Integer> info : metaMap.entrySet()) {
|
||||
row.set(info.getValue().intValue(), tempMap.get(info.getKey()));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,10 +10,7 @@ import com.loafle.overflow.crawler.config.Query;
|
|||
import com.loafle.overflow.crawler.result.OFResultSet;
|
||||
import com.loafle.overflow.crawler.result.OFResultSetCol;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 2017-04-11.
|
||||
|
@ -62,16 +59,16 @@ public class WMICrawlerWindows extends WMICrawlerOS {
|
|||
|
||||
while (enumVariant.hasMoreElements()) {
|
||||
|
||||
row = new ArrayList<>();
|
||||
row = new ArrayList<>(Arrays.asList(new String[metaMap.size()]));
|
||||
|
||||
vItem = enumVariant.nextElement();
|
||||
item = vItem.toDispatch();
|
||||
|
||||
for( String key : metaMap.keySet()) {
|
||||
vValue = Dispatch.call(item, key);
|
||||
for (Map.Entry<String, Integer> info : metaMap.entrySet()) {
|
||||
vValue = Dispatch.call(item, info.getKey());
|
||||
value = vValue.toString();
|
||||
vValue.safeRelease();
|
||||
row.add(value);
|
||||
row.set(info.getValue().intValue(), value);
|
||||
}
|
||||
|
||||
vItem.safeRelease();
|
||||
|
|
Loading…
Reference in New Issue
Block a user