Generates a mapping between attribute names and data types.

@param name name of the map
@param types types to write
329322
private void writeAttributeTypes(String name, FieldType[] types) throws IOException
   {
      m_writer.writeStartObject(name);
      for (FieldType field : types)
      {
         m_writer.writeNameValuePair(field.name().toLowerCase(), field.getDataType().getValue());
      }
      m_writer.writeEndObject();
   }
1352979
private void mapMapCollectionToVertex(ITypedInstance typedInstance, AtlasVertex instanceVertex,
                                          AttributeInfo attributeInfo, Operation operation) throws AtlasException {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Mapping instance {} to vertex {} for attribute {}", typedInstance.toShortString(), string(instanceVertex),
                    attributeInfo.name);
        }

        @SuppressWarnings("unchecked") Map<Object, Object> newAttribute =
                (Map<Object, Object>) typedInstance.get(attributeInfo.name);

        boolean newAttributeEmpty = (newAttribute == null || newAttribute.isEmpty());

        IDataType elementType = ((DataTypes.MapType) attributeInfo.dataType()).getValueType();
        String propertyName = GraphHelper.getQualifiedFieldName(typedInstance, attributeInfo);

        Map<String, Object> currentMap = new HashMap<>();
        Map<String, Object> newMap = new HashMap<>();

        List<String> currentKeys = GraphHelper.getListProperty(instanceVertex, propertyName);
        if (currentKeys != null && !currentKeys.isEmpty()) {
            for (String key : currentKeys) {
                String propertyNameForKey = GraphHelper.getQualifiedNameForMapKey(propertyName, key);
                Object propertyValueForKey = GraphHelper.getMapValueProperty(elementType, instanceVertex, propertyNameForKey);
                currentMap.put(key, propertyValueForKey);
            }
        }

        if (!newAttributeEmpty) {
            for (Map.Entry<Object,Object> entry : newAttribute.entrySet()) {
                String keyStr = entry.getKey().toString();
                String propertyNameForKey = GraphHelper.getQualifiedNameForMapKey(propertyName, keyStr);

                Object newEntry = addOrUpdateCollectionEntry(instanceVertex, attributeInfo, elementType,
                        entry.getValue(), currentMap.get(keyStr), propertyNameForKey, operation);

                //Add/Update/Remove property value
                GraphHelper.setMapValueProperty(elementType, instanceVertex, propertyNameForKey, newEntry);
                newMap.put(keyStr, newEntry);
            }
        }

        Map<String, Object> additionalMap =
                removeUnusedMapEntries(instanceVertex, propertyName, currentMap, newMap, elementType, attributeInfo);

        Set<String> newKeys = new HashSet<>(newMap.keySet());
        newKeys.addAll(additionalMap.keySet());


        // for dereference on way out
        GraphHelper.setListProperty(instanceVertex, propertyName, new ArrayList<>(newKeys));
    }
910093
def mapped_type(self, tchain, p_elem):
        """"""
        SchemaNode("data", p_elem).set_attr("type",
                                            self.datatype_map[tchain[0].arg])
239690
@Override
    public MapAttribute<? super X, ?, ?> getMap(String paramName)
    {
        PluralAttribute<? super X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramName);

        if (isMapAttribute(declaredAttrib))
        {
            return (MapAttribute<X, ?, ?>) declaredAttrib;
        }

        declaredAttrib = getPluralAttriute(paramName);

        if (isMapAttribute(declaredAttrib))
        {
            return (MapAttribute<X, ?, ?>) declaredAttrib;
        }

        throw new IllegalArgumentException(
                "attribute of the given name and type is not present in the managed type, for name:" + paramName);
    }
1252602
public void setTypes(List<String> types) {

        if (types == null) {
            m_types = new ArrayList<String>();
        } else {
            m_types = types;
        }
    }
171210
public NameAndTypeConstant addNameAndType(String name, String type)
  {
    NameAndTypeConstant entry = getNameAndType(name, type);

    if (entry != null)
      return entry;

    Utf8Constant nameEntry = addUTF8(name);
    Utf8Constant typeEntry = addUTF8(type);

    entry = new NameAndTypeConstant(this, _entries.size(),
                                    nameEntry.getIndex(),
                                    typeEntry.getIndex());

    addConstant(entry);

    return entry;
  }
59808
@Override
    public Object mapFromAttributes(final Attributes attributes) throws NamingException {
        final int attributeCount = attributes.size();
        final Map<String, Object> mapOfAttrValues = this.createAttributeMap(attributeCount);

        for (final NamingEnumeration<? extends Attribute> attributesEnum = attributes.getAll(); attributesEnum.hasMore(); ) {
            final Attribute attribute = attributesEnum.next();

            if (!this.ignoreNull || attribute.size() > 0) {
                final String attrName = attribute.getID();
                final String key = this.getAttributeKey(attrName);

                final NamingEnumeration<?> valuesEnum = attribute.getAll();
                final List<?> values = this.getAttributeValues(valuesEnum);

                mapOfAttrValues.put(key, values);
            }
        }

        return mapOfAttrValues;
    }
868323
public void setIntegerAttribute(String name, Integer value) {
		Attribute attribute = getAttributes().get(name);
		if (!(attribute instanceof IntegerAttribute)) {
			throw new IllegalStateException("Cannot set integer value on attribute with different type, " +
					attribute.getClass().getName() + " setting value " + value);
		}
		((IntegerAttribute) attribute).setValue(value);
	}
1264537
public void setTypes(java.util.Collection<Type> types) {
        if (types == null) {
            this.types = null;
            return;
        }

        this.types = new java.util.ArrayList<Type>(types);
    }
1269846
@GET
    @Path("/typedef/name/{name}")
    @Produces(Servlets.JSON_MEDIA_TYPE)
    public AtlasBaseTypeDef getTypeDefByName(@PathParam("name") String name) throws AtlasBaseException {
        AtlasBaseTypeDef ret = typeDefStore.getByName(name);

        return ret;
    }
1105700
public void setTypeParts(String[] parts) {
        this.typeFinal = parts[0] != null;
        this.typeScope = parts[1];
        this.typeFull = parts[2];
        this.typeRaw = parts[3];
        if (parts[8] != null) {
            this.typeGenericName = new String[] {parts[4], parts[6], parts[8]};
            this.typeGenericExtends = new String[3];
            this.typeGenericExtends[0] = parts[5] != null ? parts[5] : "";
            this.typeGenericExtends[1] = parts[7] != null ? parts[7] : "";
            this.typeGenericExtends[2] = parts[9] != null ? parts[9] : "";
        } else if (parts[6] != null) {
            this.typeGenericName = new String[] {parts[4], parts[6]};
            this.typeGenericExtends = new String[2];
            this.typeGenericExtends[0] = parts[5] != null ? parts[5] : "";
            this.typeGenericExtends[1] = parts[7] != null ? parts[7] : "";
        } else if (parts[4] != null) {
            this.typeGenericName = new String[] {parts[4]};
            this.typeGenericExtends = new String[1];
            this.typeGenericExtends[0] = parts[5] != null ? parts[5] : "";
        } else {
            this.typeGenericName = new String[0];
            this.typeGenericExtends = new String[0];
        }
    }
950817
private static Map<TypeVariable<?>, Type> getTypeVariableMap(Class<?> type) {
        return getTypeVariableMap(type, new HashSet<Type>());
    }
850033
private NameInfo getNameInfoForName(String name, SymbolType type) {
    Map<String, NameInfo> map = type == PROPERTY ? propertyNameInfo : varNameInfo;
    if (map.containsKey(name)) {
      return map.get(name);
    } else {
      NameInfo nameInfo = new NameInfo(name);
      map.put(name, nameInfo);
      symbolGraph.createNode(nameInfo);
      return nameInfo;
    }
  }
780404
public void setNameAndType(String name, String type)
  {
    _nameAndTypeIndex = getConstantPool().addNameAndType(name, type).getIndex();
  }
116841
public void setXSDTypeName(String name) {
    this.xsdTypeName = name;
    Integer code = (Integer)JSBaseTypes.xsdTypeNames.get(name);
    if (code == null)
      throw new IllegalArgumentException("XSDTypeName=" + name);
    setTypeCode(code.intValue());
  }
24077
public final void addAttributes(final Map<String,String> attributes) {
        if(attributes != null) {
            this.attributes.putAll(attributes);
        }
    }
1166624
private Attributes toAttributes(Map<String,String> attrs){
        AttributesImpl impl = new AttributesImpl();
        for (Map.Entry<String,String> attr : attrs.entrySet()){
        	impl.addAttribute("", attr.getKey(), "", "CDATA", attr.getValue());
        }
        return impl;
    }