Examples of Tag


Examples of org.htmlparser.tags.Tag

    public void assertTagNameShouldBe(
        String message,
        Node node,
        String expectedTagName)
    {
        Tag tag = (Tag) node;
        assertStringEquals(message, expectedTagName, tag.getTagName());
    }
View Full Code Here

Examples of org.jaudiotagger.tag.Tag

    public MusicFile(String filename) {
        AudioFile audioFile;
        try {
          audioFile = AudioFileIO.read(new File(filename));
       
            Tag tag = audioFile.getTag();
            if (tag != null) {
                album = tag.getFirst(FieldKey.ALBUM);
                artist = tag.getFirst(FieldKey.ARTIST);
                genre = getGenre(tag.getFirst(FieldKey.GENRE));
                year = tag.getFirst(FieldKey.YEAR);
                title = tag.getFirst(FieldKey.TITLE);
               
                for (Artwork aw : tag.getArtworkList())
                    image = new DcImageIcon(aw.getBinaryData());
               
                bitrate = (int) audioFile.getAudioHeader().getBitRateAsNumber();
                length = audioFile.getAudioHeader().getTrackLength();
                encodingType = audioFile.getAudioHeader().getEncodingType();
               
                try {
                    String s = tag.getFirst(FieldKey.TRACK);
                    if (s != null && s.length() > 0) {
                        if (s.indexOf("/") > 0)
                            s = s.substring(0, s.indexOf("/"));
                       
                        track = Integer.parseInt(s);
                    }
                       
                } catch (Exception e) {
                    logger.debug("Could not parse track [" + tag.getFirst(FieldKey.TRACK) + "]", e);
                }
            }
        } catch (Exception e) {
            logger.error("Could not parse music file " + filename, e);
        }
View Full Code Here

Examples of org.jboss.errai.cdi.demo.tagcloud.client.shared.Tag

  private void createRandomChange() {
    if (Math.random() > 0.9) {
      // add a random tag
      List<Tag> tags = new ArrayList<Tag>(initialTags);
      Tag randomTag = new Tag(randomString(tags.get(new Random().nextInt(initialTags.size())).getName()),
                (int) Math.ceil(Math.random() * 100));
      initialTags.add(randomTag);
      newTagEvent.fire(randomTag);
    }
    else {
View Full Code Here

Examples of org.jboss.errai.cdi.server.gwt.util.SimpleTranslator.Tag

    InputStream inStream = new FileInputStream(from);
    OutputStream outStream = new FileOutputStream(to);

    // Replace default http port with provided port
    SimpleTranslator trans = new SimpleTranslator();
    trans.addFilter(new Tag("socket-binding", new AttributeEntry("name", "http")));
    trans.addNewTag("socket-binding-group", new Tag("socket-binding", new AttributeEntry("name", "http"),
            new AttributeEntry("port", String.valueOf(port))));

    try {
      trans.translate(inStream, outStream);
    }
View Full Code Here

Examples of org.jclouds.cloudsigma2.domain.Tag

   }

   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(input instanceof Tag, "this binder is only valid for Tag!");
      Tag create = Tag.class.cast(input);

      JsonObject serverInfoJson = createTagRequestToJson.apply(create);
      request.setPayload(serverInfoJson.toString());
      request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
      return request;
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.Tag

      Peer peer = getPeer(ip, port);
      Map<PeerFeatures,Integer> peer_features = Utils.scanTagListPeerFeatures(tagList);
      peer_features.put(PeerFeatures.ProtocolVersion, (int)protocolVersion);
      peer.peer_features.putAll(peer_features);
     
      Tag udp_port = tagList.getTag(E2DKConstants.ET_UDPPORT);
      if (udp_port != null)
        peer.tag_list.addTag(udp_port);
     
    } catch (PeerManagerException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.jnetpcap.protocol.application.Html.Tag

    String tagString = extractBounded(str, start, end);
    if (tagString == null) {
      return null;
    }

    Tag tag;
    HtmlTag.Type type = HtmlTag.Type.OPEN;
    if (tagString.charAt(0) == '/') {
      tagString = tagString.substring(1);
      type = HtmlTag.Type.CLOSE;
    }
View Full Code Here

Examples of org.jsmpp.bean.OptionalParameter.Tag

     * @param tagCode is the tag code.
     * @param content is the content.
     * @return the OptionalParameter object.
     */
    public static OptionalParameter deserialize(short tagCode, byte[] content) {
        Tag tag = null;
        try {
            tag = Tag.valueOf(tagCode);
        } catch (IllegalArgumentException e) {
            return new COctetString(tagCode, content);
        }
View Full Code Here

Examples of org.jsoup.parser.Tag

    tq.consume("</");
    String tagName = tq.consumeTagName();
    tq.chompTo(">");

    if (!Strings.empty(tagName)) {
      Tag tag = Tag.valueOf(tagName);
      popStackToClose(tag);
    }
  }
View Full Code Here

Examples of org.mcavallo.opencloud.Tag

        cloud.setMaxTagsToDisplay(parameters.getTotalTags());
     
      for (String subject : data.keySet()){
        if (data.get(subject).intValue() > Integer.parseInt(parameters.getCuttingLevel())){
          for (int i=0; i<data.get(subject).intValue(); i++){
            Tag tag2 = new Tag(subject, ((HttpServletRequest) pageContext.getRequest()).getContextPath()+(scope!=null?scope:"")+(type.equals("0")?("/simple-search?filterquery="+URLEncoder.encode(subject,"UTF-8")+"&filtername="+index+"&filtertype=equals"):("/browse?type="+index+"&value="+subject)));
            cloud.addTag(tag2);
          }
        }
      }
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.