(1) A person commits an offence if -
(a) he collects, makes a record of, publishes, communicates or attempts to elicit information about a person to whom this section applies which is of a kind likely to be useful to a person committing or preparing an act of terrorism, or
(b) he possesses a document or record containing information of that kind.
(2) This section applies to a person who is or has been -
(a) a constable,
(b) a member of Her Majesty's Forces,
(c) the holder of a judicial office,
(d) an officer of any court, or
(e) employed in the prison service in Northern Ireland.
(3) In this section "record" includes a photographic or electronic record.
(4) If it is proved in proceedings for an offence under subsection (1)(b) that a document or record -
(a) was on any premises at the same time as the accused, or
(b) was on premises of which the accused was the occupier or which he habitually used otherwise than as a member of the public,