private function promoteToPrimaryItem( $memberId, $parentId, &$newPrimaryItems, &$targetMembers, $targetRoleUri )
	{
		// Might have been promoted already because its also a child of another member
		if ( ! isset( $targetMembers[ $memberId ] ) ) return;

		if ( ! $parentId ) $parentId = $memberId;

		// Might already exist as a primary item
		if ( isset( $newPrimaryItems[ $memberId ] ) )
		{
			// In which case add a parent reference
			if ( $parentId != $memberId )
			{
				$newPrimaryItems[ $memberId ]['parents'][ $parentId ] = $targetMembers[ $memberId ]['parents'][ $parentId ];
			}
			$newPrimaryItems[ $memberId ]['roleUri'] = $targetRoleUri;
			return;
		}

		if ( ! isset( $newPrimaryItems[ $parentId ] ) )
		{
			XBRL_Log::getInstance()->warning( "Error trying to promote a member '$memberId' to primary item." );
			return;
		}

		$newPrimaryItems[ $memberId ] = array(
			'arcrole' => $targetMembers[ $memberId ]['parents'][ $parentId ]['arcrole'],
			'hypercubes' => array(), // $newPrimaryItems[ $parentId ]['hypercubes'],
			'parents' => array(
				$parentId => $targetMembers[ $memberId ]['parents'][ $parentId ],
			),
			'roleUri' => $targetRoleUri,
		);
	}