Returns the es mapping for the property
172556
def es_mapping(cls, base_class, **kwargs):
        

        es_map = {}
        ranges = cls.rdfs_range # pylint: disable=no-member
        rng_defs = get_prop_range_defs(cls.class_names, cls.kds_rangeDef)
        rng_def = get_prop_range_def(rng_defs)
        if rng_def.get("kds_esIndexClass"):
            ranges = rng_def['kds_esIndexClass'].copy()
        # pdb.set_trace()
        # if cls._prop_name == "bf_partOf":
        #     pdb.set_trace()
        idx_types = get_idx_types(rng_def, ranges)
        if 'es_Ignored' in idx_types:
            return {'type': 'text',
                    'index': es_idx_types['es_NotIndexed']}
        if 'es_Nested' in idx_types:
            if (kwargs.get('depth', 0) >= 1 and \
                    kwargs.get('class') == ranges[0]) or \
                    kwargs.get('depth', 0) > 2:
                return {"type" : "keyword"}
            nested_map = getattr(MODULE.rdfclass,
                                 ranges[0]).es_mapping(base_class,
                                                       'es_Nested',
                                                       **kwargs)
            es_map['properties'] = nested_map
            es_map['type'] = "nested"
        elif len(idx_types) > 1:
            fields = {}
            for idx in idx_types:
                fields.update(es_idx_types[idx])
            es_map['fields'] = fields
        elif len(idx_types) == 1:
            if cls._prop_name == 'rdf_type': # pylint: disable=no-member
                es_map['type'] = 'keyword'
            elif idx_types[0] == 'es_NotIndexed':
                es_map['index'] = False
            else:
                es_map['type'] = es_idx_types[idx_types[0]]
        try:
            if not es_map.get('type'):
                fld_type = BaseRdfDataType[ranges[0]].es_type
                es_map['type'] = fld_type
                if cls._prop_name == 'rdf_type':
                    es_map['type'] = 'keyword'
        except (KeyError, AttributeError):
            if cls._prop_name == 'rdf_type': # pylint: disable=no-member
                es_map['type'] = 'keyword'
            else:
                es_map['type'] = 'text'
        if es_map['type'] == "nested":
            del es_map['type']
        try:
            fld_format = BaseRdfDataType[ranges[0]].es_format
            es_map['format'] = fld_format
        except (KeyError, AttributeError):
            pass
        return es_map
1095182
private DescriptorProperties getValidatedProperties(Map<String, String> properties) {
		final DescriptorProperties descriptorProperties = new DescriptorProperties(true);
		descriptorProperties.putProperties(properties);

		new StreamTableDescriptorValidator(true, false, true).validate(descriptorProperties);
		new SchemaValidator(true, false, false).validate(descriptorProperties);
		new ElasticsearchValidator().validate(descriptorProperties);

		return descriptorProperties;
	}
1348323
def _get_property_for(self, p, indexed=True, depth=0):
    """"""
    parts = p.name().split('.')
    if len(parts) <= depth:
      # Apparently there's an unstructured value here.
      # Assume it is a None written for a missing value.
      # (It could also be that a schema change turned an unstructured
      # value into a structured one.  In that case, too, it seems
      # better to return None than to return an unstructured value,
      # since the latter doesn't match the current schema.)
      return None
    next = parts[depth]
    prop = self._properties.get(next)
    if prop is None:
      prop = self._fake_property(p, next, indexed)
    return prop
1154909
def get_es_mappings(self):
        

        es_mappings = json.loads(requests.get(self.mapping_url).text)
        es_mappings = {"_".join(key.split("_")[:-1]): value['mappings'] \
                       for key, value in es_mappings.items()}
        return es_mappings
37942
def get_mapping(self, index, doc_type=None):
        
        mapping = self.es.indices.get_mapping(index=index, doc_type=doc_type)
        return next(iter(mapping.values()))
589305
function(e) {
    const doclets = e.doclets;
    for (let i = 0, ii = doclets.length; i < ii; ++i) {
      const doclet = doclets[i];
      if (doclet.params) {
        const params = doclet.params;
        for (let j = 0, jj = params.length; j < jj; ++j) {
          const param = params[j];
          if (param.type && param.type.names) {
            const type = param.type.names[0];
            if (type in properties) {
              param.type.names[0] = type;
              params.push.apply(params, properties[type].map(p => {
                const property = Object.assign({}, p);
                property.name = `${param.name}.${property.name}`;
                return property;
              }));
            }
          }
        }
      }
    }
  }
922606
def get_properties(zos_obj):
    
    prop_get = set(zos_obj._prop_map_get_.keys())
    prop_set = set(zos_obj._prop_map_put_.keys())
    if prop_set.issubset(prop_get):
        prop_get = prop_get.difference(prop_set)
    else:
        msg = 'Assumption all getters are also setters is incorrect!'
        raise NotImplementedError(msg)
    return list(prop_get), list(prop_set)
509250
function normalizeProperties(properties) {
  return _.map(properties, function(val) {
    if(_.isString(val)) {
      return [val, false];
    } else if(val.length === 2){
      return [val[0], val[1].toLowerCase() === "desc"];
    } else {
      throw new Error("Wrong format for index definition, ['property name', 'desc'|'asc'] required");
    }
  });
}
663618
def get_es(url, **kwargs):
    
    urls = [url] if isinstance(url, str) else url
    kwargs.setdefault('serializer', ElasticJSONSerializer())
    es = elasticsearch.Elasticsearch(urls, **kwargs)
    return es
31024
static public Map<String,Object> propertiesToMap(Dictionary<?, ?> properties)
    {
        Map<String,Object> map = null;
        if (properties != null)
        {
	        map = new Hashtable<String,Object>();
	        Enumeration<?> keys = properties.keys();
	        while (keys.hasMoreElements())
	        {
	        	Object key = keys.nextElement();
                map.put((String)key, properties.get(key));	            
	        }
        }
        return map;
    }
22774
def get_mapping(self, meta_fields=True):
        '''
        
        '''
        return {'properties': dict((name, field.json()) for name, field in iteritems(self.fields) if meta_fields or name not in AbstractField.meta_fields)}
510392
function(properties) {
            var key, newKey,
                remapped = {},
                axisProps = this.filterPropsByRegex(properties, /(axisY|secondaryAxis|axisLabelsY|axisTitleY|gridLinesY)/);
            for(key in axisProps) {
                if(axisProps.hasOwnProperty(key)) {
                    if(!this.yAxisKeyIsTrumped(key, properties)) {
                        newKey = key.replace(/(axisY|secondaryAxis)/, "axis");
                        newKey = newKey.replace(/axisLabelsY/, "axisLabels");
                        newKey = newKey.replace(/axisTitleY/, "axisTitle");
                        newKey = newKey.replace(/gridLinesY/, "gridLines");
                        remapped[newKey] = axisProps[key];
                    }
                }
            }
            return remapped;
        }
917030
def get_first_mapping(cls):
    """"""
    from .models import Indexable

    if issubclass(cls, Indexable) and hasattr(cls, "Mapping"):
        return cls.Mapping
    for base in cls.__bases__:
        mapping = get_first_mapping(base)
        if mapping:
            return mapping
    return None
1311947
def get_model_index_properties(instance, index):
    """"""
    mapping = get_index_mapping(index)
    doc_type = instance._meta.model_name.lower()
    return list(mapping["mappings"][doc_type]["properties"].keys())
1091449
function(properties) {
            var key, newKey,
                remapped = {},
                axisProps = this.filterPropsByRegex(properties, /(axisX|primaryAxis|axisLabelsX|axisTitleX|gridLinesX)/);
            for(key in axisProps) {
                if(axisProps.hasOwnProperty(key)) {
                    if(!this.xAxisKeyIsTrumped(key, properties)) {
                        newKey = key.replace(/(axisX|primaryAxis)/, "axis");
                        newKey = newKey.replace(/axisLabelsX/, "axisLabels");
                        newKey = newKey.replace(/axisTitleX/, "axisTitle");
                        newKey = newKey.replace(/gridLinesX/, "gridLines");
                        remapped[newKey] = axisProps[key];
                    }
                }
            }
            return remapped;
        }
1121008
def _FetchCustomMappings(descriptor_ls):
    """"""
    custom_mappings = []
    for descriptor in descriptor_ls:
        if isinstance(descriptor, ExtendedEnumDescriptor):
            custom_mappings.extend(
                _FormatCustomJsonMapping('Enum', m, descriptor)
                for m in descriptor.enum_mappings)
        elif isinstance(descriptor, ExtendedMessageDescriptor):
            custom_mappings.extend(
                _FormatCustomJsonMapping('Field', m, descriptor)
                for m in descriptor.field_mappings)
            custom_mappings.extend(
                _FetchCustomMappings(descriptor.enum_types))
            custom_mappings.extend(
                _FetchCustomMappings(descriptor.message_types))
    return custom_mappings
1222453
def map(self, **kwargs):
        '''  '''
        return { key: str(self._envars[kwargs[key]])  # str strips Entry
                 for key in kwargs }