"name3", "lastName", "user3@udc.es", "user3"));
userService.registerUser("userPassword", new UserDetails("name4",
"lastName", "user4@udc.es", "user4"));
// Query
journal1 = journalService.createJournal(new Journal(
"siam journal on applied mathematics", "j1", "", 0, 0));
keywordService.createListOfKeywords(
new String[] { "mathematical model", "computer science",
"integral equation" }, user1.getUserId(),
journal1.getJournalId(), 1);
// Journal 2 (without keywords)
journal2 = journalService.createJournal(new Journal(
"european journal of information systems", "j2", "", 0, 0));
// Journal 3 (without commun keywords)
journal3 = journalService
.createJournal(new Journal(
"international journal of information quality", "j3",
"", 0, 0));
keywordService.createListOfKeywords(new String[] { "case study",
"numerical solution" }, user1.getUserId(),
journal3.getJournalId(), 1);
// Journal 4
journal4 = journalService.createJournal(new Journal(
"computer music journal", "j4", "", 0, 0));
keywordService.createListOfKeywords(new String[] { "computer science",
"mathematical model", "numerical solution",
"machine learning & pattern recognition" }, user3.getUserId(),
journal4.getJournalId(), 1);
keywordService.createListOfKeywords(new String[] { "computer science",
"mathematical model", "system development",
"distributed system" }, user2.getUserId(),
journal4.getJournalId(), 1);
// ****************** Reviews ******************
reviewService.createReviewType("global");
List<ReviewRatingDto> rrDtos = new ArrayList<ReviewRatingDto>();
rrDtos.add(new ReviewRatingDto("global", 5));
// User 1
reviewService.createReview("", user1.getUserId(),
journal1.getJournalId(), rrDtos);
reviewService.createReview("", user1.getUserId(),
journal3.getJournalId(), rrDtos);
// User 2
reviewService.createReview("", user2.getUserId(),
journal1.getJournalId(), rrDtos);
reviewService.createReview("", user2.getUserId(),
journal3.getJournalId(), rrDtos);
reviewService.createReview("", user2.getUserId(),
journal4.getJournalId(), rrDtos);
// User 3
// TODO: User3 da 2 punto a la revista 1, que tiene 5 puntos de User1,
// pero obtienen similitud 1 igual ¿?¿
rrDtos.clear();
rrDtos.add(new ReviewRatingDto("global", 2));
reviewService.createReview("", user3.getUserId(),
journal1.getJournalId(), rrDtos);
reviewService.createReview("", user3.getUserId(),
journal3.getJournalId(), rrDtos);
// Revista null
Journal jnull = new Journal("", null, null, null, null);
journalService.createJournal(jnull);
keywordService.createKeywordWeightJournal(new KeywordWeightJournal(
new KeywordWeight(1, user1, new Keyword("aditional keyword")),
jnull));
}