Examples of addCategory()


Examples of org.apache.jetspeed.om.registry.PortletEntry.addCategory()

                Iterator fi = feeder.listCategories();
                Category cat = (Category) fi.next();
                assertTrue(cat.getName().equals("news.world.politics"));
                assertTrue(cat.getGroup().equals("news"));
                assertTrue(feeder.hasCategory("news.world.politics", "news"));
                feeder.addCategory("news.us.economy");
                assertTrue(feeder.hasCategory("news.us.economy"));
                feeder.removeCategory("news.us.economy");
                assertTrue(!feeder.hasCategory("news.us.economy"));
                /*
                Iterator fi = feeder.listCategories();
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BasePortletEntry.addCategory()

        // categories
        Iterator categories = pde.getPortletCategorys().iterator();
        while (categories.hasNext())
        {
            PortletCategory pc = (PortletCategory)categories.next();           
            pe.addCategory(pc.getName(), pc.getGroup());
        }
       
        return pe;
    }
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity.addCategory()

      // generate a BusinessEntity
      BusinessEntity businessEntity = new BusinessEntity();
      businessEntity.setBusinessKey(null);
      businessEntity.addName(new Name("Sun Microsystems"));
      businessEntity.addBusinessService(businessService);
      businessEntity.addCategory(new KeyedReference("version","production"));
      businessEntity.addCategory(new KeyedReference(TModel.OPERATORS_TMODEL_KEY,"frequency","hourly"));
      businessEntity.addCategory(new KeyedReference(TModel.GENERAL_KEYWORDS_TMODEL_KEY,"version","production"));
      businessEntity.addCategory(new KeyedReference("","",""));

      // generate a BusinessEntity Vector
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel.addCategory()

      tModelIn.setAuthorizedName("Steve Viens");
      tModelIn.setOperator("Viens.net");
      tModelIn.setName("viens-net:domain");
      tModelIn.setOverviewDoc(overviewDoc);
      tModelIn.addDescription(new Description("Categorize entities by top level domain name.",Language.ENGLISH));
      tModelIn.addCategory(new KeyedReference("uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4","types","categorization"));
      tModelIn.addCategory(new KeyedReference("uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4","types","checked"));

      Vector tModelVector = new Vector();
      tModelVector.add(tModelIn);
View Full Code Here

Examples of org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerModel.addCategory()

    // iterate backwards throught the nodeList so that expansion of the
    // list can occur
    for (int i = nodeList.getLength() - 1; i >= j; i--) {
      Node n = nodeList.item(i);
      map = n.getAttributes();
      CategoryNode chnode = model.addCategory(new CategoryPath(getValue(map, PATH)));
      chnode.setSelected((getValue(map, SELECTED).equalsIgnoreCase("true")) ? true : false);
      if (getValue(map, EXPANDED).equalsIgnoreCase("true")) ;
      tree.expandPath(model.getTreePathToRoot(chnode));
    }
View Full Code Here

Examples of org.apache.lucene.facet.index.CategoryContainer.addCategory()

    for (int docNum = 0; docNum < SimpleUtils.docTexts.length; docNum++) {
      ExampleUtils.log(" ++++ DOC ID: " + docNum);
      // obtain the sample categories for current document
      CategoryContainer categoryContainer = new CategoryContainer();
      for (CategoryPath path : SimpleUtils.categories[docNum]) {
        categoryContainer.addCategory(path);
        ExampleUtils.log("\t ++++ PATH: " + path);
      }
      // and also those with associations
      CategoryPath[] associationsPaths = AssociationUtils.categories[docNum];
      AssociationProperty[] associationProps = AssociationUtils.associations[docNum];
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.TaxonomyWriter.addCategory()

    File outputFile = _TestUtil.createTempFile("test", "tmp", TEMP_DIR);
    TFC.store(outputFile, indexReader, taxoReader, iParams);
   
    // Make the taxonomy grow without touching the index
    for (int i = 0; i < 10; i++) {
      taxoWriter.addCategory(new CategoryPath("foo", Integer.toString(i)));
    }
    taxoWriter.commit();
    TaxonomyReader newTaxoReader = TaxonomyReader.openIfChanged(taxoReader);
    assertNotNull(newTaxoReader);
    taxoReader.close();
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.addCategory()

    File outputFile = _TestUtil.createTempFile("test", "tmp", TEMP_DIR);
    TFC.store(outputFile, indexReader, taxoReader, iParams);
   
    // Make the taxonomy grow without touching the index
    for (int i = 0; i < 10; i++) {
      taxoWriter.addCategory(new CategoryPath("foo", Integer.toString(i)));
    }
    taxoWriter.commit();
    TaxonomyReader newTaxoReader = TaxonomyReader.openIfChanged(taxoReader);
    assertNotNull(newTaxoReader);
    taxoReader.close();
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.lucene.LuceneTaxonomyWriter.addCategory()

    // the reader, but forgot that it did (because it didn't set the reader
    // reference to null).
    tw = new LuceneTaxonomyWriter(indexDir);
    fillTaxonomy(tw);
    // Add one new category, just to make commit() do something:
    tw.addCategory(new CategoryPath("hi"));
    // Do a commit(). Here was a bug - if tw had a reader open, it should
    // be reopened after the commit. However, in our case the reader should
    // not be open (as explained above) but because it was not set to null,
    // we forgot that, tried to reopen it, and got an AlreadyClosedException.
    tw.commit();
View Full Code Here

Examples of org.apache.wink.common.categories.Categories.addCategory()

        for (int i = 0; i < 4; i++) {
            AtomCategory cb = new AtomCategory();
            cb.setLabel("label" + i);
            cb.setScheme("urn:org.apache.wink.scheme" + i);
            cb.setTerm("term" + i);
            cats.addCategory(cb);
        }
        return cats;
    }

    private String readCategoriesDocumentFromFile() throws IOException {
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.