Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3bcb5d91e8
|
@ -1,6 +1,7 @@
|
||||||
package com.loafle.overflow.crawler.result;
|
package com.loafle.overflow.crawler.result;
|
||||||
|
|
||||||
import com.loafle.overflow.crawler.config.Item;
|
import com.loafle.overflow.crawler.config.Item;
|
||||||
|
import com.loafle.overflow.crawler.config.MappingInfo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -42,6 +43,9 @@ public abstract class OFResultSet {
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
static public OFResultSet newInstance(Item item) {
|
static public OFResultSet newInstance(Item item) {
|
||||||
|
if (item.getMappingInfo() == null) {
|
||||||
|
item.setMappingInfo(new MappingInfo());
|
||||||
|
}
|
||||||
String type = (String) item.getMappingInfo().getParseDirection();
|
String type = (String) item.getMappingInfo().getParseDirection();
|
||||||
if (type != null && type.equals("row")) {
|
if (type != null && type.equals("row")) {
|
||||||
return new OFResultSetRow(item);
|
return new OFResultSetRow(item);
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class OFResultSetRow extends OFResultSet{
|
||||||
for (String keyColumn: keyColumns) {
|
for (String keyColumn: keyColumns) {
|
||||||
String row = data.get(this.meta.get(keyColumn));
|
String row = data.get(this.meta.get(keyColumn));
|
||||||
for (int i =0 ; i < keys.size() ; ++i) {
|
for (int i =0 ; i < keys.size() ; ++i) {
|
||||||
if (row.equals(keys.get(i))) {
|
if (row.equals(keys.get(i).getKey())) {
|
||||||
findIndex = i;
|
findIndex = i;
|
||||||
find = true;
|
find = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user