From 4a9fca0bbdc687701aa8c16051807673e4e6ada6 Mon Sep 17 00:00:00 2001 From: "jackdaw@loafle.com" Date: Tue, 25 Apr 2017 16:43:00 +0900 Subject: [PATCH] result set --- .../overflow/crawler/result/OFResultSet.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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); - } - } }