public static EnumDefinition dropKeywordCreateEnum( EnumDefinition enumDefinition, Keyword keyword, boolean saveEnum) { if (enumDefinition == null) { enumDefinition = new EnumDefinition(keyword.toString(), saveEnum); } enumDefinition.setKeyword(keyword); return enumDefinition; }
public static Vector extractKeywordFromText(String text) { // see if there are any existing keywords represented // in this text // Get all keywords Vector extractedKeywords = new Vector(); Iterator keywords = allKeywords.iterator(); while (keywords.hasNext()) { Keyword keyword = (Keyword) keywords.next(); if (text != null && keyword.toString() != null && text.toLowerCase().indexOf(keyword.toString().toLowerCase()) > -1) { extractedKeywords.addElement(keyword); } } return extractedKeywords; }
public static EnumDefinition dropKeywordCreateEnum(Keyword keyword, boolean saveEnum) { EnumDefinition enumDefinition = new EnumDefinition(keyword.toString(), saveEnum); enumDefinition.setKeyword(keyword); return enumDefinition; }