Get ModelMetadataKey, which is an object holding a list of service instances that contain
the key name in the service metadata.

@param keyName
the key name.
@return
the ModelMetadataKey.
779261
public ModelMetadataKey getMetadataKey(String keyName){
        HttpResponse result = invoker.invoke("/metadatakey/" + keyName , null, HttpMethod.GET);

        if (result.getHttpCode() != HTTP_OK) {
           throw new ServiceException(ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR,
                    "HTTP Code is not OK, code=%s", result.getHttpCode());
        }

        ModelMetadataKey key = _deserialize(
                    result.getRetBody(), ModelMetadataKey.class);

        return key;
    }
397856
public List<ModelServiceInstance> getUPModelInstancesByMetadataKey(String keyName) {
        List<ModelServiceInstance> list = new ArrayList<>();
        for (ModelServiceInstance instance : getModelInstancesByMetadataKey(keyName)) {
            if (instance.getStatus().equals(OperationalStatus.UP)) {
                list.add(instance);
            }
        }
        return list;
    }
618015
public static ComponentMetaData getComponentMetaData(JavaColonNamespace namespace, String name) throws NamingException {
        ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
        if (cmd == null) {
            String fullName = name.isEmpty() ? namespace.toString() : namespace + "/" + name;
            String msg = Tr.formatMessage(tc, "JNDI_NON_JEE_THREAD_CWWKN0100E", fullName);
            NamingException nex = new NamingException(msg);
            throw nex;
        }
        return cmd;
    }
1335300
public ServiceResult<T> addMetadata(String key, Metadata metadata) {
        this.getMetadata().put(key, metadata);
        return this;
    }
345980
public Map<String, CFMetaData> getKeyspaceMetaData(String keyspaceName)
    {
        assert keyspaceName != null;
        KSMetaData ksm = keyspaces.get(keyspaceName);
        assert ksm != null;
        return ksm.cfMetaData();
    }
413735
protected static function getSpecificDynamoDbKey(DynamoDbModel $model, $keyName, $value)
    {
        $idKey = $model->marshalItem([
            $keyName => $value,
        ]);

        return [$keyName => $idKey[$keyName]];
    }
700524
def _get_metadata_model(name=None):
    """"""
    if name is not None:
        try:
            return registry[name]
        except KeyError:
            if len(registry) == 1:
                valid_names = 'Try using the name "%s" or simply leaving it '\
                              'out altogether.' % list(registry)[0]
            else:
                valid_names = "Valid names are " + ", ".join(
                    '"%s"' % k for k in list(registry))
            raise Exception(
                "Metadata definition with name \"%s\" does not exist.\n%s" % (
                    name, valid_names))
    else:
        assert len(registry) == 1, \
            "You must have exactly one Metadata class, if using " \
            "get_metadata() without a 'name' parameter."
        return list(registry.values())[0]
1343368
public long getLastChangedTimeMills(String serviceName) {
        ModelService service = null;
        try {
            service=lookupService(serviceName);
        }catch (ServiceException e){
            LOGGER.debug(String.format("Exception when lookup service by name=[%s], error=[%s]",serviceName,e.getMessage()));
        }
        return service == null ? -1L : service.getModifiedTime().getTime();
    }
612478
public TableMetadata getTableMetadata(String tableName){
		if(tableName == null) return null;
		
		try {
			tableMetadataStatement.setInt(1, tableName.hashCode());
			ResultSet set = tableMetadataStatement.executeQuery();
			
			return transformToTableMetadata(set);
		} catch (SQLException e) {
			throw new BackendException("Could not get TableMetadata for table '" + tableName + "'", e);
		}
	}
817849
public CounterMetadata getCounterMetadata(String counterName) {
        // first fetch metadata for the specified counter
        String jsonString = getRow(counterName);
        if (jsonString != null) {
            CounterMetadata result = CounterMetadata.fromJsonString(jsonString);
            if (result != null) {
                result.setName(counterName);
            }
            return result;
        } else {
            // no exact match, try to build counter metadata from global config
            return findCounterMetadata(counterName);
        }
    }
476583
public static String getModelJavaType(CamelCatalog camelCatalog, String modelName) {
        // use the camel catalog
        String json = camelCatalog.modelJSonSchema(modelName);
        if (json == null) {
            throw new IllegalArgumentException("Could not find catalog entry for model name: " + modelName);
        }

        List<Map<String, String>> data = JSonSchemaHelper.parseJsonSchema("model", json, false);
        if (data != null) {
            for (Map<String, String> propertyMap : data) {
                String javaType = propertyMap.get("javaType");
                if (javaType != null) {
                    return javaType;
                }
            }
        }
        return null;
    }
332886
def get_service_key(self, service_name, key_name):
        
        for key in self._get_service_keys(service_name)['resources']:
            if key_name == key['entity']['name']:
                guid = key['metadata']['guid']

                uri = "/v2/service_keys/%s" % (guid)
                return self.api.get(uri)

        return None
1224427
public ModelService getModelService(String serviceName) {
        ModelService service = null;
        try{
            service = getDirectoryServiceClient().lookupService(serviceName);
        }catch(ServiceException se){
            if (se.getErrorCode()==ErrorCode.SERVICE_DOES_NOT_EXIST){
                LOGGER.error(se.getMessage());
            }else {
                LOGGER.error("Error when getModelService", se);
            }
            throw se;
        }
        return service;
    }
1163132
public RuleMetadata getMetaData(String attributeName) {

        if (metadataList != null && attributeName != null) {
            for (int i = 0; i < metadataList.length; i++) {
                if (attributeName.equals(metadataList[i].getAttributeName())) {
                    return metadataList[i];
                }
            }
        }
        return null;
    }
544462
def model_get(method_name):
    

    def model_get(_value, context, **_params):
        method = getattr(context["model"], method_name)
        return _get(method, context["key"], (), {})

    return model_get
747814
public OvhPrice vps_2014v1_cloud_model_modelName_GET(net.minidev.ovh.api.price.vps._2014v1.cloud.OvhModelEnum modelName) throws IOException {
		String qPath = "/price/vps/2014v1/cloud/model/{modelName}";
		StringBuilder sb = path(qPath, modelName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhPrice.class);
	}
1203572
public Metadata getMetadata(String typeName) {
        String scope = Metadata.scopeBasedOnType(typeName);
        return this.getMetadata(typeName, scope);
    }