]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.workbench.search/src/org/simantics/workbench/search/QueryResult.java
Index tokenized lowercase versions of name and types for UI searches
[simantics/platform.git] / bundles / org.simantics.workbench.search / src / org / simantics / workbench / search / QueryResult.java
1 /*******************************************************************************
2  * Copyright (c) 2011 Association for Decentralized Information Management in
3  * Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.workbench.search;
13
14 import org.simantics.utils.datastructures.map.Tuple;
15
16 /**
17  * @author Tuukka Lehtonen
18  */
19 public class QueryResult extends Tuple {
20
21     public QueryResult(String html, int hits) {
22         this("",html,"", hits);
23     }
24     
25     public QueryResult(String header, String content, String footer, int hits) {
26         super(header,content,footer, hits);
27     }
28     
29     public String getHeader() {
30         return (String) getField(0);
31     }
32     public String getContent() {
33         return (String) getField(1);
34     }
35     
36     public String getFooter() {
37         return (String) getField(2);
38     }
39
40     public String getHtml() {
41         return getHeader() + getContent() + getFooter();
42     }
43
44     public int getHitCount() {
45         return (Integer) getField(3);
46     }
47
48 }