@Test public void testGeneratePredicateBase01() { String operatorId = "operator"; List<String> matchingFields = Arrays.asList("fieldOne"); String keywords = "keyword(s)"; String matchingType = KeywordMatchingType.PHRASE_INDEXBASED.toString(); KeywordExtractPredicate keywordExtractPredicate = new KeywordExtractPredicate(matchingFields, keywords, matchingType); PredicateBase computedProjectionBean = keywordExtractPredicate.generateOperatorBean(operatorId); PredicateBase expectedProjectionBean = new KeywordPredicate(keywords, matchingFields, null, KeywordMatchingType.fromName(matchingType), operatorId); expectedProjectionBean.setID(operatorId); Assert.assertEquals(expectedProjectionBean, computedProjectionBean); }
@Override public KeywordPredicate generateOperatorBean(String extractionOperatorId) { KeywordPredicate keywordPredicate = new KeywordPredicate( this.keywords, this.matchingFields, null, KeywordMatchingType.fromName(this.matchingType), extractionOperatorId); keywordPredicate.setID(extractionOperatorId); return keywordPredicate; }
KeywordExtractPredicate implements ExtractPredicate { @Override public KeywordPredicate generateOperatorBean(String extractionOperatorId) { KeywordPredicate keywordPredicate = new KeywordPredicate( this.keywords, this.matchingFields, null, KeywordMatchingType.fromName(this.matchingType), extractionOperatorId); keywordPredicate.setID(extractionOperatorId); return keywordPredicate; } }
KeywordExtractPredicate implements ExtractPredicate { @Override public KeywordPredicate generateOperatorBean(String extractionOperatorId) { KeywordPredicate keywordPredicate = new KeywordPredicate( this.keywords, this.matchingFields, null, KeywordMatchingType.fromName(this.matchingType), extractionOperatorId); keywordPredicate.setID(extractionOperatorId); return keywordPredicate; } KeywordExtractPredicate();  KeywordExtractPredicate(List<String> matchingFields, String keywords, String matchingType); }
KeywordExtractPredicate implements ExtractPredicate { @Override public KeywordPredicate generateOperatorBean(String extractionOperatorId) { KeywordPredicate keywordPredicate = new KeywordPredicate( this.keywords, this.matchingFields, null, KeywordMatchingType.fromName(this.matchingType), extractionOperatorId); keywordPredicate.setID(extractionOperatorId); return keywordPredicate; } KeywordExtractPredicate();  KeywordExtractPredicate(List<String> matchingFields, String keywords, String matchingType); List<String> getMatchingFields(); void setMatchingFields(List<String> matchingFields); String getKeywords(); void setKeywords(String keywords); String getMatchingType(); void setMatchingType(String matchingType); @Override KeywordPredicate generateOperatorBean(String extractionOperatorId); @Override boolean equals(Object other); }
KeywordExtractPredicate implements ExtractPredicate { @Override public KeywordPredicate generateOperatorBean(String extractionOperatorId) { KeywordPredicate keywordPredicate = new KeywordPredicate( this.keywords, this.matchingFields, null, KeywordMatchingType.fromName(this.matchingType), extractionOperatorId); keywordPredicate.setID(extractionOperatorId); return keywordPredicate; } KeywordExtractPredicate();  KeywordExtractPredicate(List<String> matchingFields, String keywords, String matchingType); List<String> getMatchingFields(); void setMatchingFields(List<String> matchingFields); String getKeywords(); void setKeywords(String keywords); String getMatchingType(); void setMatchingType(String matchingType); @Override KeywordPredicate generateOperatorBean(String extractionOperatorId); @Override boolean equals(Object other);  }