/**
 * Copyright © 2014 Jan Seeger
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.alphadev.ntfslib.structures.attributes;

public enum AttributeType {
    STANDARD_INFORMATION((byte) 0x10),
    ATTRIBUTE_LIST((byte) 0x20),
    FILE_NAME((byte) 0x30),

    /**
     * WinNt
     */
    VOLUME_VERSION((byte) 0x40),

    /**
     * Win2k
     */
    OBJECT_ID((byte) 0x40),
    SECURITY_DESCRIPTOR((byte) 0x50),
    VOLUME_NAME((byte) 0x60),
    VOLUME_INFORMATION((byte) 0x70),
    DATA((byte) 0x80),
    INDEX_ROOT((byte) 0x90),
    INDEX_ALLOCATION((byte) 0xa0),
    BITMAP((byte) 0xb0),

    /**
     * WinNt
     */
    SYMBOLIC_LINK((byte) 0xc0),

    /**
     * Win2k
     */
    REPARSE_POINT((byte) 0xc0),
    EA_INFORMATION((byte) 0xd0),
    EA((byte) 0xe0),

    /**
     * WinNt
     */
    PROPERTY_SET((byte) 0xf0),

    /**
     * Win2k
     */
    LOGGED_UTILITY_STREAM((byte) 0x100);

    private byte value;

    AttributeType(byte value) {
        this.value = value;
    }

    public byte getValue() {
        return value;
    }

    public static AttributeType parse(int value) {
        for (AttributeType type : AttributeType.values()) {
            if(value == type.getValue()) {
                return type;
            }
        }

        return null;
    }
}

@@ -697,23 +697,16 @@
 RMATION(
-(byte) 
 0x10),%0A 
@@ -723,23 +723,16 @@
 TE_LIST(
-(byte) 
 0x20),%0A 
@@ -748,114 +748,14 @@
 AME(
-(byte) 0x30),%0A%0A    /**%0A     * WinNt%0A     */%0A    VOLUME_VERSION((byte) 0x40),%0A%0A    /**%0A     * Win2k%0A     */
+0x30),
 %0A   
@@ -765,23 +765,16 @@
 JECT_ID(
-(byte) 
 0x40),%0A 
@@ -796,23 +796,16 @@
 CRIPTOR(
-(byte) 
 0x50),%0A 
@@ -819,23 +819,16 @@
 ME_NAME(
-(byte) 
 0x60),%0A 
@@ -849,23 +849,16 @@
 RMATION(
-(byte) 
 0x70),%0A 
@@ -865,23 +865,16 @@
    DATA(
-(byte) 
 0x80),%0A 
@@ -887,23 +887,16 @@
 EX_ROOT(
-(byte) 
 0x90),%0A 
@@ -915,23 +915,16 @@
 OCATION(
-(byte) 
 0xa0),%0A 
@@ -937,113 +937,14 @@
 MAP(
-(byte) 0xb0),%0A%0A    /**%0A     * WinNt%0A     */%0A    SYMBOLIC_LINK((byte) 0xc0),%0A%0A    /**%0A     * Win2k%0A     */
+0xb0),
 %0A   
@@ -958,23 +958,16 @@
 E_POINT(
-(byte) 
 0xc0),%0A 
@@ -984,23 +984,16 @@
 RMATION(
-(byte) 
 0xd0),%0A 
@@ -1002,51 +1002,106 @@
  EA(
-(byte) 0xe0),%0A%0A    /**%0A     * WinNt%0A     */
+0xe0),%0A    LOGGED_UTILITY_STREAM(0x100),%0A%0A    @Deprecated%0A    SYMBOLIC_LINK(0xc0),%0A    @Deprecated
 %0A   
@@ -1118,89 +1118,53 @@
 SET(
-(byte) 
 0xf0),%0A
-%0A
     
-/**%0A     * Win2k%0A     */%0A    LOGGED_UTILITY_STREAM((byte) 0x10
+@Deprecated%0A    VOLUME_VERSION(0x4
 0);%0A
@@ -1207,20 +1207,19 @@
 uteType(
-byte
+int
  value) 
@@ -1240,16 +1240,23 @@
 .value =
+ (byte)
  value;%0A

add deprecation annotation to AttributeTypes used in WinNt. fix #1