org.deidentifier.arx.aggregates

## Class HierarchyBuilderDate

- java.lang.Object
- - org.deidentifier.arx.aggregates.HierarchyBuilder<java.util.Date>
  - - org.deidentifier.arx.aggregates.HierarchyBuilderDate

All Implemented Interfaces:
  java.io.Serializable

    public class HierarchyBuilderDate
    extends HierarchyBuilder<java.util.Date>
    implements java.io.Serializable

This class enables building hierarchies for dates.

Author:
  Fabian Prasser
See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `HierarchyBuilderDate.Format` A format-class for localization
`static class` `HierarchyBuilderDate.Granularity` Granularity

### Nested classes/interfaces inherited from class org.deidentifier.arx.aggregates.HierarchyBuilder

`HierarchyBuilder.Type`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`AttributeType.Hierarchy` `build()` Creates a new hierarchy, based on the predefined specification.
`AttributeType.Hierarchy` `build(java.lang.String[] data)` Creates a new hierarchy, based on the predefined specification.
`static HierarchyBuilder<java.util.Date>` `create(DataType<java.util.Date> type, HierarchyBuilderDate.Granularity... granularities)` Creates an hierarchy reflecting the given granularities
`static HierarchyBuilder<java.util.Date>` `create(DataType<java.util.Date> type, java.util.TimeZone timeZone, HierarchyBuilderDate.Format format, java.util.Date bottomCoding, java.util.Date topCoding, HierarchyBuilderDate.Granularity... granularities)` Creates an hierarchy reflecting the given granularities
`static HierarchyBuilder<java.util.Date>` `create(DataType<java.util.Date> type, java.util.TimeZone timeZone, HierarchyBuilderDate.Format format, HierarchyBuilderDate.Granularity... granularities)` Creates an hierarchy reflecting the given granularities
`static HierarchyBuilder<java.util.Date>` `create(java.io.File file)` Loads a builder specification from the given file.
`java.util.Date` `getBottomCodingBound()`
`HierarchyBuilderDate.Format` `getFormat()`
`HierarchyBuilderDate.Granularity[]` `getGranularities()` Returns the granularities
`java.util.TimeZone` `getTimeZone()`
`java.util.Date` `getTopCodingBound()`
`int[]` `prepare(java.lang.String[] data)` Prepares the builder.
`void` `setBottomCodingBound(java.util.Date bottomCoding)`
`void` `setFormat(HierarchyBuilderDate.Format format)`
`void` `setGranularities(HierarchyBuilderDate.Granularity[] granularities)` Sets the granularities
`void` `setTimeZone(java.util.TimeZone timeZone)`
`void` `setTopCodingBound(java.util.Date topCoding)`

### Methods inherited from class org.deidentifier.arx.aggregates.HierarchyBuilder

`create, getType, save, save`

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

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

### Method Detail

#### create

    public static HierarchyBuilder<java.util.Date> create(DataType<java.util.Date> type,
                                                          HierarchyBuilderDate.Granularity... granularities)

Creates an hierarchy reflecting the given granularities

Parameters:
  `type` -
  `granularities` -
Returns:

#### create

    public static HierarchyBuilder<java.util.Date> create(DataType<java.util.Date> type,
                                                          java.util.TimeZone timeZone,
                                                          HierarchyBuilderDate.Format format,
                                                          HierarchyBuilderDate.Granularity... granularities)

Creates an hierarchy reflecting the given granularities

Parameters:
  `type` -
  `timeZone` -
  `granularities` -
Returns:

#### create

    public static HierarchyBuilder<java.util.Date> create(DataType<java.util.Date> type,
                                                          java.util.TimeZone timeZone,
                                                          HierarchyBuilderDate.Format format,
                                                          java.util.Date bottomCoding,
                                                          java.util.Date topCoding,
                                                          HierarchyBuilderDate.Granularity... granularities)

Creates an hierarchy reflecting the given granularities

Parameters:
  `type` -
  `timeZone` -
  `bottomCoding` -
  `topCoding` -
  `granularities` -
Returns:

#### create

    public static HierarchyBuilder<java.util.Date> create(java.io.File file)
                                                   throws java.io.IOException

Loads a builder specification from the given file.

Type Parameters:
  `T` -
Parameters:
  `file` -
Returns:
Throws:
  `java.io.IOException`

#### build

    public AttributeType.Hierarchy build()

Creates a new hierarchy, based on the predefined specification.

Specified by:
  `build` in class `HierarchyBuilder<java.util.Date>`
Returns:

#### build

    public AttributeType.Hierarchy build(java.lang.String[] data)

Creates a new hierarchy, based on the predefined specification.

Specified by:
  `build` in class `HierarchyBuilder<java.util.Date>`
Parameters:
  `data` -
Returns:

#### getBottomCodingBound

    public java.util.Date getBottomCodingBound()

Returns:
  the bottomCoding

#### getFormat

    public HierarchyBuilderDate.Format getFormat()

Returns:
  the format

#### getGranularities

    public HierarchyBuilderDate.Granularity[] getGranularities()

Returns the granularities

Returns:
  the granularities

#### getTimeZone

    public java.util.TimeZone getTimeZone()

Returns:
  the outputTimeZone

#### getTopCodingBound

    public java.util.Date getTopCodingBound()

Returns:
  the topCoding

#### prepare

    public int[] prepare(java.lang.String[] data)

Prepares the builder. Returns a list of the number of equivalence classes per level

Specified by:
  `prepare` in class `HierarchyBuilder<java.util.Date>`
Parameters:
  `data` -
Returns:

#### setBottomCodingBound

    public void setBottomCodingBound(java.util.Date bottomCoding)

Parameters:
  `bottomCoding` - the bottomCoding to set

#### setFormat

    public void setFormat(HierarchyBuilderDate.Format format)

Parameters:
  `format` - the format to set

#### setGranularities

    public void setGranularities(HierarchyBuilderDate.Granularity[] granularities)

Sets the granularities

Parameters:
  `granularities` -

#### setTimeZone

    public void setTimeZone(java.util.TimeZone timeZone)

Parameters:
  `timeZone` - the time zone to set

#### setTopCodingBound

    public void setTopCodingBound(java.util.Date topCoding)

Parameters:
  `topCoding` - the topCoding to set