-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
130 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
package ge.kuku.movie.parse.data; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
public interface Parser { | ||
|
||
String parse(String movieName, String imdbId) throws IOException; | ||
List parse(String movieName, String imdbId) throws IOException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
import ge.kuku.movie.parse.core.MovieDo; | ||
import ge.kuku.movie.parse.data.ImoviesEntity; | ||
import ge.kuku.movie.parse.data.Parser; | ||
|
||
import java.util.*; | ||
|
||
public class FakeParser implements Parser { | ||
|
||
Map inMemory = new HashMap<>(); | ||
|
||
@Override | ||
public String parse(String movieName, String imdbId) { | ||
return "asd"; | ||
public List parse(String movieName, String imdbId) { | ||
ImoviesEntity val = (ImoviesEntity) inMemory.get(movieName); | ||
if (val == null){ | ||
return Collections.emptyList(); | ||
} | ||
List l = new ArrayList(); | ||
l.add(val); | ||
return l; | ||
} | ||
|
||
public void addItem(String movieName, ImoviesEntity movieDo) { | ||
inMemory.put(movieName, movieDo); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters