# AttributeType.Hierarchy (ARX GUI Documentation)

org.deidentifier.arx

## Class AttributeType.Hierarchy

- java.lang.Object
- - org.deidentifier.arx.AttributeType
  - - org.deidentifier.arx.AttributeType.Hierarchy

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    AttributeType.Hierarchy.DefaultHierarchy
  Enclosing class:
    AttributeType

      public abstract static class AttributeType.Hierarchy
      extends AttributeType
      implements java.io.Serializable

  This class implements a generalization hierarchy.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AttributeType.Hierarchy.DefaultHierarchy` The default implementation of a generalization hierarchy.

    - ### Nested classes/interfaces inherited from class org.deidentifier.arx.AttributeType

      `AttributeType.Hierarchy, AttributeType.MicroAggregationFunction, AttributeType.MicroAggregationFunctionDescription`

  - ### Field Summary

    - ### Fields inherited from class org.deidentifier.arx.AttributeType

      `ATTR_TYPE_ID, ATTR_TYPE_IS, ATTR_TYPE_QI, ATTR_TYPE_SE, IDENTIFYING_ATTRIBUTE, INSENSITIVE_ATTRIBUTE, MASK, QUASI_IDENTIFYING_ATTRIBUTE, SENSITIVE_ATTRIBUTE, SHIFT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AttributeType.Hierarchy()` Instantiates a new hierarchy.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract AttributeType.Hierarchy` | `clone()`
    `static AttributeType.Hierarchy.DefaultHierarchy` | `create()` Creates a new default hierarchy.
    `static AttributeType.Hierarchy` | `create(java.io.File file, java.nio.charset.Charset charset)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.File file, java.nio.charset.Charset charset, char delimiter)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote, char escape)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.File file, java.nio.charset.Charset charset, CSVSyntax config)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.InputStream stream, java.nio.charset.Charset charset)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote, char escape)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.io.InputStream stream, java.nio.charset.Charset charset, CSVSyntax config)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.util.Iterator<java.lang.String[]> iterator)` Creates a new hierarchy from an iterator over tuples.
    `static AttributeType.Hierarchy` | `create(java.util.List<java.lang.String[]> list)` Creates a new hierarchy from a list.
    `static AttributeType.Hierarchy` | `create(java.lang.String[][] array)` Creates a new hierarchy from a two-dimensional string array.
    `static AttributeType.Hierarchy` | `create(java.lang.String path, java.nio.charset.Charset charset, char separator)` Creates a new hierarchy from a CSV file.
    `static AttributeType.Hierarchy` | `create(java.lang.String path, java.nio.charset.Charset charset, CSVSyntax config)` Creates a new hierarchy from a CSV file.
    `abstract java.lang.String[][]` | `getHierarchy()` Returns the hierarchy as a two-dimensional string array.
    `void` | `save(java.io.File file)` Writes the hierarchy to a CSV file.
    `void` | `save(java.io.File file, char delimiter)` Writes the hierarchy to a CSV file.
    `void` | `save(java.io.File file, CSVSyntax config)` Writes the hierarchy to a CSV file.
    `void` | `save(java.io.OutputStream out)` Writes the hierarchy to a CSV file.
    `void` | `save(java.io.OutputStream out, char delimiter)` Writes the hierarchy to a CSV file.
    `void` | `save(java.io.OutputStream out, CSVSyntax config)` Writes the hierarchy to a CSV file.
    `void` | `save(java.lang.String path)` Writes the hierarchy to a CSV file.
    `void` | `save(java.lang.String path, char delimiter)` Writes the hierarchy to a CSV file.
    `void` | `save(java.lang.String path, CSVSyntax config)` Writes the hierarchy to a CSV file.

    - ### Methods inherited from class org.deidentifier.arx.AttributeType

      `getType, listMicroAggregationFunctions, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AttributeType.Hierarchy

          public AttributeType.Hierarchy()

      Instantiates a new hierarchy.

  - ### Method Detail

    - #### create

          public static AttributeType.Hierarchy.DefaultHierarchy create()

      Creates a new default hierarchy.
      Returns:
        A Hierarchy

    - #### create

          public static AttributeType.Hierarchy create(java.io.File file,
                                       java.nio.charset.Charset charset)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `file` - the file
        `charset` - the charset
      Returns:
        the hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.File file,
                                       java.nio.charset.Charset charset,
                                       char delimiter)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `file` - A file
        `delimiter` - The utilized separator character
      Returns:
        A Hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.File file,
                                       java.nio.charset.Charset charset,
                                       char delimiter,
                                       char quote)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `file` - the file
        `charset` - the charset
        `delimiter` - the delimiter
        `quote` - the quote
      Returns:
        the hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.File file,
                                       java.nio.charset.Charset charset,
                                       char delimiter,
                                       char quote,
                                       char escape)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `file` - the file
        `charset` - the charset
        `delimiter` - the delimiter
        `quote` - the quote
        `escape` - the escape
      Returns:
        the hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.File file,
                                       java.nio.charset.Charset charset,
                                       char delimiter,
                                       char quote,
                                       char escape,
                                       char[] linebreak)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `file` - the file
        `charset` - the charset
        `delimiter` - the delimiter
        `quote` - the quote
        `escape` - the escape
        `linebreak` - the linebreak
      Returns:
        the hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.File file,
                                       java.nio.charset.Charset charset,
                                       CSVSyntax config)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `file` -
        `config` -
      Returns:
      Throws:
        `java.io.IOException`

    - #### create

          public static AttributeType.Hierarchy create(java.io.InputStream stream,
                                       java.nio.charset.Charset charset)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `stream` - the stream
      Returns:
        the hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.InputStream stream,
                                       java.nio.charset.Charset charset,
                                       char delimiter)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `stream` - An input stream
        `charset` - the charset
        `delimiter` - The utilized separator character
      Returns:
        A Hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.InputStream stream,
                                       java.nio.charset.Charset charset,
                                       char delimiter,
                                       char quote)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `stream` - the stream
        `charset` - the charset
        `delimiter` - the delimiter
        `quote` - the quote
      Returns:
        the hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.InputStream stream,
                                       java.nio.charset.Charset charset,
                                       char delimiter,
                                       char quote,
                                       char escape)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `stream` - the stream
        `charset` - the charset
        `delimiter` - the delimiter
        `quote` - the quote
        `escape` - the escape
      Returns:
        the hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.InputStream stream,
                                       java.nio.charset.Charset charset,
                                       char delimiter,
                                       char quote,
                                       char escape,
                                       char[] linebreak)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `stream` - the stream
        `charset` - the charset
        `delimiter` - the delimiter
        `quote` - the quote
        `escape` - the escape
        `linebreak` - the linebreak
      Returns:
        the hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.io.InputStream stream,
                                       java.nio.charset.Charset charset,
                                       CSVSyntax config)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `stream` -
        `charset` -
        `config` -
      Returns:
      Throws:
        `java.io.IOException`

    - #### create

          public static AttributeType.Hierarchy create(java.util.Iterator<java.lang.String[]> iterator)

      Creates a new hierarchy from an iterator over tuples.
      Parameters:
        `iterator` - An iterator
      Returns:
        A Hierarchy

    - #### create

          public static AttributeType.Hierarchy create(java.util.List<java.lang.String[]> list)

      Creates a new hierarchy from a list.
      Parameters:
        `list` - The list
      Returns:
        A Hierarchy

    - #### create

          public static AttributeType.Hierarchy create(java.lang.String path,
                                       java.nio.charset.Charset charset,
                                       char separator)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `path` - A path to the file
        `charset` - the charset
        `separator` - The utilized separator character
      Returns:
        A Hierarchy
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### create

          public static AttributeType.Hierarchy create(java.lang.String path,
                                       java.nio.charset.Charset charset,
                                       CSVSyntax config)
                                                throws java.io.IOException

      Creates a new hierarchy from a CSV file.
      Parameters:
        `path` -
        `charset` -
        `config` -
      Returns:
      Throws:
        `java.io.IOException`

    - #### create

          public static AttributeType.Hierarchy create(java.lang.String[][] array)

      Creates a new hierarchy from a two-dimensional string array.
      Parameters:
        `array` - The array
      Returns:
        A Hierarchy

    - #### clone

          public abstract AttributeType.Hierarchy clone()

      Overrides:
        `clone` in class `AttributeType`

    - #### getHierarchy

          public abstract java.lang.String[][] getHierarchy()

      Returns the hierarchy as a two-dimensional string array.
      Returns:
        the hierarchy

    - #### save

          public void save(java.io.File file)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `file` - the file
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### save

          public void save(java.io.File file,
                  char delimiter)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `file` - A file
        `delimiter` - The utilized separator character
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### save

          public void save(java.io.File file,
                  CSVSyntax config)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `file` - the file
        `config` - the config
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### save

          public void save(java.io.OutputStream out)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `out` - the out
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### save

          public void save(java.io.OutputStream out,
                  char delimiter)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `out` - A output stream
        `delimiter` - The utilized separator character
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### save

          public void save(java.io.OutputStream out,
                  CSVSyntax config)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `out` - the out
        `config` - the config
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### save

          public void save(java.lang.String path)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `path` - the path
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### save

          public void save(java.lang.String path,
                  char delimiter)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `path` - A path
        `delimiter` - The utilized separator character
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### save

          public void save(java.lang.String path,
                  CSVSyntax config)
                    throws java.io.IOException

      Writes the hierarchy to a CSV file.
      Parameters:
        `path` - the path
        `config` - the config
      Throws:
        `java.io.IOException` - Signals that an I/O exception has occurred.