Mercurial > hg > Members > tatsuki > bench > jungle-core
comparison src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/SearchQuery.java @ 101:c297f0015d9e
create Update query
author | one |
---|---|
date | Thu, 11 Sep 2014 16:38:26 +0900 |
parents | 95000ff9064d |
children | 78ef456c98a0 |
comparison
equal
deleted
inserted
replaced
100:9a7b7af838e0 | 101:c297f0015d9e |
---|---|
1 package jp.ac.u_ryukyu.ie.cr.tatsuki.jungle.query; | 1 package jp.ac.u_ryukyu.ie.cr.tatsuki.jungle.query; |
2 | 2 |
3 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; | 3 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; |
4 | 4 |
5 public class SearchQuery implements Query { | 5 public class SearchQuery /*implements Query*/ { |
6 | 6 |
7 private String attribute; | 7 private String attribute; |
8 private String key; | 8 private String key; |
9 public SearchQuery(String _key, String _attribute){ | 9 public SearchQuery(String _key, String _attribute){ |
10 key = _key; | 10 key = _key; |
11 attribute = _attribute; | 11 attribute = _attribute; |
12 } | 12 } |
13 @Override | 13 //@Override |
14 public boolean condition(TreeNode _node) { | 14 public boolean condition(TreeNode _node) { |
15 String str = new String(_node.getAttributes().get(key).array()); | 15 String str = new String(_node.getAttributes().get(key).array()); |
16 System.out.println(str); | 16 //System.out.println(str); |
17 if(str.equals(attribute)) | 17 if(str.equals(attribute)) |
18 return true; | 18 return true; |
19 return false; | 19 return false; |
20 } | 20 } |
21 | 21 |
22 | |
23 } | 22 } |