根据 info 获取具体属性的值

@param info      info
@param attribute attribute name
@return attribute in info
766761
public static String getAttributeInInfo(String info, String attribute) {
        if (info == null || "".equals(info))
            return null;
        if (attribute == null || "".equals(attribute))
            return null;

        String[] infos = info.split("\r\n");

        for (String _info : infos) {
            if (_info.startsWith(attribute)) {
                String[] keyValue = _info.split(":");
                if (keyValue[0].equals(attribute))
                    return keyValue[1];
            }
        }

        return null;
    }
120317
public String getAttribute(String attributeName) {
		if (attributeName != null){
			return this.attributes.get(attributeName);
		}
		
		return null;
	}
845019
public final String getAttribute(String name)
	{
		synchronized (attributes) {
			for (final Iterator i = attributes.iterator(); i.hasNext();) {
				final Attribute a = (Attribute) i.next();
				if (a.getName().equals(name))
					return a.getValue();
			}
		}
		return null;
	}
60622
@SuppressWarnings("unchecked")
    public <T> T getAttribute( String attrName, Class<T> adaptee ) {
        if (attrName == null) {
            return null;
        }
        if (adaptee == null) {
            adaptee = (Class<T>) String.class;
        }

        Object attribute = feature.getAttribute(attrName);
        if (attribute == null) {
            return null;
        }
        if (attribute instanceof Number) {
            Number num = (Number) attribute;
            if (adaptee.isAssignableFrom(Double.class)) {
                return adaptee.cast(num.doubleValue());
            } else if (adaptee.isAssignableFrom(Float.class)) {
                return adaptee.cast(num.floatValue());
            } else if (adaptee.isAssignableFrom(Integer.class)) {
                return adaptee.cast(num.intValue());
            } else if (adaptee.isAssignableFrom(Long.class)) {
                return adaptee.cast(num.longValue());
            } else if (adaptee.isAssignableFrom(String.class)) {
                return adaptee.cast(num.toString());
            } else {
                throw new IllegalArgumentException();
            }
        } else if (attribute instanceof String) {
            if (adaptee.isAssignableFrom(Double.class)) {
                try {
                    Double parsed = Double.parseDouble((String) attribute);
                    return adaptee.cast(parsed);
                } catch (Exception e) {
                    return null;
                }
            } else if (adaptee.isAssignableFrom(Float.class)) {
                try {
                    Float parsed = Float.parseFloat((String) attribute);
                    return adaptee.cast(parsed);
                } catch (Exception e) {
                    return null;
                }
            } else if (adaptee.isAssignableFrom(Integer.class)) {
                try {
                    Integer parsed = Integer.parseInt((String) attribute);
                    return adaptee.cast(parsed);
                } catch (Exception e) {
                    return null;
                }
            } else if (adaptee.isAssignableFrom(String.class)) {
                return adaptee.cast(attribute);
            } else {
                throw new IllegalArgumentException();
            }
        } else if (attribute instanceof Geometry) {
            return null;
        } else {
            throw new IllegalArgumentException("Can't adapt attribute of type: " + attribute.getClass().getCanonicalName());
        }
    }
1119193
@Override
    public Object getAttributeValue(String name) {
        final List<Object> values = this.getAttributeValues(name);
        if (values != null && values.size() > 0) {
            return values.get(0);
        }

        return null;
    }
363009
public NameOpValue removeParam(String attribute) {
	if (_relations == null || attribute == null) return null;
	return (NameOpValue)_relations.remove(canonicalize(attribute));
    }
1087562
public <T> Attribute<T> attribute(AttributeDefinition<T> def) {
      Attribute<T> attribute = attribute(def.name());
      if (attribute != null)
         return attribute;
      else
         throw log.noSuchAttribute(def.name(), name);
   }
775490
public Object getAttribute(File file, String attribute) {
    String view = getViewName(attribute);
    String attr = getSingleAttribute(attribute);
    return getAttribute(file, view, attr);
  }
1368442
@Nonnull
    public Query addAttribute(@Nonnull QueryAttribute attribute) {
        attribute.setQuery(this);
        attributesByName.put(attribute.getName(), attribute);
        attributeNames = attributesByName.keySet().toArray(new String[0]);

        return this;
    }
332429
public Object getAttribute(Object object, String attribute) {
        return delegate.getAttribute(object, attribute);
    }
450478
public Attribute getAttributeByName(String name) {
		for (Attribute a : attributes)
			if (name.equals(a.getName()))
				return a;
		return null;
	}
500045
public Object getAttribute(String key) {
		Object result;
		if (attributes == null) {
			result = null;
		} else {
			result = attributes.get(key);
		}
		return result;
	}
232969
public Object getAttribute(File file, String view, String attribute) {
    Object value = getAttributeInternal(file, view, attribute);
    if (value == null) {
      throw new IllegalArgumentException("invalid attribute for view '" + view + "': " + attribute);
    }
    return value;
  }
45696
public Attribute getAttribute(String name)
  {
    ArrayList<Attribute> attributeList = getAttributeList();
    
    for (int i = attributeList.size() - 1; i >= 0; i--) {
      Attribute attr = attributeList.get(i);

      if (attr.getName().equals(name))
        return attr;
    }

    return null;
  }
150638
public void addAttribute(String attribute)
    {
        if(this.attributes == null)
            this.attributes = new ArrayList<String>();
        this.attributes.add(attribute);
    }
1086025
public static TagAttributeInfo getIdAttribute(TagAttributeInfo a[]) {
        for (int i=0; i<a.length; i++) {
            if (a[i].getName().equals(ID)) {
                return a[i];
            }
        }
        return null;		// no such attribute
    }
940070
public Object getAttributeValue(String name) throws IOException {
        ObjectIdentifier oid = PKCS9Attribute.getOID(name);

        if (oid == null)
            throw new IOException("Attribute name " + name +
                                  " not recognized or not supported.");

        return getAttributeValue(oid);
    }