|
|
@ -19,6 +19,11 @@ public class DocumentModel extends AlphaCellModel { |
|
|
|
private String informationUrl; |
|
|
|
private String informationUrl; |
|
|
|
private int documentId; |
|
|
|
private int documentId; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final String TITLE = "title"; |
|
|
|
|
|
|
|
public static final String CONTENT = "content"; |
|
|
|
|
|
|
|
public static final String DID = "did"; |
|
|
|
|
|
|
|
public static final String SEARCHCOUNT = "searchcount"; |
|
|
|
|
|
|
|
|
|
|
|
public DocumentModel(String name, String content, int documentId) { |
|
|
|
public DocumentModel(String name, String content, int documentId) { |
|
|
|
super(name, content, CellType.DOCUMENT); |
|
|
|
super(name, content, CellType.DOCUMENT); |
|
|
|
this.documentId = documentId; |
|
|
|
this.documentId = documentId; |
|
|
@ -43,7 +48,7 @@ public class DocumentModel extends AlphaCellModel { |
|
|
|
public JSONObject modelToJson() { |
|
|
|
public JSONObject modelToJson() { |
|
|
|
JSONObject object = JSONObject.create(); |
|
|
|
JSONObject object = JSONObject.create(); |
|
|
|
JSONObject modelObject = JSONObject.create(); |
|
|
|
JSONObject modelObject = JSONObject.create(); |
|
|
|
modelObject.put("title", getName()).put("summary", getContent()).put("did", getDocumentId()).put("searchCount", getSearchCount()); |
|
|
|
modelObject.put(TITLE, getName()).put(CONTENT, getContent()).put(DID, getDocumentId()).put(SEARCHCOUNT, getSearchCount()); |
|
|
|
object.put("result", modelObject).put("cellType", getType().getTypeValue()); |
|
|
|
object.put("result", modelObject).put("cellType", getType().getTypeValue()); |
|
|
|
return object; |
|
|
|
return object; |
|
|
|
} |
|
|
|
} |
|
|
|