Read a single field alias from an extended attribute.

@param attribute extended attribute
553438
private void readFieldAlias(Project.ExtendedAttributes.ExtendedAttribute attribute)
   {
      String alias = attribute.getAlias();
      if (alias != null && alias.length() != 0)
      {
         FieldType field = FieldTypeHelper.getInstance(Integer.parseInt(attribute.getFieldID()));
         m_projectFile.getCustomFields().getCustomField(field).setAlias(attribute.getAlias());
      }
   }
857089
public void setAttribute(final String name, final Attribute attribute) {
        if (name.equals(MAP_KEY)) {
            this.mapAttribute = (MapAttribute) attribute;
        }
    }
24
@Api
	public void getValue(String name, ShortAttribute attribute) {
		attribute.setValue(toShort(formWidget.getValue(name)));
	}
1093903
def _resolve_attribute(self, attribute):
        
        value = self.attributes[attribute]
        if not value:
            return None
        resolved_value = re.sub('\$\((.*?)\)',self._resolve_attribute_match, value)
        return resolved_value
734197
def p_ExtendedAttributeNoArgs(p):
  """"""
  p[0] = model.ExtendedAttribute(
    value=model.ExtendedAttributeValue(name=p[1]))
256370
@Api
	public void getValue(String name, LongAttribute attribute) {
		attribute.setValue(toLong(formWidget.getValue(name)));
	}
583604
def getAttributeQName(self, attribute):
        
        qname = self.getAttribute(attribute)
        if isinstance(qname, TypeDescriptionComponent) is True:
            return qname
        if qname is None:
            return None

        prefix,ncname = SplitQName(qname)
        namespace = self.getXMLNS(prefix)
        return TypeDescriptionComponent((namespace,ncname))
650855
public String readString(String attribute)
    {
        final String value = getValue(attribute);
        if (NULL.equals(value))
        {
            return null;
        }
        return value;
    }
869897
private static int convertAttributeToInt(final String attribute) {
        if (attribute == null) {
            return 0;
        }

        try {
            return Integer.parseInt(attribute);
        } catch (final Exception ignore) {
            return 0;
        }
    }
1240092
public void validateAttribute(String attribute) throws CompatibilityException {
                try {
                        super.validateObject(attribute);
                } catch (CompatibilityException e) {
                        throw new CompatibilityException("Unknown attribute: " + attribute, e);
                }
        }
1301316
private int getTTLForColumn(Object columnTTLs, Attribute attribute)
    {
        Integer ttl = null;
        if (columnTTLs != null)
        {
            if (columnTTLs instanceof Map)
            {
                ttl = (Integer) (columnTTLs == null ? 0 : ((Map) columnTTLs).get(((AbstractAttribute) attribute)
                        .getJPAColumnName()));
            }
            else if (columnTTLs instanceof Integer)
            {
                ttl = (Integer) columnTTLs;
            }
        }
        return ttl == null ? 0 : ttl;
    }
782545
def read_attribute(attribute)
      id = attribute.at_xpath('./cda:id/@root', NAMESPACES).try(:value)
      code = attribute.at_xpath('./cda:code/@code', NAMESPACES).try(:value)
      name = attribute.at_xpath('./cda:code/cda:displayName/@value', NAMESPACES).try(:value)
      value = attribute.at_xpath('./cda:value/@value', NAMESPACES).try(:value)

      id_obj = nil
      if attribute.at_xpath('./cda:id', NAMESPACES)
        id_obj = HQMF::Identifier.new(attribute.at_xpath('./cda:id/@xsi:type', NAMESPACES).try(:value),
                                      id,
                                      attribute.at_xpath('./cda:id/@extension', NAMESPACES).try(:value))
      end

      code_obj = nil
      if attribute.at_xpath('./cda:code', NAMESPACES)
        code_obj, null_flavor, o_text = handle_attribute_code(attribute, code, name)

        # Mapping for nil values to align with 1.0 parsing
        code = null_flavor if code.nil?
        name = o_text if name.nil?

      end

      value_obj = nil
      value_obj = handle_attribute_value(attribute, value) if attribute.at_xpath('./cda:value', NAMESPACES)

      # Handle the cms_id - changed to eCQM in MAT 5.4 (QDM 5.3)
      @cms_id = "CMS#{value}v#{@hqmf_version_number.to_i}" if name&.start_with?('eMeasure Identifier', 'eCQM Identifier')

      HQMF::Attribute.new(id, code, value, nil, name, id_obj, code_obj, value_obj)
    end
271102
void convertWith(Converter converter, String attribute) {
        List<Converter> list = attributeConverters.get(attribute);
        if (list == null) {
            list = new ArrayList<>();
            attributeConverters.put(attribute, list);
        }
        list.add(converter);
    }
110676
public <T> void addColumn(Attribute<T, ?> attribute) {
        try (Connection connection = getConnection()) {
            addColumn(connection, attribute);
        } catch (SQLException e) {
            throw new TableModificationException(e);
        }
    }
121444
static void extractFieldValue(Object entity, DBObject dbObj, Attribute column) throws PropertyAccessException
    {
        try
        {
            Object valueObject = PropertyAccessorHelper.getObject(entity, (Field) column.getJavaMember());

            if (valueObject != null)
            {
                Class javaType = column.getJavaType();
                switch (AttributeType.getType(javaType))
                {
                case MAP:
                    Map mapObj = (Map) valueObject;
                    // BasicDBObjectBuilder builder =
                    // BasicDBObjectBuilder.start(mapObj);
                    BasicDBObjectBuilder b = new BasicDBObjectBuilder();
                    Iterator i = mapObj.entrySet().iterator();
                    while (i.hasNext())
                    {
                        Map.Entry entry = (Map.Entry) i.next();
                        b.add(entry.getKey().toString(),
                                MongoDBUtils.populateValue(entry.getValue(), entry.getValue().getClass()));
                    }
                    dbObj.put(((AbstractAttribute) column).getJPAColumnName(), b.get());
                    break;
                case SET:
                case LIST:
                    Collection collection = (Collection) valueObject;
                    BasicDBList basicDBList = new BasicDBList();
                    for (Object o : collection)
                    {
                        basicDBList.add(o);
                    }
                    dbObj.put(((AbstractAttribute) column).getJPAColumnName(), basicDBList);
                    break;
                case POINT:

                    Point p = (Point) valueObject;
                    double[] coordinate = new double[] { p.getX(), p.getY() };
                    dbObj.put(((AbstractAttribute) column).getJPAColumnName(), coordinate);
                    break;
                case ENUM:
                case PRIMITIVE:
                    dbObj.put(((AbstractAttribute) column).getJPAColumnName(),
                            MongoDBUtils.populateValue(valueObject, javaType));
                    break;
                }
            }
        }
        catch (PropertyAccessException paex)
        {
            log.error("Error while getting column {} value, caused by : .",
                    ((AbstractAttribute) column).getJPAColumnName(), paex);
            throw new PersistenceException(paex);
        }
    }
45013
protected function takeAttributeFromDOM($attribute)
    {
        switch ($attribute->localName) {
            case 'name':
                $name = explode(':', $attribute->nodeValue);
                $this->_name = end($name);
                break;
            case 'value':
                $this->_value = $attribute->nodeValue;
                break;
            default:
                parent::takeAttributeFromDOM($attribute);
        }
    }
730288
boolean hasAttribute(String attribute) {
        if(columnMetadata != null){
            if(columnMetadata.containsKey(attribute)){
                return true;
            }else if(attribute.startsWith("\"") && attribute.endsWith("\"")){
                return columnMetadata.containsKey(attribute.substring(1, attribute.length() - 1));
            }
        }
        return false;
    }