What are Context Data Elements, and how are they related to inheritance?

Context Data Elements are components that have common names because they are all attributes of the same object through inheritance. It is crucial to first understand the concept of inheritance of properties from more general types to more specific types to understand context data elements.

The easiest way to understand the concept of inheritance in GJXDM and NIEM is through the following example. One very general object (high level type) is ActivityType. There are a number of more specific objects derived from ActivityType, such as ArrestType and BookingType. All three aforementioned complex types have a number of properties (XML elements) that compose them. One property of ActivityType is ActivityDate (the date an activity occurred). Since ArrestType and BookingType are derived from ActivityType, they are considered more specific Activity objects with a number of specialized properties of their own. However, they each inherit all the properties of their parent, ActivityType. One property inherited by both ArrestType and BookingType from ActivityType is ActivityDate.

Now suppose you want to determine how to tag (in XML) an ArrestDate. If you search the GJXDM or NIEM schema for ArrestDate, you will not find one. The reason is that the value of an arrest date would be tagged as ActivityDate inside of the ArrestType. Analogously, a BookingDate would also be tagged as an ActivityDate as a property of  BookingType. This is because the date of any specific activity derived from ActivityType inherits ActivityDate.

GJXDM and NIEM are object-oriented models that take advantage of property inheritance to reuse components. This helps to keep the total number of elements smaller. However, this also means that some specific data element names do not exist in the dictionary because more generically named properties are inherited down to the more specific subtypes.