Package org.encuestame.persistence.domain

Examples of org.encuestame.persistence.domain.HashTag


     */
    public List<HashTag> retrieveListOfHashTags(final List<HashTagBean> hashtagBeans) throws EnMeNoResultsFoundException{
        log.debug("TPService retrieveListOfHashTags from frontEnd->"+hashtagBeans.size());
        final List<HashTag> tagList = new ArrayList<HashTag>();
        for (HashTagBean unitHashTag : hashtagBeans) {
            HashTag hashTag = getHashTag(unitHashTag.getHashTagName(), false);
            //if is null, create new hashTag.
            if (hashTag == null && unitHashTag.getHashTagName() != null) {
                log.debug("created new hashTag:{"+unitHashTag.getHashTagName().toLowerCase());
                hashTag = createHashTag(unitHashTag.getHashTagName().toLowerCase());
            }
View Full Code Here


     * @param unitHashTag new tag
     * @return {@link HashTag}
     * @throws EnMeExpcetion exception.
     */
    public HashTag createHashTag(final HashTagBean unitHashTag) {
        final HashTag tag = createHashTag(unitHashTag.getHashTagName());
        getHashTagDao().saveOrUpdate(tag);
        log.debug("Hash Tag Saved.");
        return tag;
    }
View Full Code Here

            final String hashTagName,
            final SearchPeriods period,
            final HttpServletRequest request)
            throws EnMeNoResultsFoundException, EnMeSearchException {
        // Check if the hashtag exists
        final HashTag tag = this.getHashTag(hashTagName, true);
        List tweetPollsByDateRange = new ArrayList();
        List<Poll> pollsByDateRange = new ArrayList<Poll>();
        List<Survey> surveysByDateRange = new ArrayList<Survey>();
        List<ItemStatDetail> itemStatDetailByUsage = new ArrayList<ItemStatDetail>();
        // If the tag exists then obtains the total
        List<HashTagDetailStats> tagDetailStatsByTagName = new ArrayList<HashTagDetailStats>();
            tweetPollsByDateRange = this.getTotalTweetPollUsageByHashTagAndDateRange(tag.getHashTag(),
                            period);
            pollsByDateRange = this.getTotalPollUsageByHashTagAndDateRange(
                    tag.getHashTag(), period);
            surveysByDateRange = this.getTotalSurveyUsageByHashTagAndDateRange(
                    tag.getHashTag(), period);
        itemStatDetailByUsage.addAll(ConvertDomainBean.convertObjectTweetPollListToItemDetailBean(tweetPollsByDateRange));
        itemStatDetailByUsage.addAll(ConvertDomainBean.convertPollListToItemDetailBean(pollsByDateRange));
        itemStatDetailByUsage.addAll(ConvertDomainBean.convertSurveyListToItemDetailBean(surveysByDateRange));
        tagDetailStatsByTagName = this.compareList(itemStatDetailByUsage,
                period, request);
View Full Code Here

    public List<HashTagDetailStats> getTotalHitsUsagebyHashTagAndDateRange(
            final String hashTagName, final SearchPeriods period, final HttpServletRequest request)
            throws EnMeNoResultsFoundException, EnMeSearchException {
        List<Hit> hashTagHits = new ArrayList<Hit>();
        List<HashTagDetailStats> tagDetailStatsByHits = new ArrayList<HashTagDetailStats>();
        final HashTag tag = this.getHashTag(hashTagName, Boolean.TRUE);
        List<ItemStatDetail> itemStatDetailByHits = new ArrayList<ItemStatDetail>();
        if (tag != null) {
            hashTagHits = getFrontEndDao().getHashTagHitsbyDateRange(
                    tag.getHashTagId(), period.toDays());
        }
        itemStatDetailByHits.addAll(ConvertDomainBean
                .convertHitListToItemDetailBean(hashTagHits));
        tagDetailStatsByHits = this.compareList(itemStatDetailByHits, period, request);
        return tagDetailStatsByHits;
View Full Code Here

            final TypeSearchResult filter,
            final HttpServletRequest request,
            final SearchPeriods periods) throws EnMeNoResultsFoundException {
        // Validate if tag belongs to hashtag and filter isn't empty.
        Long totalUsagebyHashTag = 0L;
        final HashTag tag = getHashTag(tagName, true);
        if (tag != null) {
            final List<TweetPoll> tweetsbyTag = this.getTweetPollsByHashTag(
                    tagName, initResults, maxResults, filter, periods);
            final int totatTweetPolls = tweetsbyTag.size();
            final List<Poll> pollsbyTag = this.getPollsByHashTag(tagName,
View Full Code Here

    public HashTagDetailStats getHashTagHitsbyName(
            final String tagName,
            final TypeSearchResult filterBy,
            final HttpServletRequest request,
            final SearchPeriods periods) throws EnMeNoResultsFoundException {
        final HashTag tag = getHashTag(tagName, true);
        final Long hits = this.getTotalHits(tag.getHashTagId(),
                TypeSearchResult.HASHTAG, periods);
        final HashTagDetailStats detailStatItem = this
                .createHashTagDetailButtonStats(HashTagRate.LBL_HITS, hits,
                        HashTagRate.SUB_LBL_TIMES, request);
        return detailStatItem;
View Full Code Here

                            pointStrokeColor : "#fff",
                            data : [65,59,90,81,56,55,40]
                        }
                    ]
         */
        final HashTag tag = this.getHashTag(hashTagName, true);
        List<Object[]> tweetPollsByDateRange = new ArrayList<Object[]>();
        List<Object[]> pollsByDateRange = new ArrayList<Object[]>();
        List<Object[]> surveysByDateRange = new ArrayList<Object[]>();

        List<ItemStatDetail> itemStatDetailByUsage = new ArrayList<ItemStatDetail>();
        // If the tag exists then obtains the total
        List<HashTagDetailStats> tagDetailStatsByTagName = new ArrayList<HashTagDetailStats>();
        tweetPollsByDateRange = this.getTweetPollsRangeStats(tag.getHashTag(),
                period);

        pollsByDateRange = this.getPollsRangeStats(tag.getHashTag(), period);

        surveysByDateRange = this.getSurveysRangeStats(tag.getHashTag(), period);

        itemStatDetailByUsage.addAll(ConvertDomainBean
                .convertObjectListToItemDetailBean(tweetPollsByDateRange));
        itemStatDetailByUsage.addAll(ConvertDomainBean
                .convertObjectListToItemDetailBean(pollsByDateRange));
View Full Code Here

       //TODO: This method should be updated
       //TODO: This method should be updated
       //TODO: This method should be updated
       List<Hit> hashTagHits = new ArrayList<Hit>();
       List<HashTagDetailStats> tagDetailStatsByHits = new ArrayList<HashTagDetailStats>();
       final HashTag tag = this.getHashTag(hashTagName, Boolean.TRUE);
       List<ItemStatDetail> itemStatDetailByHits = new ArrayList<ItemStatDetail>();
       if (tag != null) {
           hashTagHits = getFrontEndDao().getHashTagHitsbyDateRange(
                   tag.getHashTagId(), period.toDays());
       }
       itemStatDetailByHits.addAll(ConvertDomainBean
               .convertHitListToItemDetailBean(hashTagHits));
       tagDetailStatsByHits = this.compareList(itemStatDetailByHits, period, request);
       return tagDetailStatsByHits;
View Full Code Here

                            pointStrokeColor : "#fff",
                            data : [65,59,90,81,56,55,40]
                        }
                    ]
         */
        final HashTag tag = this.getHashTag(hashTagName, true);
        final List<Object[]> tweetPollsByDateRange = new ArrayList<Object[]>();
        final List<Object[]> pollsByDateRange = new ArrayList<Object[]>();
        final List<Object[]> surveysByDateRange = new ArrayList<Object[]>();
        final List<ItemStatDetail> itemStatDetailByUsage = new ArrayList<ItemStatDetail>();
        // If the tag exists then obtains the total
        final List<HashTagListGraphData> tagDetailStatsByTagName = new ArrayList<HashTagListGraphData>();

        // from database
        tweetPollsByDateRange.addAll(this.getTweetPollsRangeStats(tag.getHashTag(),
                period));
        pollsByDateRange.addAll(this.getPollsRangeStats(tag.getHashTag(), period));
        surveysByDateRange.addAll(this.getSurveysRangeStats(tag.getHashTag(), period));

        // object conversion
        itemStatDetailByUsage.addAll(ConvertDomainBean
                .convertObjectListToItemDetailBean(tweetPollsByDateRange));
        itemStatDetailByUsage.addAll(ConvertDomainBean
View Full Code Here

    public List<HashTagListGraphData> getTotalHitsUsagebyHashTagAndDateRangeListGraph(
            String hashTagName, SearchPeriods period, HttpServletRequest request)
            throws EnMeNoResultsFoundException, EnMeSearchException {
        List<Hit> hashTagHits = new ArrayList<Hit>();
        List<HashTagListGraphData> tagDetailStatsByHits = new ArrayList<HashTagListGraphData>();
        final HashTag tag = this.getHashTag(hashTagName, Boolean.TRUE);
        List<ItemStatDetail> itemStatDetailByHits = new ArrayList<ItemStatDetail>();
        if (tag != null) {
            hashTagHits = getFrontEndDao().getHashTagHitsbyDateRange(
                    tag.getHashTagId(), period.toDays());
        }
        itemStatDetailByHits.addAll(ConvertDomainBean.convertHitListToItemDetailBean(hashTagHits));
        tagDetailStatsByHits = this.groupListItemStatDetail(itemStatDetailByHits, period, request);
        return tagDetailStatsByHits;
    }
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.HashTag

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.