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 05239d7..50b36ed 100644 --- a/src/main/java/com/loafle/overflow/crawler/result/OFResultSet.java +++ b/src/main/java/com/loafle/overflow/crawler/result/OFResultSet.java @@ -11,7 +11,7 @@ import java.util.Map; * Created by root on 17. 4. 25. */ public abstract class OFResultSet { - + // properties protected Item item; protected List> rows; protected Map meta = null; @@ -40,7 +40,15 @@ public abstract class OFResultSet { this.item = item; } - + // methods + static 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); + } + } public OFResultSet(Item item) { @@ -58,17 +66,9 @@ public abstract class OFResultSet { return parse(); } + // abstracts public abstract void setMeta(); - public abstract Map parse(); - static 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); - } - } }