Matches streams with the metadata tag key having the specified value.

@param key The metadata tag
@param value The metatdata's value
@return A new StreamSpecifier
7180
public static StreamSpecifier tag(String key, String value) {
    checkValidKey(key);
    checkNotNull(value);
    return new StreamSpecifier("m:" + key + ":" + value);
  }
447800
@Override
  public void addUserMetadata(String key, String value)
  {
    this.s3Metadata.addUserMetadata(key, value);
  }
219296
public Object putNodeMetaData(Object key, Object value) {
        if (key == null) throw new GroovyBugError("Tried to set meta data with null key on " + this + ".");
        if (metaDataMap == null) {
            metaDataMap = new ListHashMap();
        }
        return metaDataMap.put(key, value);
    }
1237474
public synchronized boolean add(String key, T value) {
        if (key.length() > 3 && key.endsWith(WILDCARD) && key.charAt(key.length() - 2) != '.') {
            throw new IllegalArgumentException("Unsupported use of wildcard in key " + key);
        }

        // Find the key in the structure (build out to it)
        Node<T> current = internalFind(key, false);

        // Return false if the key already exists
        if (current.getValue() != null)
            return false;

        // Set the value and return true
        current.setValue(value);
        return true;
    }
743100
public MetricName withTag(String key, String value) {
		return name(name).tags(tags).tag(key, value).build();
	}
827995
protected void addToMap(Map m, String key, String value) {
        m.put(key,value);
    }
694598
protected boolean doesMetaDataMatch(final KeyValueNode<?> metaData, final CSNodeWrapper node) {
        if (!(node.getNodeType().equals(CommonConstants.CS_NODE_META_DATA) || node.getNodeType().equals(
                CommonConstants.CS_NODE_META_DATA_TOPIC))) return false;

        // If the unique id is not from the parser, in which case it will start with a number than use the unique id to compare
        if (metaData.getUniqueId() != null && metaData.getUniqueId().matches("^\\d.*")) {
            return metaData.getUniqueId().equals(Integer.toString(node.getId()));
        } else {
            // Allow for old abstract references.
            if (metaData.getKey().equals(CommonConstants.CS_ABSTRACT_TITLE) && node.getTitle().equals(
                    CommonConstants.CS_ABSTRACT_ALTERNATE_TITLE)) {
                return true;
            }

            // Allow for alternate file references.
            if (metaData.getKey().equals(CommonConstants.CS_FILE_TITLE) && node.getTitle().equals(CommonConstants.CS_FILE_SHORT_TITLE)) {
                return true;
            }

            // Check if the key matches, if it does than the nodes match.
            return metaData.getKey().equals(node.getTitle());
        }
    }
144003
private static final TagValue createTagValue(TagKey key, String value)
      throws TagContextDeserializationException {
    try {
      return TagValue.create(value);
    } catch (IllegalArgumentException e) {
      throw new TagContextDeserializationException(
          "Invalid tag value for key " + key + ": " + value, e);
    }
  }
173904
public void setProp(String key, Object value) {
    this.specProperties.put(key, value.toString());
  }
967852
@Override
	public byte[] toBinary(Object value, Object meta, boolean insertMeta) {
		return toBinary(value, meta, insertMeta, (input) -> {
			return mapper.write(input);
		}
100406
public static ResourceMeta withStream(final HasInputStream stream, final Map<String, String> meta) {
        return new BaseStreamResource(meta,stream);
    }
699294
public static Matcher<Map<String, Object>> hasAttribute(final String key, final Object value) {
    return new Matcher<Map<String, Object>>() {

      @Override
      protected boolean matchesSafely(Map<String, Object> object) {
        return object.containsKey(key) && value.equals(object.get(key));
      }
    };
  }
631478
public DescriptionBuilder metadata(final String key, final String value) {
        metadata.put(key, value);
        return this;
    }
317958
public static void validateMetadata(Map<String, String> metadata) throws ServiceException {
        for ( String key : metadata.keySet()){
            if (!validateRequiredField(key, metaKeyRegEx)){
               throw new ServiceException(
                    ErrorCode.SERVICE_INSTANCE_METAKEY_FORMAT_ERROR,
                    ErrorCode.SERVICE_INSTANCE_METAKEY_FORMAT_ERROR.getMessageTemplate(),key
               );
            }
        }

    }
1187642
public function addMetaTag( $type, $key, $value )
	{
		$metaData	= array(
			$type		=> $key,
			'content'	=> $value,
		);
		$this->metaTags[strtolower( $type.":".$key )]	= $metaData;
	}
1251169
public static DictionaryMetadata read(InputStream metadataStream) throws IOException {
    Map<DictionaryAttribute, String> map = new HashMap<DictionaryAttribute, String>();
    final Properties properties = new Properties();
    properties.load(new InputStreamReader(metadataStream, "UTF-8"));

    // Handle back-compatibility for encoder specification.
    if (!properties.containsKey(DictionaryAttribute.ENCODER.propertyName)) {
      boolean hasDeprecated = properties.containsKey("fsa.dict.uses-suffixes") ||
                              properties.containsKey("fsa.dict.uses-infixes") ||
                              properties.containsKey("fsa.dict.uses-prefixes");

      boolean usesSuffixes = Boolean.valueOf(properties.getProperty("fsa.dict.uses-suffixes", "true"));
      boolean usesPrefixes = Boolean.valueOf(properties.getProperty("fsa.dict.uses-prefixes", "false"));
      boolean usesInfixes  = Boolean.valueOf(properties.getProperty("fsa.dict.uses-infixes",  "false"));

      final EncoderType encoder;
      if (usesInfixes) {
        encoder = EncoderType.INFIX;
      } else if (usesPrefixes) {
        encoder = EncoderType.PREFIX;
      } else if (usesSuffixes) {
        encoder = EncoderType.SUFFIX;
      } else {
        encoder = EncoderType.NONE;
      }

      if (!hasDeprecated) {
        throw new IOException("Use an explicit " +
            DictionaryAttribute.ENCODER.propertyName + "=" + encoder.name() +
            " metadata key: ");
      }

      throw new IOException("Deprecated encoder keys in metadata. Use " +
          DictionaryAttribute.ENCODER.propertyName + "=" + encoder.name());
    }

    for (Enumeration<?> e = properties.propertyNames(); e.hasMoreElements();) {
      String key = (String) e.nextElement();
      map.put(DictionaryAttribute.fromPropertyName(key), properties.getProperty(key));
    }

    return new DictionaryMetadata(map);
  }
585636
public static <T> TaggedValue<T> taggedValue(String tag, T rep) {
        return new TaggedValueImpl<T>(tag, rep);
    }