Gets the tag with the specified name.

@param <T>     Type of tag to get.
@param tagName Name of the tag.
@return The tag with the specified name.
356502
public <T extends Tag> T get(String tagName) {
        return (T) this.value.get(tagName);
    }
799130
def get_tags(self, tagtype):
        '''  '''
        return [t for t in self.__tags if t.tagtype == tagtype]
1197522
public TagAttribute get(String ns, String localName)
    {
        if (ns != null && localName != null)
        {
            int idx = Arrays.binarySearch(_namespaces, ns);
            if (idx >= 0)
            {
                for (TagAttribute attribute : _nsattrs.get(idx))
                {
                    if (localName.equals(attribute.getLocalName()))
                    {
                        return attribute;
                    }
                }
            }
        }
        
        return null;
    }
1038460
@Override
    public String getType(String xmlName) {
        int index = getIndex(xmlName);

        if (index < 0) {
            return null;
        }
        return getType(index);
    }
851391
public T get(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return i;
            }
        }
        return null;
    }
294973
String getTagValue(Collection<Tag> tags, String key) {
        for (Tag tag : tags) {
            if (tag.getKey().toLowerCase(Locale.ENGLISH).equals(key.toLowerCase(Locale.ENGLISH))) {
                return tag.getValue();
            }
        }
        return null;
    }
1000028
public int getIdByTag(String tag)
    {
        Integer value = (Integer) table.getValueByKey(tag);
        if (value == null)
            LoggerFactory.getDefaultLogger().error(
                "** " + this.getClass().getName() + ": Tag '" + tag + "' is not defined. **");
        return value.intValue();
    }
817293
protected NodeList getTagChildren(String tagName, Element element) {
        return element.getNamespaceURI() == null ? element.getElementsByTagName(tagName) : element.getElementsByTagNameNS(
            element.getNamespaceURI(), tagName);
    }
976164
public Search tag(String tagKey, String tagValue) {
        return tags(Tags.of(tagKey, tagValue));
    }
123878
public static Tag getParentTag(Tag tag) {
	Statement p = tag.getParent();
	if (p == null) return null;
	p = p.getParent();
	if (p instanceof Tag) return (Tag) p;
	return null;
    }
79153
public static int getType(String tag) {
        if (ElementTags.SUBJECT.equals(tag)) {
            return Element.SUBJECT;
        }
        if (ElementTags.KEYWORDS.equals(tag)) {
            return Element.KEYWORDS;
        }
        if (ElementTags.AUTHOR.equals(tag)) {
            return Element.AUTHOR;
        }
        if (ElementTags.TITLE.equals(tag)) {
            return Element.TITLE;
        }
        if (ElementTags.PRODUCER.equals(tag)) {
            return Element.PRODUCER;
        }
        if (ElementTags.CREATIONDATE.equals(tag)) {
            return Element.CREATIONDATE;
        }
        return Element.HEADER;
    }
795205
public static <T extends Tag, V> V convertToValue(T tag) throws ConversionException {
        if(tag == null || tag.getValue() == null) {
            return null;
        }

        if(!tagToConverter.containsKey(tag.getClass())) {
            throw new ConversionException("Tag type " + tag.getClass().getName() + " has no converter.");
        }

        TagConverter<T, ?> converter = (TagConverter<T, ?>) tagToConverter.get(tag.getClass());
        return (V) converter.convert(tag);
    }
473428
def get_tag(tag_type)
      matches = @tags.select { |m| m.type==tag_type }
      return matches.first
    end
637362
public <T extends AbstractJaxb> List<T> getByNameAsList(String name, Class<T> tagType) {
        return GetByNameUtil.getByNameAsList((T) this, new ArrayList<T>(), name,tagType);
    }
1092342
@SuppressWarnings("unchecked")
    public <T extends Tag> Set<T> getOfType(final Class<T> type) {
	read.lock();
	try {
	    final Set<T> tagsOfType = (Set<T>) tags.get(type);
	    return tagsOfType != null ? Collections.unmodifiableSet(tagsOfType) : Collections.emptySet();
	} finally {
	    read.unlock();
	}
    }
154056
public TagValue getTag(String name) {
    TagValue tv = null;
    int id = TiffTags.getTagId(name);
    if (tags.containsTagId(id))
      tv = tags.get(id);
    return tv;
  }
771136
public boolean removeTag(String tagName) {
    boolean result = false;
    IFD ifd = firstIFD;
    while (ifd != null) {
      if (ifd.containsTagId(TiffTags.getTagId(tagName))) {
        ifd.removeTag(tagName);
      }
      ifd = ifd.getNextIFD();
    }
    createMetadataDictionary();
    return result;
  }