public function setOutputStyle( $style )
  {
    $possibleStyles = array(
      self::STYLE_NESTED,
      self::STYLE_EXPANDED,
      self::STYLE_COMPACT,
      self::STYLE_COMPRESSED
    );

    if ( !in_array( $style, $possibleStyles ) )
    {
      throw new \Exception( 'Invalid output style specified.' );
    }

    $this->style = $style;

    return $this;
  }