Examples of Tag


Examples of Games.modeles.Tag

      @PersistenceContext
    private EntityManager em;

      public Tag createTag (String tag){
           Tag t = null;

        Query q = em.createQuery("select COUNT(t) from Tag t where t.tagName=:tag");
        q.setParameter("tag", tag);
        int count = Integer.valueOf(q.getSingleResult().toString());

     if (count==0){
         System.out.println("création de tag");
        t = new Tag(tag);
        em.persist(t);
          }
        return t;
      }
View Full Code Here

Examples of aQute.lib.tag.Tag

    PrintWriter tmp = new PrintWriter(new OutputStreamWriter(bout, "utf-8"));

    try {
      rsp.setContentType(xml ? "text/xml" : "text/html");

      Tag tag = new Tag("result");
      tag.addAttribute("start", new Date());
      String template = doXML(tag, rq, rsp);
      tag.addAttribute("end", new Date());

      tmp.println("<?xml version='1.0'?>");
      tmp.println("<?xml-stylesheet type='text/xsl' title='Compact' "
          + " href='" + template + ".xsl'?>");

      tag.print(0, tmp);
      tmp.flush();

      if (!xml) {
        // TODO use templates and cache these, this
        // is horribly inefficient.
View Full Code Here

Examples of adios.model.Tag

          String tag = request.getParameter("tag");
          try{
          Recipe r = (Recipe)request.getSession().getAttribute("recipe");

         
          Tag t =new Tag();
          t.setName(tag);
          t.setRecipeId(r.getRecipeId());
          tagService.addTag(t);
          request.getSession().setAttribute("recipe", r);
          }catch(Exception e){
            return "false";
          }
View Full Code Here

Examples of anvil.parser.Tag


  public boolean allowIndent()
  {
    if (_tags.size()>0) {
      Tag previousTag = (Tag)_tags.peek();
      String name = previousTag.getName();
      if (name.equalsIgnoreCase("td")) {
        return false;
     
      if (name.equalsIgnoreCase("textarea")) {
        return false;
View Full Code Here

Examples of ca.uhn.fhir.model.api.Tag

    if (theBuffer.length() > 0 && theBuffer.charAt(0) == ',') {
      theBuffer.deleteCharAt(0);
      while (theBuffer.length() > 0 && theBuffer.charAt(0) == ' ') {
        theBuffer.deleteCharAt(0);
      }
      theTagList.add(new Tag(scheme, term, label));
      parseTagValue(theTagList, theCompleteHeaderValue, theBuffer);
    } else {
      theTagList.add(new Tag(scheme, term, label));
    }

    if (theBuffer.length() > 0) {
      ourLog.warn("Ignoring extra text at the end of " + Constants.HEADER_CATEGORY + " tag '" + theBuffer.toString() + "' - Complete tag value was: " + theCompleteHeaderValue);
    }
View Full Code Here

Examples of cambridge.model.Tag

   public void testSelect() {
      final DirectoryTemplateLoader loader = new DirectoryTemplateLoader(new File("."));
      try {
         TemplateFactory f = loader.newTemplateFactory("a.html", new TemplateModifier() {
            public void modifyTemplate(TemplateDocument doc) {
               Tag t = doc.locateTag("/html/body/div/div/span");

               assertNotNull(t);
               assertEquals("span", t.getTagName());
               assertEquals("text", t.getTextContents());

               t = doc.locateTag("/html/body/ul/li[2]/span");
               assertNotNull(t);
               assertEquals("span", t.getTagName());
               assertEquals("text", t.getTextContents());
            }
         });

         Template t = f.createTemplate();
         t.printTo(new OutputStreamWriter(System.out));
      } catch (TemplateLoadingException e) {
         e.printStackTrace();
      } catch (IOException e) {
         e.printStackTrace();
      } catch (TemplateEvaluationException e) {
View Full Code Here

Examples of ch.entwine.weblounge.common.content.Tag

   * {@link ch.entwine.weblounge.common.impl.request.CacheTagImpl#CacheTagImpl(java.lang.String)}
   * .
   */
  @Test
  public void testCacheTagImplString() {
    Tag t = new CacheTagImpl(tagName);
    assertEquals(tagName, t.getName());
    assertEquals(CacheTag.ANY, t.getValue());
    try {
      new CacheTagImpl(null);
      fail("Managed to initialize tag without name");
    } catch (IllegalArgumentException e) {
      // Expected
View Full Code Here

Examples of ch.njol.yggdrasil.Tag

  @SuppressWarnings("null")
  private final static Charset UTF_8 = Charset.forName("UTF-8");
 
  private final static byte[] getYggdrasilStart(final ClassInfo<?> c) throws NotSerializableException {
    assert Enum.class.isAssignableFrom(Kleenean.class) && Tag.getType(Kleenean.class) == Tag.T_ENUM : Tag.getType(Kleenean.class); // TODO why is this check here?
    final Tag t = Tag.getType(c.getC());
    assert t.isWrapper() || t == Tag.T_STRING || t == Tag.T_OBJECT || t == Tag.T_ENUM;
    final byte[] cn = t == Tag.T_OBJECT || t == Tag.T_ENUM ? Variables.yggdrasil.getID(c.getC()).getBytes(UTF_8) : null;
    final byte[] r = new byte[YGGDRASIL_START.length + 1 + (cn == null ? 0 : 1 + cn.length)];
    int i = 0;
    for (; i < YGGDRASIL_START.length; i++)
      r[i] = YGGDRASIL_START[i];
View Full Code Here

Examples of co.nstant.in.cbor.model.Tag

            write(length.shiftRight(16).and(mask).intValue());
            write(length.shiftRight(8).and(mask).intValue());
            write(length.and(mask).intValue());
        } else {
            if (negative) {
                encoder.encode(new Tag(3));
            } else {
                encoder.encode(new Tag(2));
            }
            encoder.encode(new ByteString(length.toByteArray()));
        }
    }
View Full Code Here

Examples of com.aetrion.flickr.tags.Tag

        }
        Element tagsElement = response.getPayload();
        NodeList tagsNodes = tagsElement.getElementsByTagName("tag");
        for (int i = 0; i < tagsNodes.getLength(); i++) {
            Element tagElement = (Element) tagsNodes.item(i);
            Tag tag = new Tag();
            tag.setCount(tagElement.getAttribute("count"));
            tag.setValue(XMLUtilities.getValue(tagElement));
            tagsList.add(tag);
        }
        return tagsList;
    }
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.