Gets mappings.

@param index the index
@param type  the type
@return the mappings
342649
public Optional<Map<String, ?>> getMappings(String index, String
            type) {
        try {
            return Optional
                    .of(getMappingsResponse(index).get(index).get(type)
                            .getSourceAsMap());
        } catch (Exception e) {
            return JMExceptionManager.handleExceptionAndReturnEmptyOptional
                    (log, e, "getMappings", index, type);
        }
    }
848535
public List<CmsDetailPageInfo> getInfosForType(String type) {

        return new ArrayList<CmsDetailPageInfo>(m_map.get(type));
    }
820001
@SuppressWarnings("unchecked")
	public T get(int index) {
		T ret;
		if (JcRelation.class.equals(type)) {
			ret = (T) new JcRelation(null, this, OPERATOR.Collection.GET);
		} else if (JcNode.class.equals(type)) {
			ret = (T) new JcNode(null, this, OPERATOR.Collection.GET);
		} else {
			ret = (T) new JcValue(null, this, OPERATOR.Collection.GET);
		}
		ret.setHint(ValueAccess.hintKey_opValue, index);
		QueryRecorder.recordInvocationConditional(this, "get", ret, QueryRecorder.literal(index));
		return ret;
	}
909860
public static List<String> findTypes(String root, String index) throws IOException, URISyntaxException {
        if (root == null) {
            return findTypes(index);
        }

        logger.debug("Looking for types in classpath under [{}/{}].", root, index);

        final List<String> typeNames = new ArrayList<>();
        String[] resources = ResourceList.getResources(root + "/" + index + "/"); // "es/index/"
        for (String resource : resources) {
            if (!resource.isEmpty() && !root.equals(resource)) {
                String withoutIndex = resource.substring(resource.indexOf("/") + 1);
                if (withoutIndex.equals(Defaults.IndexSettingsFileName) ||
                        withoutIndex.equals(Defaults.UpdateIndexSettingsFileName)) {
                    logger.trace(" - ignoring: [{}]", withoutIndex);
                } else {
                    String type = withoutIndex.substring(0, withoutIndex.indexOf(Defaults.JsonFileExtension));
                    logger.trace(" - found [{}].", type);
                    typeNames.add(type);
                }
            }
        }

        return typeNames;
    }
1372968
@Override
	@Nullable
	public String getMapping(Class<?> type) {

		Assert.notNull(type, "Type must not be null!");

		String[] mapping = getMappingFrom(findMergedAnnotation(type, annotationType));

		return mapping.length == 0 ? null : mapping[0];
	}
325082
public static List<Class> getMethodGenericParameterTypes(Method method, int index) {
    	List<Class> results = new ArrayList<Class>();
    	Type[] genericParameterTypes = method.getGenericParameterTypes();
    	if (index >= genericParameterTypes.length ||index < 0) {
			throw new IllegalArgumentException("index "+ (index<0 ? " must > 0 " : " over total arguments"));
		}
    	Type genericParameterType = genericParameterTypes[index];
    	if(genericParameterType instanceof ParameterizedType){
    	     ParameterizedType aType = (ParameterizedType) genericParameterType;
    	     Type[] parameterArgTypes = aType.getActualTypeArguments();
    	     for(Type parameterArgType : parameterArgTypes){
    	         Class parameterArgClass = (Class) parameterArgType;
    	         results.add(parameterArgClass);
    	     }
    	     return results;
    	}
    	return results;
    }
468419
@SuppressWarnings("unchecked")
    private boolean prepareMapping(String index, Map<String, Object> defaultMappings) {
        boolean success = true;

        for (Map.Entry<String, Object> stringObjectEntry : defaultMappings.entrySet()) {
            Map<String, Object> mapping = (Map<String, Object>) stringObjectEntry.getValue();
            if (mapping == null) {
                throw new RuntimeException("type mapping not defined");
            }
            PutMappingRequestBuilder putMappingRequestBuilder = client.admin().indices().preparePutMapping()
                    .setIndices(index);
            putMappingRequestBuilder.setType(stringObjectEntry.getKey());
            putMappingRequestBuilder.setSource(mapping);

            if (log.isLoggable(Level.FINE)) {
                log.fine("Elasticsearch create mapping for index '"
                        + index + " and type '" + stringObjectEntry.getKey() + "': " + mapping);
            }

            PutMappingResponse resp = putMappingRequestBuilder.execute().actionGet();

            if (resp.isAcknowledged()) {
                if (log.isLoggable(Level.FINE)) {
                    log.fine("Elasticsearch mapping for index '"
                            + index + " and type '" + stringObjectEntry.getKey() + "' was acknowledged");
                }
            } else {
                success = false;
                log.warning("Elasticsearch mapping creation was not acknowledged for index '"
                        + index + " and type '" + stringObjectEntry.getKey() + "'");
            }
        }

        return success;
    }
463149
@Override
	public <T> T get(int index, Class<T> type) {
		if (FETCHERS.containsKey(type))
			return getByType(index, type);
		else
			throw new IllegalArgumentException("has no value with " + type + " at index " + index);
	}
934141
public AiTextureMapMode getTextureMapModeV(AiTextureType type, int index) {
        checkTexRange(type, index);
        
        Property p = getProperty(PropertyKey.TEX_MAP_MODE_V.m_key);
        
        if (null == p || null == p.getData()) {
            return (AiTextureMapMode) m_defaults.get(
                    PropertyKey.TEX_MAP_MODE_V);
        }
        
        return AiTextureMapMode.fromRawValue(p.getData());
    }
607670
public <T extends Mapping> T getMapping(MappingType type)
    {
        return (T) mappings.get(type);
    }
915080
public <T> ESDatas<T> searchAllParallel(String index,  Class<T> type,int thread) throws ElasticSearchException{
			return searchAllParallel(index,  ClientInterface.DEFAULT_FETCHSIZE,type,thread);
	}
161181
public function getMapping($index = null, $type = null)
    {
        $request = $this->createRequestInstance(self::INDEX_GET_MAPPING, $index, $type);

        return $this->client->send($request);
    }
577639
public <T> Map<String, T> findByTypeWithName(Class<T> type) {
        return BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext, type);
    }
1279426
public SearchResponse searchAll(String[] indices, String[] types,
            AggregationBuilder[] aggregationBuilders) {
        return searchAll(indices, types, null, aggregationBuilders);
    }
922437
public JdbcMapperBuilder<T> addMapping(final String column, final int index, final int sqlType) {
        addMapping(column, index, sqlType, FieldMapperColumnDefinition.<JdbcColumnKey>identity());
        return this;
    }
54165
public function addIndex($type, $index)
    {
        if (!isset($this->indexes[$type])) {
            $this->indexes[$type] = [];
        }

        $this->indexes[$type][] = $index;
    }
348210
protected IndexType getIndexType(String type)
    {
        type = type.toLowerCase();
        if ("keys".equals(type))
            return IndexType.KEYS;
        else if("custom".equals(type))
            return IndexType.CUSTOM;
        else if("composites".equals(type))
            return IndexType.COMPOSITES;
        else
            return null;
    }