diff --git a/src/main/java/com/loafle/overflow/crawler/result/OFResultSet.java b/src/main/java/com/loafle/overflow/crawler/result/OFResultSet.java index 6d01264..3c860ae 100644 --- a/src/main/java/com/loafle/overflow/crawler/result/OFResultSet.java +++ b/src/main/java/com/loafle/overflow/crawler/result/OFResultSet.java @@ -62,5 +62,13 @@ public abstract class OFResultSet { public abstract Map parse(); + public OFResultSet newInstance(Item item) { + String type = (String) item.getQuery().getQueryInfo().get("parseDirection"); + if (type.equals("row")) { + return new OFResultSetRow(item); + } else { + return new OFResultSetCol(item); + } + } }