Examples of Item


Examples of org.emftrace.metamodel.EMFfitModel.Item

   */
  @Override
  public boolean performFinish() {

    String newName = newModelElementWizardPage.getName();
    Item newItem;
   
    //note: Hypertext elements must not be null
    //new element will be added to project by command
    switch (newModelElementWizardPage.getSelectionIndex()) {
    case 0:
View Full Code Here

Examples of org.errai.samples.serialization.client.model.Item

    }

    public void callback(Message message) {

        List<Record> records = new ArrayList<Record>();
        records.add(new Record(1, "Mike", -40.23f, getDate(2004, 5, 2), RecordType.Savings, new Item[]{new Item(2, "iPhone3G"),
                new Item(2, null)}, new String[][] { {"FavoriteColor", "Blue"}, {"Place", "Toronto"} }));
        records.add(new Record(2, "Lillian", 30.10f, getDate(2005, 1, 10), RecordType.Savings, new Item[]{new Item(1, "iPhone3G"),
                new Item(1, "MacBookPro15")}, new String[][] { { "FavoriteColor", "Green" }, {"Place", "Toronto"}}));
        records.add(new Record(3, "Heiko", 50.50f, getDate(2006, 5, 20), RecordType.Checking, new Item[]{new Item(1, "iPhone3Gs"),
                new Item(2, "MacBookPro13")}, new String[][] { {  "FavoriteColor", "Orange" }, {"Place", "Germany" }}));


        if (message.hasPart("Recs")) {
            List<Record> recs = message.get(List.class, "Recs");
View Full Code Here

Examples of org.errai.samples.serialization.client.shared.Item

    List<Record> records = new ArrayList<Record>();

    Date date = getDate(2004, 5, 2);

    records.add(new Record(1, "Mike", -40.23f, date, RecordType.Savings, new Item[]{new Item(2, "iPhone3G"),
            new Item(2, null)}, new String[][]{{"FavoriteColor", "Blue"}, {"Place", "Toronto"}}));
    records.add(new Record(2, "Lillian", 30.10f, date, RecordType.Savings, new Item[]{new Item(1, "iPhone3G"),
            new Item(1, "MacBookPro15")}, new String[][]{{"FavoriteColor", "Green"}, {"Place", "Toronto"}}));
    records.add(new Record(3, "Heiko", 50.50f, date, RecordType.Checking, new Item[]{new Item(1, "iPhone3Gs"),
            new Item(2, "MacBookPro13")}, new String[][]{{"FavoriteColor", "Orange"}, {"Place", "Germany"}}));


    if (message.hasPart("Recs")) {
      List<Record> recs = message.get(List.class, "Recs");
View Full Code Here

Examples of org.example.app2.entities.Item

    private Item item;

    @CommitAfter
    void onCreateEntity()
    {
        final Item item = new Item();
        item.setName("name");

        entityManager.persist(item);

        this.item = item;
    }
View Full Code Here

Examples of org.exist.xquery.value.Item

       
        // Iterate through each item in the right-hand sequence
        for( final SequenceIterator itRightSeq = rightSeq.iterate(); itRightSeq.hasNext(); ) {

            //Get the index key
            Item key = itRightSeq.nextItem().atomize();

            //if key has truncation, convert it to string
            if( truncation != Constants.TRUNC_NONE ) {

                if( !Type.subTypeOf( key.getType(), Type.STRING ) ) {
                    LOG.info( "Truncated key. Converted from " + Type.getTypeName( key.getType() ) + " to xs:string" );

                    //truncation is only possible on strings
                    key = key.convertTo( Type.STRING );
                }
            }
            //else if key is not the same type as the index
            //TODO : use Type.isSubType() ??? -pb
            else if( key.getType() != indexType ) {

                //try to convert the key to the index type
                try {
                    key = key.convertTo( indexType );
                }
                catch( final XPathException xpe ) {

                    if( LOG.isTraceEnabled() ) {
                        LOG.trace( "Cannot convert key: " + Type.getTypeName( key.getType() ) + " to required index type: " + Type.getTypeName( indexType ) );
                    }

                    throw( new XPathException( this, "Cannot convert key to required index type" ) );
                }
            }

            // If key implements org.exist.storage.Indexable, we can use the index
            if( key instanceof Indexable ) {

                if( LOG.isTraceEnabled() ) {
                    LOG.trace( "Using QName range index for key: " + key.getStringValue() );
                }

                NodeSet  temp;
                final NodeSet  contextSet = useContext ? contextSequence.toNodeSet() : null;
                final Collator collator   = ( ( collationArg != null ) ? getCollator( contextSequence ) : null );

                if( truncation == Constants.TRUNC_NONE ) {
                    temp         = context.getBroker().getValueIndex().find(context.getWatchDog(), relation, contextSequence.getDocumentSet(), contextSet, NodeSet.DESCENDANT, contextQName, ( Indexable )key, collator );
                    hasUsedIndex = true;
                } else {

                    try {
                        final String matchString = key.getStringValue();
                        final int    matchType   = getMatchType( truncation );

                        temp         = context.getBroker().getValueIndex().match(context.getWatchDog(), contextSequence.getDocumentSet(), contextSet, NodeSet.DESCENDANT, matchString, contextQName, matchType, collator, truncation );

                        hasUsedIndex = true;
View Full Code Here

Examples of org.geomajas.widget.searchandfilter.service.FileDownloadService.Item

  private FileDownloadService service;

  @RequestMapping(value = "/csvDownload", method = RequestMethod.GET)
  public void handleCsvDownload(@RequestParam("id") String id, HttpServletResponse response) throws IOException {
    try {
      Item item = service.getFile(id);
      File f = item.getFile();
      if (f == null || !f.canRead()) {
        response.sendError(404, "Geen document gevonden met id: " + id);
      } else {
        // Set response headers
        response.setContentType("text/csv");
        response.setContentLength((int) f.length());
        String filename = (item.getDescription());
        response.setHeader("Content-Disposition", "attachment; filename=" + filename);

        FileInputStream fis = new FileInputStream(f);
        FileChannel in = fis.getChannel();
        WritableByteChannel out = Channels.newChannel(response.getOutputStream());
View Full Code Here

Examples of org.glassfish.jersey.examples.extendedwadl.Item

        _repository = new HashMap<Integer, Item>();
    }

    @Path("{id}")
    public ItemResource getItem(@PathParam("id") final Integer id) {
        final Item item = _repository.get(id);
        if (item == null) {
            throw new NotFoundException(Response.status(Response.Status.NOT_FOUND).entity("Item with id " + id + " does not " +
                    "exist!").build());
        }
View Full Code Here

Examples of org.goobi.api.display.Item

        for (int j = 0; j <= type; j++) {
          String myElementName = config.getString("ruleSet.context(" + i + ").select1(" + j + ")[@tns:ref]");
          if (myElementName.equals(elementName)) {
            int item = config.getMaxIndex("ruleSet.context(" + i + ").select1(" + j + ").item");
            for (int k = 0; k <= item; k++) {
              Item myItem = new Item(config.getString("ruleSet.context(" + i + ").select1(" + j + ").item(" + k + ").label"), // the
                                                                      // displayed
                                                                      // value
                  config.getString("ruleSet.context(" + i + ").select1(" + j + ").item(" + k + ").value"), // the
                                                                // internal
                                                                // value,
View Full Code Here

Examples of org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Item

  })
  public void testOneViolationForCascadedValidation() throws Exception {
    String methodName = "setItem";

    Object object = new OrderLine( null );
    Item leaf = new Item( "foo" );
    Method method = OrderLine.class.getMethod( methodName, Item.class );
    Object[] parameterValues = new Object[] { leaf };

    Set<ConstraintViolation<Object>> violations = executableValidator.validateParameters(
        object,
View Full Code Here

Examples of org.hibernate.ejb.test.Item

    cat.setAge( 3 );
    cat.setDateOfBirth( new Date() );
    cat.setLength( 22 );
    cat.setName( "Kitty" );
    em.persist( cat );
    Item item = new Item();
    item.setName( "Train Ticket" );
    item.setDescr( "Paris-London" );
    em.persist( item );
    //em.getTransaction().commit();
    //em.getTransaction().begin();
    item.setDescr( "Paris-Bruxelles" );
    //em.getTransaction().commit();

    //fake the in container work
    ( (HibernateEntityManager) em ).getSession().disconnect();
    stream = new ByteArrayOutputStream();
    out = new ObjectOutputStream( stream );
    out.writeObject( em );
    out.close();
    serialized = stream.toByteArray();
    stream.close();
    byteIn = new ByteArrayInputStream( serialized );
    in = new ObjectInputStream( byteIn );
    em = (EntityManager) in.readObject();
    in.close();
    byteIn.close();
    //fake the in container work
    em.getTransaction().begin();
    item = em.find( Item.class, item.getName() );
    item.setDescr( item.getDescr() + "-Amsterdam" );
    cat = (Cat) em.createQuery( "select c from " + Cat.class.getName() + " c" ).getSingleResult();
    cat.setLength( 34 );
    em.flush();
    em.remove( item );
    em.remove( cat );
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.