Examples of Tag


Examples of com.dyuproject.protostuff.Tag

                    // preserve its field number for backward-forward compat
                    i++;
                    continue;
                }
               
                final Tag tag = f.getAnnotation(Tag.class);
                final int fieldMapping;
                final String name;
                if(tag == null)
                {
                    // Fields gets assigned mapping tags according to their definition order
                    if(annotated)
                    {
                        throw new RuntimeException("When using annotation-based mapping, " +
                                "all fields must be annotated with @" + Tag.class.getSimpleName());
                    }
                    fieldMapping = ++i;
                   
                    name = f.getName();
                }
                else
                {
                    // Fields gets assigned mapping tags according to their annotation
                    if(!annotated && !fields.isEmpty())
                    {
                        throw new RuntimeException("When using annotation-based mapping, " +
                                "all fields must be annotated with @" + Tag.class.getSimpleName());
                    }
                    annotated = true;
                    fieldMapping = tag.value();
                   
                    if(fieldMapping < 1)
                    {
                        throw new RuntimeException("Invalid field number: " +
                                fieldMapping + " on " + typeClass);
                    }
                   
                    name = tag.alias().isEmpty() ? f.getName() : tag.alias();
                }
               
                final Field<T> field = RuntimeFieldFactory.getFieldFactory(
                        f.getType(), strategy).create(fieldMapping, name, f, strategy);
                fields.add(field);
View Full Code Here

Examples of com.evernote.edam.type.Tag

        note.setCreated(datetimeValue());
      if (reader.name().equalsIgnoreCase("Content"))
        note.setContent(textValue());
      if (reader.name().equalsIgnoreCase("tag") && createNewTags) {
        String tag = textValue();
        Tag noteTag = null;
        boolean found=false;
        for (int i=0; i<tags.size(); i++) {
          if (tags.get(i).getName().equalsIgnoreCase(tag)) {
            found=true;
            noteTag = tags.get(i);
            i=tags.size();
          }
        }
       
        if (!found) {
          noteTag = new Tag();
          noteTag.setName(tag);
          String tagGuid = QUuid.createUuid().toString().replace("{", "").replace("}", "");
          noteTag.setGuid(tagGuid);
          noteTag.setName(tag);
          tags.add(noteTag);
          conn.getTagTable().addTag(noteTag, true);
        }
        note.addToTagNames(noteTag.getName());
        note.addToTagGuids(noteTag.getGuid());
      }
      if (reader.name().equalsIgnoreCase("note-attributes"))
        note.setAttributes(processNoteAttributes());
      if (reader.name().equalsIgnoreCase("resource")) {
        note.getResources().add(processResource());
View Full Code Here

Examples of com.example.model.Tag

        render(400, "失败", ViewType.string);
    }

    @At(path = "/tag/{id}", types = {RestRequest.Method.GET})
    public void find() {
        Tag tag = Tag.where(map("name", param("id"))).singleFetch();
        if (tag == null) {
            render(404, map());
        }
        render(404, list(tag));
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Tag

   
    List<Tag> tags = dao.getTags();
    Assert.assertNotNull(tags);
    Assert.assertEquals(3, tags.size());
    for (String tagName : Arrays.asList("disco", "sludge", "drone")) {
      Assert.assertTrue(tags.contains(new Tag(tagName, (short) 0)));
    }
  }
View Full Code Here

Examples of com.github.stephenc.javaisotools.udflib.structures.Tag

    }

    private void createAndPassDescriptorTag()
            throws HandlerException {
        InputStream myInputStream = null;
        Tag descriptorTag = new Tag();
        byte[] payload = new byte[0];

        try {
            DataReference myDataReference = dataReferenceStack.pop();
            myInputStream = myDataReference.createInputStream();
            payload = BinaryTools.readByteArray(myInputStream, (int) myDataReference.getLength());
            myInputStream.close();
            myInputStream = null;

            myInputStream = dataReferenceStack.pop().createInputStream();
            descriptorTag.DescriptorVersion = (int) BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;

            myInputStream = dataReferenceStack.pop().createInputStream();
            descriptorTag.TagSerialNumber = (int) BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;

            myInputStream = dataReferenceStack.pop().createInputStream();
            descriptorTag.TagLocation = BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;

            myInputStream = dataReferenceStack.pop().createInputStream();
            descriptorTag.TagIdentifier = (int) BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;

        }
        catch (IOException myIOException) {
            throw new HandlerException(myIOException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
                }
                catch (IOException myIOException) {
                }
            }
        }

        descriptorTag.DescriptorCRCLength = payload.length;
        descriptorTag.DescriptorCRC = Checksum.cksum(payload);

        super.data(new ByteArrayDataReference(descriptorTag.getBytes()));
        super.data(new ByteArrayDataReference(payload));
    }
View Full Code Here

Examples of com.gnizr.db.dao.Tag

    assertEquals(1,rootCluster.size());
   
    List<Tag> tagKey = action.getTagClusterKey();
    assertEquals(1,tagKey.size());   
   
    Tag t0 = tagKey.get(0);
    assertEquals(0,t0.getId());
   
    List<Bookmark> bm = action.getBookmarks();
    assertEquals(1,bm.size());
    assertEquals(205,bm.get(0).getLink().getId());
  }
View Full Code Here

Examples of com.google.gerrit.server.git.TagSet.Tag

      if (tagObj == null) {
        return false;
      }
    }

    Tag tag = tags.lookupTag(tagObj);
    if (tag == null) {
      if (rebuiltForNewTags) {
        return false;
      }

      rebuiltForNewTags = true;
      holder.rebuildForNewTags(cache, this);
      return isReachable(tagRef);
    }

    return tag.has(mask);
  }
View Full Code Here

Examples of com.gwtmobile.persistence.test.domain.Tag

        destroyAllData(new Callback() {           
          @Override
          public void onSuccess() {
            final Category c = categoryEntity.newInstance();
            c.setName("Main");
            final Tag tag = tagEntity.newInstance();
            tag.setName("Urgent");
            for (int i = 0; i < 5; i++) {
              Task t = taskEntity.newInstance();
              t.setName("Task" + Integer.toString(i));
              t.setDescription("Task No #" + Integer.toString(i));
              if (i % 2 == 0) {
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.common.Tag

   */
  public IFeedHandler<Tag> getTagFeedHandler() {
    return new AtomFeedHandler<Tag>(this) {
      @Override
      protected Tag entityInstance(BaseService service, Node node, XPathExpression xpath) {
        return new Tag(service, node, nameSpaceCtx, xpath);
      }
    };
  }
View Full Code Here

Examples of com.ikai.photosharing.shared.Tag

      show();
      textBox.setFocus(true);
    }

    private void saveTag(final int x, final int y, final TextBox textBox) {
      Tag tag = new Tag();

      // TODO: Change this to also pass the Image
      tag.setPhotoKey(uploadedImage.getKey());
      tag.setBody(textBox.getValue());
      tag.setX(x);
      tag.setY(y);

      imageService.tagImage(tag, new AsyncCallback<String>() {

        @Override
        public void onFailure(Throwable caught) {
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.