@Test public void testConvertToEdmSimpleType() { String str = "entity"; byte[] byteArr = new byte[3]; Long longObj = new Long(0); Short shortObj = new Short((short) 0); Integer integerObj = new Integer(0); Double doubleObj = new Double(0); Float floatObj = new Float(0); BigDecimal bigDecimalObj = new BigDecimal(0); Byte byteObj = new Byte((byte) 0); Boolean booleanObj = Boolean.TRUE; UUID uUID = new UUID(0, 0); SomeEnum someEnum = SomeEnum.TEST; Character charObj = new Character('c'); try { edmSimpleKindTypeString = JPATypeConverter.convertToEdmSimpleType(str.getClass(), null); edmSimpleKindTypeByteArr = JPATypeConverter.convertToEdmSimpleType(byteArr.getClass(), null); edmSimpleKindTypeLong = JPATypeConverter.convertToEdmSimpleType(longObj.getClass(), null); edmSimpleKindTypeShort = JPATypeConverter.convertToEdmSimpleType(shortObj.getClass(), null); edmSimpleKindTypeInteger = JPATypeConverter.convertToEdmSimpleType(integerObj.getClass(), null); edmSimpleKindTypeDouble = JPATypeConverter.convertToEdmSimpleType(doubleObj.getClass(), null); edmSimpleKindTypeFloat = JPATypeConverter.convertToEdmSimpleType(floatObj.getClass(), null); edmSimpleKindTypeBigDecimal = JPATypeConverter.convertToEdmSimpleType(bigDecimalObj.getClass(), null); edmSimpleKindTypeByte = JPATypeConverter.convertToEdmSimpleType(byteObj.getClass(), null); edmSimpleKindTypeBoolean = JPATypeConverter.convertToEdmSimpleType(booleanObj.getClass(), null); edmSimpleKindTypeStringFromEnum = JPATypeConverter.convertToEdmSimpleType(someEnum.getClass(), null); edmSimpleKindTypeCharacter = JPATypeConverter.convertToEdmSimpleType(charObj.getClass(), null); edmSimpleKindTypeUUID = JPATypeConverter.convertToEdmSimpleType(uUID.getClass(), null); } catch (ODataJPAModelException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } assertEquals(EdmSimpleTypeKind.String, edmSimpleKindTypeString); assertEquals(EdmSimpleTypeKind.Binary, edmSimpleKindTypeByteArr); assertEquals(EdmSimpleTypeKind.Int64, edmSimpleKindTypeLong); assertEquals(EdmSimpleTypeKind.Int16, edmSimpleKindTypeShort); assertEquals(EdmSimpleTypeKind.Int32, edmSimpleKindTypeInteger); assertEquals(EdmSimpleTypeKind.Double, edmSimpleKindTypeDouble); assertEquals(EdmSimpleTypeKind.Single, edmSimpleKindTypeFloat); assertEquals(EdmSimpleTypeKind.Decimal, edmSimpleKindTypeBigDecimal); assertEquals(EdmSimpleTypeKind.Byte, edmSimpleKindTypeByte); assertEquals(EdmSimpleTypeKind.Boolean, edmSimpleKindTypeBoolean); assertEquals(EdmSimpleTypeKind.String, edmSimpleKindTypeCharacter); assertEquals(EdmSimpleTypeKind.Guid, edmSimpleKindTypeUUID); assertEquals(EdmSimpleTypeKind.String, edmSimpleKindTypeStringFromEnum); }
public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class) || jpaType.equals(Character.class) || jpaType.equals(char.class) || jpaType.equals(char[].class) || jpaType.equals(Character[].class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return EdmSimpleTypeKind.Int64; } else if (jpaType.equals(Short.class) || jpaType.equals(short.class)) { return EdmSimpleTypeKind.Int16; } else if (jpaType.equals(Integer.class) || jpaType.equals(int.class)) { return EdmSimpleTypeKind.Int32; } else if (jpaType.equals(Double.class) || jpaType.equals(double.class)) { return EdmSimpleTypeKind.Double; } else if (jpaType.equals(Float.class) || jpaType.equals(float.class)) { return EdmSimpleTypeKind.Single; } else if (jpaType.equals(BigDecimal.class)) { return EdmSimpleTypeKind.Decimal; } else if (jpaType.equals(byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Byte.class) || jpaType.equals(byte.class)) { return EdmSimpleTypeKind.Byte; } else if (jpaType.equals(Boolean.class) || jpaType.equals(boolean.class)) { return EdmSimpleTypeKind.Boolean; } else if (jpaType.equals(java.sql.Time.class)) { return EdmSimpleTypeKind.Time; } else if (jpaType.equals(Date.class) || jpaType.equals(Calendar.class) || jpaType.equals(Timestamp.class) || jpaType.equals(java.util.Date.class)) { try { if ((currentAttribute != null) && (determineTemporalType(currentAttribute) == TemporalType.TIME)) { return EdmSimpleTypeKind.Time; } else { return EdmSimpleTypeKind.DateTime; } } catch (SecurityException e) { throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } else if (jpaType.equals(UUID.class)) { return EdmSimpleTypeKind.Guid; } else if (jpaType.equals(Byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Blob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Clob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.String; } else if (jpaType.isEnum()) { return EdmSimpleTypeKind.String; } else { if(currentAttribute == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String propertyName = currentAttribute.getName(); if(propertyName == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String getterName = "get"+propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); try { Method method = currentAttribute.getDeclaringType().getJavaType().getMethod(getterName); XmlJavaTypeAdapter xmlAdapterAnnotation = method.getAnnotation(XmlJavaTypeAdapter.class); if(xmlAdapterAnnotation == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } @SuppressWarnings("unchecked") Class<XmlAdapter<?,?>> xmlAdapterClass = (Class<XmlAdapter<?, ?>>) xmlAdapterAnnotation.value(); ParameterizedType genericSuperClass = (ParameterizedType) xmlAdapterClass.getGenericSuperclass(); Class<?> converterTargetType = (Class<?>) genericSuperClass.getActualTypeArguments()[0]; return convertToEdmSimpleType(converterTargetType, currentAttribute); } catch (NoSuchMethodException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } catch (SecurityException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } }
JPATypeConverter { public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class) || jpaType.equals(Character.class) || jpaType.equals(char.class) || jpaType.equals(char[].class) || jpaType.equals(Character[].class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return EdmSimpleTypeKind.Int64; } else if (jpaType.equals(Short.class) || jpaType.equals(short.class)) { return EdmSimpleTypeKind.Int16; } else if (jpaType.equals(Integer.class) || jpaType.equals(int.class)) { return EdmSimpleTypeKind.Int32; } else if (jpaType.equals(Double.class) || jpaType.equals(double.class)) { return EdmSimpleTypeKind.Double; } else if (jpaType.equals(Float.class) || jpaType.equals(float.class)) { return EdmSimpleTypeKind.Single; } else if (jpaType.equals(BigDecimal.class)) { return EdmSimpleTypeKind.Decimal; } else if (jpaType.equals(byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Byte.class) || jpaType.equals(byte.class)) { return EdmSimpleTypeKind.Byte; } else if (jpaType.equals(Boolean.class) || jpaType.equals(boolean.class)) { return EdmSimpleTypeKind.Boolean; } else if (jpaType.equals(java.sql.Time.class)) { return EdmSimpleTypeKind.Time; } else if (jpaType.equals(Date.class) || jpaType.equals(Calendar.class) || jpaType.equals(Timestamp.class) || jpaType.equals(java.util.Date.class)) { try { if ((currentAttribute != null) && (determineTemporalType(currentAttribute) == TemporalType.TIME)) { return EdmSimpleTypeKind.Time; } else { return EdmSimpleTypeKind.DateTime; } } catch (SecurityException e) { throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } else if (jpaType.equals(UUID.class)) { return EdmSimpleTypeKind.Guid; } else if (jpaType.equals(Byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Blob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Clob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.String; } else if (jpaType.isEnum()) { return EdmSimpleTypeKind.String; } else { if(currentAttribute == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String propertyName = currentAttribute.getName(); if(propertyName == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String getterName = "get"+propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); try { Method method = currentAttribute.getDeclaringType().getJavaType().getMethod(getterName); XmlJavaTypeAdapter xmlAdapterAnnotation = method.getAnnotation(XmlJavaTypeAdapter.class); if(xmlAdapterAnnotation == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } @SuppressWarnings("unchecked") Class<XmlAdapter<?,?>> xmlAdapterClass = (Class<XmlAdapter<?, ?>>) xmlAdapterAnnotation.value(); ParameterizedType genericSuperClass = (ParameterizedType) xmlAdapterClass.getGenericSuperclass(); Class<?> converterTargetType = (Class<?>) genericSuperClass.getActualTypeArguments()[0]; return convertToEdmSimpleType(converterTargetType, currentAttribute); } catch (NoSuchMethodException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } catch (SecurityException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } } }
JPATypeConverter { public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class) || jpaType.equals(Character.class) || jpaType.equals(char.class) || jpaType.equals(char[].class) || jpaType.equals(Character[].class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return EdmSimpleTypeKind.Int64; } else if (jpaType.equals(Short.class) || jpaType.equals(short.class)) { return EdmSimpleTypeKind.Int16; } else if (jpaType.equals(Integer.class) || jpaType.equals(int.class)) { return EdmSimpleTypeKind.Int32; } else if (jpaType.equals(Double.class) || jpaType.equals(double.class)) { return EdmSimpleTypeKind.Double; } else if (jpaType.equals(Float.class) || jpaType.equals(float.class)) { return EdmSimpleTypeKind.Single; } else if (jpaType.equals(BigDecimal.class)) { return EdmSimpleTypeKind.Decimal; } else if (jpaType.equals(byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Byte.class) || jpaType.equals(byte.class)) { return EdmSimpleTypeKind.Byte; } else if (jpaType.equals(Boolean.class) || jpaType.equals(boolean.class)) { return EdmSimpleTypeKind.Boolean; } else if (jpaType.equals(java.sql.Time.class)) { return EdmSimpleTypeKind.Time; } else if (jpaType.equals(Date.class) || jpaType.equals(Calendar.class) || jpaType.equals(Timestamp.class) || jpaType.equals(java.util.Date.class)) { try { if ((currentAttribute != null) && (determineTemporalType(currentAttribute) == TemporalType.TIME)) { return EdmSimpleTypeKind.Time; } else { return EdmSimpleTypeKind.DateTime; } } catch (SecurityException e) { throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } else if (jpaType.equals(UUID.class)) { return EdmSimpleTypeKind.Guid; } else if (jpaType.equals(Byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Blob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Clob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.String; } else if (jpaType.isEnum()) { return EdmSimpleTypeKind.String; } else { if(currentAttribute == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String propertyName = currentAttribute.getName(); if(propertyName == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String getterName = "get"+propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); try { Method method = currentAttribute.getDeclaringType().getJavaType().getMethod(getterName); XmlJavaTypeAdapter xmlAdapterAnnotation = method.getAnnotation(XmlJavaTypeAdapter.class); if(xmlAdapterAnnotation == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } @SuppressWarnings("unchecked") Class<XmlAdapter<?,?>> xmlAdapterClass = (Class<XmlAdapter<?, ?>>) xmlAdapterAnnotation.value(); ParameterizedType genericSuperClass = (ParameterizedType) xmlAdapterClass.getGenericSuperclass(); Class<?> converterTargetType = (Class<?>) genericSuperClass.getActualTypeArguments()[0]; return convertToEdmSimpleType(converterTargetType, currentAttribute); } catch (NoSuchMethodException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } catch (SecurityException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } }  }
JPATypeConverter { public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class) || jpaType.equals(Character.class) || jpaType.equals(char.class) || jpaType.equals(char[].class) || jpaType.equals(Character[].class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return EdmSimpleTypeKind.Int64; } else if (jpaType.equals(Short.class) || jpaType.equals(short.class)) { return EdmSimpleTypeKind.Int16; } else if (jpaType.equals(Integer.class) || jpaType.equals(int.class)) { return EdmSimpleTypeKind.Int32; } else if (jpaType.equals(Double.class) || jpaType.equals(double.class)) { return EdmSimpleTypeKind.Double; } else if (jpaType.equals(Float.class) || jpaType.equals(float.class)) { return EdmSimpleTypeKind.Single; } else if (jpaType.equals(BigDecimal.class)) { return EdmSimpleTypeKind.Decimal; } else if (jpaType.equals(byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Byte.class) || jpaType.equals(byte.class)) { return EdmSimpleTypeKind.Byte; } else if (jpaType.equals(Boolean.class) || jpaType.equals(boolean.class)) { return EdmSimpleTypeKind.Boolean; } else if (jpaType.equals(java.sql.Time.class)) { return EdmSimpleTypeKind.Time; } else if (jpaType.equals(Date.class) || jpaType.equals(Calendar.class) || jpaType.equals(Timestamp.class) || jpaType.equals(java.util.Date.class)) { try { if ((currentAttribute != null) && (determineTemporalType(currentAttribute) == TemporalType.TIME)) { return EdmSimpleTypeKind.Time; } else { return EdmSimpleTypeKind.DateTime; } } catch (SecurityException e) { throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } else if (jpaType.equals(UUID.class)) { return EdmSimpleTypeKind.Guid; } else if (jpaType.equals(Byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Blob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Clob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.String; } else if (jpaType.isEnum()) { return EdmSimpleTypeKind.String; } else { if(currentAttribute == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String propertyName = currentAttribute.getName(); if(propertyName == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String getterName = "get"+propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); try { Method method = currentAttribute.getDeclaringType().getJavaType().getMethod(getterName); XmlJavaTypeAdapter xmlAdapterAnnotation = method.getAnnotation(XmlJavaTypeAdapter.class); if(xmlAdapterAnnotation == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } @SuppressWarnings("unchecked") Class<XmlAdapter<?,?>> xmlAdapterClass = (Class<XmlAdapter<?, ?>>) xmlAdapterAnnotation.value(); ParameterizedType genericSuperClass = (ParameterizedType) xmlAdapterClass.getGenericSuperclass(); Class<?> converterTargetType = (Class<?>) genericSuperClass.getActualTypeArguments()[0]; return convertToEdmSimpleType(converterTargetType, currentAttribute); } catch (NoSuchMethodException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } catch (SecurityException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } }  static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute); }
JPATypeConverter { public static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute) throws ODataJPAModelException { if (jpaType.equals(String.class) || jpaType.equals(Character.class) || jpaType.equals(char.class) || jpaType.equals(char[].class) || jpaType.equals(Character[].class)) { return EdmSimpleTypeKind.String; } else if (jpaType.equals(Long.class) || jpaType.equals(long.class)) { return EdmSimpleTypeKind.Int64; } else if (jpaType.equals(Short.class) || jpaType.equals(short.class)) { return EdmSimpleTypeKind.Int16; } else if (jpaType.equals(Integer.class) || jpaType.equals(int.class)) { return EdmSimpleTypeKind.Int32; } else if (jpaType.equals(Double.class) || jpaType.equals(double.class)) { return EdmSimpleTypeKind.Double; } else if (jpaType.equals(Float.class) || jpaType.equals(float.class)) { return EdmSimpleTypeKind.Single; } else if (jpaType.equals(BigDecimal.class)) { return EdmSimpleTypeKind.Decimal; } else if (jpaType.equals(byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Byte.class) || jpaType.equals(byte.class)) { return EdmSimpleTypeKind.Byte; } else if (jpaType.equals(Boolean.class) || jpaType.equals(boolean.class)) { return EdmSimpleTypeKind.Boolean; } else if (jpaType.equals(java.sql.Time.class)) { return EdmSimpleTypeKind.Time; } else if (jpaType.equals(Date.class) || jpaType.equals(Calendar.class) || jpaType.equals(Timestamp.class) || jpaType.equals(java.util.Date.class)) { try { if ((currentAttribute != null) && (determineTemporalType(currentAttribute) == TemporalType.TIME)) { return EdmSimpleTypeKind.Time; } else { return EdmSimpleTypeKind.DateTime; } } catch (SecurityException e) { throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } else if (jpaType.equals(UUID.class)) { return EdmSimpleTypeKind.Guid; } else if (jpaType.equals(Byte[].class)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Blob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.Binary; } else if (jpaType.equals(Clob.class) && isBlob(currentAttribute)) { return EdmSimpleTypeKind.String; } else if (jpaType.isEnum()) { return EdmSimpleTypeKind.String; } else { if(currentAttribute == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String propertyName = currentAttribute.getName(); if(propertyName == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } String getterName = "get"+propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); try { Method method = currentAttribute.getDeclaringType().getJavaType().getMethod(getterName); XmlJavaTypeAdapter xmlAdapterAnnotation = method.getAnnotation(XmlJavaTypeAdapter.class); if(xmlAdapterAnnotation == null) { throw ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED .addContent(jpaType.toString()), null); } @SuppressWarnings("unchecked") Class<XmlAdapter<?,?>> xmlAdapterClass = (Class<XmlAdapter<?, ?>>) xmlAdapterAnnotation.value(); ParameterizedType genericSuperClass = (ParameterizedType) xmlAdapterClass.getGenericSuperclass(); Class<?> converterTargetType = (Class<?>) genericSuperClass.getActualTypeArguments()[0]; return convertToEdmSimpleType(converterTargetType, currentAttribute); } catch (NoSuchMethodException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } catch (SecurityException e) { throw ODataJPAModelException.throwException( ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } } }  static EdmSimpleTypeKind convertToEdmSimpleType(final Class<?> jpaType, final Attribute<?, ?> currentAttribute);  }