--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2011 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.workbench.search;\r
+\r
+import org.simantics.utils.datastructures.map.Tuple;\r
+\r
+/**\r
+ * @author Tuukka Lehtonen\r
+ */\r
+public class QueryResult extends Tuple {\r
+\r
+ public QueryResult(String html, int hits) {\r
+ this("",html,"", hits);\r
+ }\r
+ \r
+ public QueryResult(String header, String content, String footer, int hits) {\r
+ super(header,content,footer, hits);\r
+ }\r
+ \r
+ public String getHeader() {\r
+ return (String) getField(0);\r
+ }\r
+ public String getContent() {\r
+ return (String) getField(1);\r
+ }\r
+ \r
+ public String getFooter() {\r
+ return (String) getField(2);\r
+ }\r
+\r
+ public String getHtml() {\r
+ return getHeader() + getContent() + getFooter();\r
+ }\r
+\r
+ public int getHitCount() {\r
+ return (Integer) getField(3);\r
+ }\r
+\r
+}
\ No newline at end of file