Package org.ryu22e.nico2cal.model

Examples of org.ryu22e.nico2cal.model.NicoliveIndex


            nicolive.setDescription(new Text("テスト説明文" + i));
            nicolive.setOpenTime(datetime.minusWeeks(i).toDate());
            nicolive.setLink(new Link("http://ryu22e.org/" + i));
            nicolives.add(nicolive);

            NicoliveIndex index1 = new NicoliveIndex();
            index1.setKeyword("テスト");
            index1.setNicoliveKey(nicolive.getKey());
            indexes.add(index1);

            NicoliveIndex index2 = new NicoliveIndex();
            index2.setKeyword("説明");
            index2.setNicoliveKey(nicolive.getKey());
            indexes.add(index2);

            NicoliveIndex index3 = new NicoliveIndex();
            index3.setKeyword("文");
            index3.setNicoliveKey(nicolive.getKey());
            indexes.add(index3);

            NicoliveIndex index4 = new NicoliveIndex();
            index4.setKeyword(Integer.toString(i));
            index4.setNicoliveKey(nicolive.getKey());
            indexes.add(index4);
        }
        testDataKeys.addAll(Datastore.put(nicolives));
        testDataKeys.addAll(Datastore.put(indexes));
    }
View Full Code Here


        nicolinve2.setOpenTime(datetime.toDate());
        nicolinve2.setStartTime(datetime.plusMinutes(10).toDate());
        nicolinve2.setLink(new Link("http://ryu22e.org/2"));
        Key key2 = Datastore.put(nicolinve2);
        testDataKeys.add(key2);
        NicoliveIndex nicoliveIndex = new NicoliveIndex();
        nicoliveIndex.setKeyword("テスト");
        nicoliveIndex.setNicoliveKey(key2);
        testDataKeys.add(Datastore.put(nicoliveIndex));

        service.createIndex(nicolinve1);

        // TitleとDescriptionが文節ごとに分解されて、各文節とNicoliveのKeyがエンティティに登録される。
View Full Code Here

        assertThat(service, is(notNullValue()));

        DateTime datetime = new DateTime();
        List<NicoliveIndex> indexes = new LinkedList<NicoliveIndex>();
        for (int i = 0; i < 50; i++) {
            NicoliveIndex index = new NicoliveIndex();
            index.setKeyword("テスト");
            index.setOpenTime(datetime.minusDays(i).toDate());
            indexes.add(index);
        }
        testDataKeys.addAll(Datastore.put(indexes));
        service.deleteOldIndex(datetime.minusDays(31).toDate());
View Full Code Here

        // テストデータを登録する。
        DateTime datetime = new DateTime();
        List<NicoliveIndex> indexes = new LinkedList<NicoliveIndex>();
        for (int i = 0; i < 1500; i++) {
            NicoliveIndex index = new NicoliveIndex();
            index.setKeyword("テスト");
            index.setOpenTime(datetime.minusDays(i).toDate());
            indexes.add(index);
        }
        testDataKeys.addAll(Datastore.put(indexes));

    }
View Full Code Here

            datetime = datetime.minusDays(i);
            nicolinve.setOpenTime(datetime.toDate());
            nicolinve.setLink(new Link("http://ryu22e.org/" + i));
            Key key = Datastore.put(nicolinve);
            testDataKeys.add(key);
            NicoliveIndex nicoliveIndex1 = new NicoliveIndex();
            nicoliveIndex1.setKeyword("テスト");
            nicoliveIndex1.setNicoliveKey(key);
            NicoliveIndex nicoliveIndex2 = new NicoliveIndex();
            nicoliveIndex2.setKeyword("説明");
            nicoliveIndex2.setNicoliveKey(key);
            NicoliveIndex nicoliveIndex3 = new NicoliveIndex();
            nicoliveIndex3.setKeyword("文");
            nicoliveIndex3.setNicoliveKey(key);
            testDataKeys.addAll(Datastore.put(
                nicoliveIndex1,
                nicoliveIndex2,
                nicoliveIndex3));
        }

        Nicolive nicolive = new Nicolive();
        nicolive.setTitle("テスト");
        nicolive.setDescription(new Text("テスト"));
        DateTime datetime = new DateTime(2011, 1, 1, 0, 0, 0, 0);
        nicolive.setOpenTime(datetime.toDate());
        nicolive.setLink(new Link("http://ryu22e.org/"));
        testDataKeys.add(Datastore.put(nicolive));
        NicoliveIndex nicoliveIndex = new NicoliveIndex();
        nicoliveIndex.setKeyword("テスト");
        nicoliveIndex.setNicoliveKey(nicolive.getKey());
        testDataKeys.add(Datastore.put(nicoliveIndex));
    }
View Full Code Here

                        .filter(
                            n.keyword.equal(keyword),
                            n.nicoliveKey.equal(nicolive.getKey()))
                        .count();
            if (count <= 0) {
                NicoliveIndex index = new NicoliveIndex();
                index.setKey(Datastore.allocateId(n));
                index.setKeyword(keyword);
                index.setNicoliveKey(nicolive.getKey());
                index.setOpenTime(nicolive.getOpenTime());
                indexes.add(index);
            }
        }
        return Datastore.put(indexes);
    }
View Full Code Here

TOP

Related Classes of org.ryu22e.nico2cal.model.NicoliveIndex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.