From aa227a2020a46308a26c858eb978c0aeb074443b Mon Sep 17 00:00:00 2001 From: Mark Struchkov Date: Mon, 21 Jan 2019 00:40:02 +0300 Subject: [PATCH] Release-1.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Теперь автоответчик возвращает не строку, а абстрактный объект. --- pom.xml | 2 +- .../org/sadtech/autoresponder/entity/Unit.java | 2 +- .../autoresponder/repository/PersonRepository.java | 1 - .../autoresponder/submodule/parser/Parser.java | 14 ++++++++------ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 2406501..46e6368 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.sadtech.autoresponder core - 1.1-SNAPSHOT + 1.1.0-RELEASE diff --git a/src/main/java/org/sadtech/autoresponder/entity/Unit.java b/src/main/java/org/sadtech/autoresponder/entity/Unit.java index eeccefc..f56602b 100644 --- a/src/main/java/org/sadtech/autoresponder/entity/Unit.java +++ b/src/main/java/org/sadtech/autoresponder/entity/Unit.java @@ -13,7 +13,7 @@ public abstract class Unit { private List nextUnits; public Unit() { - level=false; + level = false; } public Unit(Set keyWords, Integer matchThreshold, Integer priority, Boolean level, List nextUnits) { diff --git a/src/main/java/org/sadtech/autoresponder/repository/PersonRepository.java b/src/main/java/org/sadtech/autoresponder/repository/PersonRepository.java index c75b018..35312f5 100644 --- a/src/main/java/org/sadtech/autoresponder/repository/PersonRepository.java +++ b/src/main/java/org/sadtech/autoresponder/repository/PersonRepository.java @@ -2,7 +2,6 @@ package org.sadtech.autoresponder.repository; import org.sadtech.autoresponder.entity.Person; -import java.util.Collection; import java.util.Map; public interface PersonRepository { diff --git a/src/main/java/org/sadtech/autoresponder/submodule/parser/Parser.java b/src/main/java/org/sadtech/autoresponder/submodule/parser/Parser.java index d0bb508..5db9916 100644 --- a/src/main/java/org/sadtech/autoresponder/submodule/parser/Parser.java +++ b/src/main/java/org/sadtech/autoresponder/submodule/parser/Parser.java @@ -1,8 +1,5 @@ package org.sadtech.autoresponder.submodule.parser; -import lombok.Getter; -import lombok.Setter; - import java.util.HashSet; import java.util.Set; import java.util.regex.Matcher; @@ -10,12 +7,17 @@ import java.util.regex.Pattern; public class Parser { - @Getter private Set words = new HashSet<>(); - - @Setter private String text; + public Set getWords() { + return words; + } + + public void setText(String text) { + this.text = text; + } + public void parse() { Pattern p = Pattern.compile("[а-яА-Я0-9]+"); Matcher m = p.matcher(text);