Examples of Item


Examples of org.apache.jetspeed.xml.api.jcm.Item

        String title = params.getString( "title", "" );
        String link  = params.getString( "link", "" );
        String description  = params.getString( "description", "" );
       
        //create the JCM item
        Item item = new Item();
        item.setTopic( topic );
        item.setTitle( title );
        item.setLink( link );
        item.setDescription( description );
       

        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();
View Full Code Here

Examples of org.apache.lenya.ac.Item

     * @param accreditable The accreditable of the credential to wrap.
     * @param role The role of the credential to wrap.
     */
    public CredentialWrapper(Accreditable accreditable, Role role) {
        if (accreditable instanceof Item) {
            Item item = (Item) accreditable;
            accreditableId = item.getId();
            accreditableName = item.getName();
       
            if (item instanceof User) {
                type = USER;
            }
            else if (item instanceof Group) {
View Full Code Here

Examples of org.apache.mahout.cf.taste.model.Item

    User theUser = getDataModel().getUser(userID);
    List<RecommendedItem> rescored = new ArrayList<RecommendedItem>(recommended.size());
    // Only add items the user doesn't already have a preference for.
    // And that the rescorer doesn't "reject".
    for (RecommendedItem recommendedItem : recommended) {
      Item item = recommendedItem.getItem();
      if (rescorer != null && rescorer.isFiltered(item)) {
        continue;
      }
      if (theUser.getPreferenceFor(item.getID()) == null &&
          (rescorer == null || !Double.isNaN(rescorer.rescore(item, recommendedItem.getValue())))) {
        rescored.add(recommendedItem);
      }
    }
    Collections.sort(rescored, new ByRescoreComparator(rescorer));
View Full Code Here

Examples of org.apache.manifoldcf.crawler.connectors.generic.api.Item

    HttpClient client = getClient();
    for (int i = 0; i < documentIdentifiers.length; i++) {
      activities.checkJobStillActive();

      Item item = documentCache.get(documentIdentifiers[i]);
      if (item == null) {
        throw new ManifoldCFException("processDocuments error - no cache entry for: " + documentIdentifiers[i]);
      }

      if (item.related != null) {
View Full Code Here

Examples of org.apache.openjpa.persistence.criteria.results.Item

    public void populate() throws ParseException {
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        Shop s = new Shop();
        Order order;
        Item item;
        Producer p;

        s.setId(1);
        s.setName("eBay.com");
        s.setOrders(new HashSet<Order>());

        for (int i = 1; i <= N_ORDERS; i++) {
            order = new Order();
            order.setId(i);
            order.setDate(df.parse(ORDER_DATES[i % ORDER_DATES.length]));
            order.setFilled(i % 2 == 0 ? true : false);
            order.setShop(s);
            order.setItems(new HashSet<Item>());
            s.getOrders().add(order);
            for (int j = 1; j <= N_ITEMS_PER_ORDER; j++) {
                item = new Item();
                item.setOrder(order);
                order.getItems().add(item);
                p = new Producer();
                p.setName("filler");
                p.setItem(item);
                item.setProduct(p);
            }
        }
        em.persist(s);
        Person person = new Person("Test Result Shape");
        em.persist(person);
View Full Code Here

Examples of org.apache.pivot.wtk.Menu.Item

                    int sectionLength = section.getLength();
                    itemIndex = sectionLength - 1;
                }

                while (itemIndex >= 0) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex--;
                }

                if (itemIndex >= 0) {
                    break;
                }

                sectionIndex--;
            }

            consumed = true;
        } else if (keyCode == Keyboard.KeyCode.DOWN) {
            Menu.SectionSequence sections = menu.getSections();
            int sectionCount = sections.getLength();

            Menu.Item activeItem = menu.getActiveItem();
            int sectionIndex;
            int itemIndex;
            if (activeItem == null) {
                sectionIndex = 0;
                itemIndex = 0;
            } else {
                Menu.Section section = activeItem.getSection();
                sectionIndex = sections.indexOf(section);
                itemIndex = section.indexOf(activeItem) + 1;
            }

            while (sectionIndex < sectionCount) {
                Section section = sections.get(sectionIndex);
                int sectionLength = section.getLength();

                while (itemIndex < sectionLength) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex++;
                }
View Full Code Here

Examples of org.apache.tuscany.sca.data.collection.Item

     * @param content Contents of the feed entry
     * @param link Link for the feed entry
     * @return A new feed entry.
     */
    private Entry<Object, Object> createFeedEntry(String title, String content, String link) {
        final Item item = new Item(title, content, link, null, new Date());
        final Entry<Object, Object> entry = new Entry<Object, Object>(nextFeedID(), item);
        return entry;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.data.collection.Item

        // The key is the contribution URI
        String key = path.startsWith("/")? path.substring(1) : path;
        logger.info("get " + key);
       
        // Get the item describing the composite
        Item item;
        try {
            item = get(key);
        } catch (NotFoundException e) {
            response.sendError(HttpServletResponse.SC_NOT_FOUND, key);
            return;
        }

        // Redirect to the actual contribution location
        response.sendRedirect("/files/" + item.getAlternate());
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.Item

        changeNick(OCCUPANT1_JID, new EntityImpl(ROOM1_JID, "new nick"));
       
        Occupant occupant = room.findOccupantByJID(OCCUPANT1_JID);
        assertEquals("new nick", occupant.getName());

        Item unavailbleItem = new Item(OCCUPANT1_JID, "new nick", Affiliation.None, Role.Participant);
        assertPresenceStanza(occupant1Queue.getNext(), new EntityImpl(ROOM1_JID, "nick"), OCCUPANT1_JID, "unavailable",
                Arrays.asList(unavailbleItem), Arrays.asList(StatusCode.NEW_NICK, StatusCode.OWN_PRESENCE));
        assertPresenceStanza(occupant2Queue.getNext(), new EntityImpl(ROOM1_JID, "nick"), OCCUPANT2_JID, "unavailable",
                Arrays.asList(unavailbleItem), Arrays.asList(StatusCode.NEW_NICK));

        Item availbleItem = new Item(OCCUPANT1_JID, null, Affiliation.None, Role.Participant);
        assertPresenceStanza(occupant1Queue.getNext(), new EntityImpl(ROOM1_JID, "new nick"), OCCUPANT1_JID, null,
                Arrays.asList(availbleItem), Arrays.asList(StatusCode.OWN_PRESENCE));
        assertPresenceStanza(occupant2Queue.getNext(), new EntityImpl(ROOM1_JID, "new nick"), OCCUPANT2_JID, null,
                Arrays.asList(availbleItem), null);
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.servicediscovery.management.Item

    public List<Item> getItemsFor(InfoRequest request) {
        List<Item> items = new ArrayList<Item>();
        Collection<Room> rooms = getAllRooms();
       
        for(Room room : rooms) {
            items.add(new Item(room.getJID(), room.getName()));
        }
       
        return items;
    }
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.