Skip to content

Commit 9aa80bc

Browse files
committed
Refactorings
1 parent f0408a3 commit 9aa80bc

File tree

8 files changed

+9
-567
lines changed

8 files changed

+9
-567
lines changed

src/it/scala/de/upb/cs/swt/delphi/webapi/ElasticActorTest.scala

Lines changed: 0 additions & 111 deletions
This file was deleted.

src/it/scala/de/upb/cs/swt/delphi/webapi/FeatureExtractorCheck.scala renamed to src/it/scala/de/upb/cs/swt/delphi/webapi/FeatureQueryCheck.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616

1717
package de.upb.cs.swt.delphi.webapi
1818

19-
import de.upb.cs.swt.delphi.webapi.featuredefinitions.FeatureExtractor
2019
import org.scalatest.{FlatSpec, Matchers}
2120

22-
class FeatureExtractorCheck extends FlatSpec with Matchers {
21+
class FeatureQueryCheck extends FlatSpec with Matchers {
2322
"FeatureExtractor" should "provide a list of features" in {
2423
val configuration = new Configuration()
25-
val featureList = new FeatureExtractor(configuration).featureList
24+
val featureList = new FeatureQuery(configuration).featureList
2625

2726
featureList.size should be > 0
2827
}

src/it/scala/de/upb/cs/swt/delphi/webapi/SearchQueryTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package de.upb.cs.swt.delphi.webapi
1818

19-
import de.upb.cs.swt.delphi.webapi.featuredefinitions.FeatureExtractor
2019
import de.upb.cs.swt.delphi.webapi.search.{QueryRequest, SearchQuery}
2120
import org.scalatest.{FlatSpec, Matchers}
2221

@@ -25,7 +24,7 @@ import scala.util.Success
2524
class SearchQueryTest extends FlatSpec with Matchers {
2625
"Search query" should "check for fields" in {
2726
val configuration = new Configuration()
28-
val q = new SearchQuery(configuration, new FeatureExtractor(configuration))
27+
val q = new SearchQuery(configuration, new FeatureQuery(configuration))
2928

3029
val response = q.search(QueryRequest("[if_icmpeq (opcode:159)]>1"))
3130
response shouldBe a [Success[_]]
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
package de.upb.cs.swt.delphi.webapi.featuredefinitions
17+
package de.upb.cs.swt.delphi.webapi
1818

19-
import com.sksamuel.elastic4s.http.{ElasticClient, RequestSuccess}
2019
import com.sksamuel.elastic4s.http.ElasticDsl._
21-
import com.sksamuel.elastic4s.http.index.mappings.IndexMappings
22-
import de.upb.cs.swt.delphi.webapi.Configuration
20+
import com.sksamuel.elastic4s.http.{ElasticClient, RequestSuccess}
2321
import org.slf4j.LoggerFactory
2422
import spray.json._
2523

26-
class FeatureExtractor(configuration: Configuration) {
24+
class FeatureQuery(configuration: Configuration) {
2725
private val log = LoggerFactory.getLogger(this.getClass)
2826

2927
lazy val featureList: Iterable[String] = {

src/main/scala/de/upb/cs/swt/delphi/webapi/Server.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import akka.util.Timeout
2626
import de.upb.cs.swt.delphi.instancemanagement.InstanceRegistry
2727
import de.upb.cs.swt.delphi.webapi.artifacts.ArtifactJson._
2828
import de.upb.cs.swt.delphi.webapi.search.QueryRequestJson._
29-
import de.upb.cs.swt.delphi.webapi.featuredefinitions.FeatureExtractor
3029
import de.upb.cs.swt.delphi.webapi.search.{QueryRequest, SearchQuery}
3130
import spray.json._
3231

@@ -67,7 +66,7 @@ object Server extends HttpApp with JsonSupport with AppLogging {
6766
}
6867
}
6968

70-
private val featureExtractor = new FeatureExtractor(configuration)
69+
private val featureExtractor = new FeatureQuery(configuration)
7170

7271
private def features = {
7372
get {

src/main/scala/de/upb/cs/swt/delphi/webapi/featuredefinitions/FeatureDescription.scala

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)