Package com.tubeonfire.model

Examples of com.tubeonfire.model.TagModel


        tagPool = (TreeMap<String, String>) cache.get(cachePrefix);
        for (String tag : tagPool.keySet()) {
          keys.add(tag);
        }
      } else {
        TagModel tagModel = new TagModel();
        keys = tagModel.getTagPool();
      }
      if (keys.size() > 0) {
        Collections.shuffle(keys);
        for (String key : keys) {
          if (key.length() > 3) {
View Full Code Here


        response.sendRedirect("/home");
      }

      keyword = URLDecoder.decode(keyword, "UTF8");
      System.out.println("Keyword to search : " + keyword);
      TagModel tagModel = new TagModel();
      Tag tag = tagModel.getByAlias(keyword);
      if (tag != null) {       
        List<Tube> result = new ArrayList<Tube>();
        int startPoint = (page - 1) * itemPerPage;
        if (tag.getListTubeId().size() > startPoint) {
          for (int i = startPoint; i < tag.getListTubeId().size(); i++) {
View Full Code Here

      List<Text> listKey = new ArrayList<Text>();
      for (String keyword : videoEntry.getMediaGroup().getKeywords()
          .getKeywords()) {
        Tag tmpTag = null;
        listKey.add(new Text(keyword));
        TagModel tagModel = new TagModel();
        String tagAlias = keyword;
        tmpTag = tagModel.getByAlias(tagAlias);
        List<Text> listTubeId = new ArrayList<Text>();
        if (tmpTag != null) {
          tmpTag.setCount(tmpTag.getCount() + 1);
          listTubeId.addAll(tmpTag.getListTubeId());
          listTubeId.add(new Text(this.tubeId));
          tmpTag.setListTubeId(listTubeId);
          tagModel.update(tmpTag);
          tagModel.closePM();
        } else {
          tmpTag = new Tag();
          listTubeId.add(new Text(this.tubeId));
          tmpTag.setListTubeId(listTubeId);
          tmpTag.setAlias(tagAlias);
          tmpTag.setCount(1);
          tmpTag.setTitle(new Text(tagAlias));
          tmpTag.setType("N");
          tagModel.add(tmpTag);
        }
      }
      this.keywords = listKey;
      JavaCacheHandle.addKeywords(listKey);
    }
View Full Code Here

TOP

Related Classes of com.tubeonfire.model.TagModel

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.