Examples of Tag


Examples of org.nasutekds.server.admin.Tag

        }
      }

      // Register the usage arguments.
      for (Map.Entry<Tag, SortedSet<SubCommand>> group : groups.entrySet()) {
        Tag tag = group.getKey();
        SortedSet<SubCommand> subCommands = group.getValue();

        String option = OPTION_LONG_HELP + "-" + tag.getName();
        String synopsis = tag.getSynopsis().toString().toLowerCase();
        BooleanArgument arg = new BooleanArgument(option, null, option,
            INFO_DSCFG_DESCRIPTION_SHOW_GROUP_USAGE.get(synopsis));

        parser.addGlobalArgument(arg);
        parser.setUsageGroupArgument(arg, subCommands);
View Full Code Here

Examples of org.ngrinder.model.Tag

  public void testPerfTestTag() {
    PerfTest entity = new PerfTest();
    entity.setTestName("test1");
    entity.setTags(new TreeSet<Tag>() {
      {
        add(new Tag("hello"));
        add(new Tag("world"));
      }
    });
    entity = perfTestRepository.save(entity);
    PerfTest findOne = perfTestRepository.findOne(entity.getId());
    SortedSet<Tag> tags = findOne.getTags();
    assertThat(tags.first(), is(new Tag("hello")));
    assertThat(tags.last(), is(new Tag("world")));
  }
View Full Code Here

Examples of org.nutz.lang.util.Tag

  /**生成google所读取的sitemap,方便google索引本站*/
  @At("/sitemap") //google实际访问的URI是 /sitemap.xml , 不过@At里面的值是绝对不能后缀的,因为它只会去匹配去除后缀的URI
  @Ok("void")
  public void sitemap(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    DBCursor cur = questionColl.find(new BasicDBObject(), new BasicDBObject("updateAt", 1)).sort(new BasicDBObject("createAt", -1));
    Tag urlset = Tag.tag("urlset");
    urlset.attr("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9")
       .attr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance")
       .attr("xsi:schemaLocation", "http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd");
   
    urlset.add("url").add("loc").setText("http://" + req.getHeader("Host"));
   
    while(cur.hasNext()) {
      Question question = new Question();
      question.setId(cur.next().get("_id").toString());
      urlset.add("url").add("loc").setText(Helpers.makeQuestionURL(question));
    }
   
    Writer writer = resp.getWriter();
    writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
    writer.write(urlset.toString());
  }
View Full Code Here

Examples of org.ontoware.semweb4j.lessons.lesson5.gen.Tag

    max.addName("Max Völkel");
    konrad.addName("Konrad Völkel");
    max.addKnows(konrad);

    Tag java = new Tag(model);
    Tag python = new Tag(model);
    java.addName("Java related");
    python.addName("Python related");
    python.addName("pythonic stuff");

    max.addTag(java);
    konrad.addTag(python);

    System.out.println("the instance model:");
View Full Code Here

Examples of org.openstreetmap.josm.data.osm.Tag

                if (obj instanceof Expression) {
                    return new PrimitiveToTag() {
                        @Override
                        public Tag apply(OsmPrimitive p) {
                            final String s = (String) ((Expression) obj).evaluate(new Environment().withPrimitive(p));
                            return keyOnly? new Tag(s) : Tag.ofString(s);
                        }
                    };
                } else if (obj instanceof String) {
                    final Tag tag = keyOnly ? new Tag((String) obj) : Tag.ofString((String) obj);
                    return new PrimitiveToTag() {
                        @Override
                        public Tag apply(OsmPrimitive ignore) {
                            return tag;
                        }
View Full Code Here

Examples of org.openstreetmap.josm.plugins.graphview.core.data.Tag

     
    }

    for (MapWaySegment segment : mapData.getMapWaySegments()) {
     
      if (segment.getTags().contains(new Tag("natural", "tree_row"))) {
        segment.addRepresentation(new TreeRow(segment));
      }
     
    }
View Full Code Here

Examples of org.openstreetmap.osmosis.core.domain.v0_6.Tag

        if (collection.isEmpty()) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        for (Iterator<Tag> it = collection.iterator(); it.hasNext();) {
            Tag e = it.next();
            String key = e.getKey();
            if (key == null || key.isEmpty()) {
                continue;
            }
            String value = e.getValue();
            sb.append(key).append(':').append(value);
            if (it.hasNext()) {
                sb.append('|');
            }
        }
View Full Code Here

Examples of org.opoo.press.Tag

      String nicename = n.attributeValue("nicename");
      String text = n.getTextTrim();

      if("post_tag".equals(domain)){
        String stringTag = text;
        Tag tag = site.getTag(nicename);
        if(tag != null){
          stringTag = tag.getSlug();
        }
       
        tags.add(stringTag);
      }
      if("category".equals(domain)){
View Full Code Here

Examples of org.osforce.connect.entity.commons.Tag

      questionService.updateQuestion(question);
    }
    // tags
    for(String name : tags) {
      if(StringUtils.isNotBlank(name)) {
        Tag tag = new Tag(name, question.getId(), Question.NAME);
        tag.setUserId(user.getId());
        tagService.createTag(tag);
      }
    }
    return String.format("redirect:/%s/knowledge/question/detail?questionId=%s",
        project.getUniqueId(), question.getId());
View Full Code Here

Examples of org.osgi.impl.bundle.obr.resource.Tag

        String s2 = getName((ResourceImpl) r2);
        return s1.compareTo(s2);
      }
    });

    Tag tag = doIndex(sorted);
    if (repositoryFileName != null) {
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      PrintWriter pw = new PrintWriter(new OutputStreamWriter(out,
          "UTF-8"));

      pw.println("<?xml version='1.0' encoding='utf-8'?>");
      pw
          .println("<?xml-stylesheet type='text/xsl' href='http://www2.osgi.org/www/obr2html.xsl'?>");

      tag.print(0, pw);
      pw.close();
      byte buffer[] = out.toByteArray();
      String name = "repository.xml";
      FileOutputStream fout = new FileOutputStream(repositoryFileName);

      if (repositoryFileName.endsWith(".zip")) {
        ZipOutputStream zip = new ZipOutputStream(fout);
        CRC32 checksum = new CRC32();
        checksum.update(buffer);
        ZipEntry ze = new ZipEntry(name);
        ze.setSize(buffer.length);
        ze.setCrc(checksum.getValue());
        zip.putNextEntry(ze);
        zip.write(buffer, 0, buffer.length);
        zip.closeEntry();
        zip.close();
      }
      else {
        fout.write(buffer);
      }
      fout.close();
    }

    if (!quiet) {
      PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
      pw.println("<?xml version='1.0' encoding='utf-8'?>");
      pw
          .println("<?xml-stylesheet type='text/xsl' href='http://www2.osgi.org/www/obr2html.xsl'?>");
      tag.print(0, pw);
      pw.close();
    }
  }
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.