Class Statistics

java.lang.Object
eu.bandm.tools.dtd.Statistics

public class Statistics extends Object
Collects and analyses references between elements, attlists and entities. Searches for common attributes and possible abstract declarations. Offers some printstream-based visualisation of the results.

For simplicity, all result fields are declared "public", but meant only to be read. (Since these statistic data is mostly for information purpose, protection mechanisms seem an over-do. Every map and every set would be wrapped into an "immutable" one, etc.!)

Sets/maps which do MIX elements, GEs, PEs, etc., represent all those by their "canonical key", see Utilities.canonicalKey_element(String), Utilities.canonicalKey_attribute(String) and Utilities.canonicalKey_entity(String,boolean).

The same encoding has already been employed by the TunedDTDParser when the field DTD.Dtd.entityUsage is filled. It collects all references to PEs and GEs from Element content models (PE only), attribute lists(PE), attribute value contents(GE), PE definition text (PE / GE) and GE definition text (GE):

The statistic data heavily relies on this field, and on the partial analyses done by ElementIndex and AttlistIndex.