1 30 31 package de.susebox.jtopas.spi; 32 33 import de.susebox.jtopas.TokenizerProperty; 37 import de.susebox.jtopas.TokenizerProperties; 38 39 40 44 61 public class StandardKeywordHandler implements KeywordHandler { 62 63 70 public StandardKeywordHandler(TokenizerProperties props) { 71 _properties = props; 72 } 73 74 82 public boolean hasKeywords() { 83 if (_properties != null) { 84 return _properties.getKeywords().hasNext(); 85 } else { 86 return false; 87 } 88 } 89 90 100 public TokenizerProperty isKeyword(DataProvider dataProvider) throws NullPointerException { 101 if (_properties != null) { 102 return _properties.getKeyword(dataProvider.toString()); 103 } else { 104 return null; 105 } 106 } 107 108 109 113 117 private TokenizerProperties _properties = null; 118 } 119 | Popular Tags |