code: @SuppressWarnings("deprecation")
  	private AttributeDescriptor toDescriptor(AttributeInfo attrInfo) throws IllegalArgumentException {
  		if (attrInfo instanceof PrimitiveAttributeInfo) {
  			PrimitiveAttributeInfo pai = (PrimitiveAttributeInfo) attrInfo;
  			AttributeType type;
  			switch (pai.getType()) {
  				case BOOLEAN:
  					type = new PrimitiveAttributeTypeImpl(PrimitiveType.BOOLEAN);
  					break;
  				case DATE:
  					type = new PrimitiveAttributeTypeImpl(PrimitiveType.DATE);
  					break;
  				case CURRENCY:
  				case DOUBLE:
  					type = new PrimitiveAttributeTypeImpl(PrimitiveType.DOUBLE);
  					break;
  				case FLOAT:
  					type = new PrimitiveAttributeTypeImpl(PrimitiveType.FLOAT);
  					break;
  				case INTEGER:
  					type = new PrimitiveAttributeTypeImpl(PrimitiveType.INTEGER);
  					break;
  				case LONG:
  					type = new PrimitiveAttributeTypeImpl(PrimitiveType.LONG);
  					break;
  				case SHORT:
  					type = new PrimitiveAttributeTypeImpl(PrimitiveType.SHORT);
  					break;
  				case IMGURL:
  				case URL:
  				case STRING:
  				default:
  					type = new PrimitiveAttributeTypeImpl(PrimitiveType.STRING);
  					break;
  			}
  			return new AttributeDescriptorImpl(type, pai.getName());
  		}
  		return null;
  	}
docs: ------------------------------------------------------------------------