Examples of Category


Examples of slash.navigation.catalog.domain.Category

            public void run() throws IOException {
                final List<CategoryTreeNode> categories = new ArrayList<CategoryTreeNode>();
                for (int i = 0; i < parents.size(); i++) {
                    CategoryTreeNode parent = parents.get(i);
                    Category category = parent.getCategory().create(names.get(i));
                    categories.add(new CategoryTreeNodeImpl(category));
                }

                invokeLater(new Runnable() {
                    public void run() {
View Full Code Here

Examples of stripbandunk.tutorial.jtreehibernate.entity.Category

    @Override
    public Category save(String name) {
        session.beginTransaction();

        Category category = new Category();
        category.setName(name);
        session.save(category);

        session.getTransaction().commit();

        return category;
View Full Code Here

Examples of stripbandunk.tutorial.treetabledemo.entity.Category

        session.beginTransaction();

        Random random = new Random();

        for (int i = 0; i < 10; i++) {
            Category category = new Category("Category " + i);
            session.save(category);
            for (int j = 0; j < 100; j++) {
                Product product = new Product("product" + i + "" + j, "Product " + j + " in Category " + i, random.nextLong(), category);
                session.save(product);
            }
View Full Code Here

Examples of twitter4j.Category

            }
            ResponseList<Category> categories =
                    new ResponseListImpl<Category>(array.length(), res);
            for (int i = 0; i < array.length(); i++) {
                JSONObject json = array.getJSONObject(i);
                Category category = new CategoryJSONImpl(json);
                categories.add(category);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(category, json);
                }
            }
View Full Code Here

Examples of uk.ac.cam.ha293.tweetlabel.types.Category

        //iterate until we hit the end of the category list
        while(!rawLIWC.get(i).equals("%")) {
          String[] splitCategory = rawLIWC.get(i).split("\\s+"); //split on all whitespace
          int currentID = Integer.parseInt(splitCategory[0]);
          String currentTitle = splitCategory[1];
          Category currentCategory = new Category(currentTitle)
          currentCategory.setLIWCID(currentID);
         
          int j = 66; //Start of word list
          //iterate until we hit end of word list
          while(j < rawLIWC.size()) {
            String[] splitWord = rawLIWC.get(j).split("\\s+");
            for(int k=1; k<splitWord.length; k++) {
              if(Integer.parseInt(splitWord[k]) == currentID) {
                currentCategory.addWord(splitWord[0]);
               
                //NOTE: now, we've added the word to the category
                //but here we can also try to create a new word object
                //and add this category to the word to avoid having to
                //iterate over it all again
                if(words.containsKey(splitWord[0])) {
                  words.get(splitWord[0]).addCategory(currentCategory);
                } else {
                  LIWCWord newWord = new LIWCWord(splitWord[0]);
                  newWord.addCategory(currentCategory);
                  words.put(splitWord[0], newWord);
                }             
                break;
              }
            }
            j++;
          }
         
          categories.add(currentCategory);
          stringCategoryLookup.put(currentCategory.getTitle(), currentCategory);
          i++;
        }
           
      } catch (IOException e) {
        System.err.println("Couldn't read from LIWC Dictionary file at "+path);
View Full Code Here

Examples of uk.ac.osswatch.simal.model.jena.Category

    Property o = Doap.CATEGORY;
    com.hp.hpl.jena.rdf.model.Resource r = model.createResource(uri);
    Statement s = model.createStatement(r, RDF.type, o);
    model.add(s);

    IDoapCategory cat = new Category(r);
    cat.setSimalID(getNewID());
    return cat;
  }
View Full Code Here

Examples of zendeskapi.models.categories.Category

  }

  @Test
  public void testGetForumsByCategory() throws Exception {
    Categories categories = API.getCategories();
    Category category = new Category();
    category.setDescription("Test category description 99");
    category.setName("Test category name 99");
    IndividualCategoryResponse individualCategoryResponse = categories.createCategory(category);
    Category responseCategory = individualCategoryResponse.getCategory();
   
    Forum forum = new Forum();
    forum.setName("Test forum 1");
    forum.setCategoryId(responseCategory.getId());
    IndividualForumResponse individualForumResponse = API.getForums().createForum(forum);
   
    forumIds.add(individualForumResponse.getForum().getId());
   
    GroupForumResponse groupForumResponse = API.getForums().getForumsByCategory(responseCategory.getId());
    List<Forum> forums = groupForumResponse.getForums();
    for (Forum f : forums) {
      Assert.assertEquals(f.getCategoryId(), responseCategory.getId());
    }
    Assert.assertTrue(API.getCategories().deleteCategory(responseCategory.getId()));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.