How do you define a relationship between two components that are not linked with each other in Global Justice XML Data Model (GJXDM)?

Currently, there are four methods to define a relationship (or a ''link'') between two components that do not already have a relationship with each other in the Global Justice XML Data Model (GJXDM). (To demonstrate the methods, as an example the component Citation will be linked to Charge. A citation ID is represented in the GJXDM as j:Citation/j:ActivityID (j:ActivityID is inherited from j:ActivityType, the parent of j:CitationType). However, j:ChargeType does not contain j:Citation or a parent of j:Citation, and there is no relationship between the two in the GJXDM. So one has to define that relationship.

 The first method, referred to as inclusion, is to simply define a new type that extends the type of one component (which is a complex type) to include the other component (which can be either a complex type or a simple type). To use the first method, one would define their own charge type that is an extension of j:ChargeType. Then one would have to add j:Citation to the sequence. If there were any other GJXDM properties not in j:ChargeType that one wants, those could be added as well. If one only wants the citation ID (and not the whole citation), since it is so trivial, one could consider defining their own CitationID element of type IDType. This method might be most appropriate, since extending j:ChargeType to include j:Citation (or your:CitationID) is analogous to including the citation ID in your charge table.

The second method, referred to as reference, is to include in one component a reference to the other component using ID/IDREF . For this method, one would define a new type that extends j:ChargeType to add j:CitationReference to the sequence (instead of j:Citation). This can be used if the citation information is already represented elsewhere as j:Citation and the purpose is to just reference that existing citation information instead of duplicating it in the charge information.

The third method, referred to as association, is to use the j:Relationship element. It has the attributes name, subject, and object. For our example, one would give it the name attribute -- say ''ChargeCitationID''. The subject attribute would be j:ChargeReference and the object attribute would be j:CitationReference. This method is used to define some relationship between two properties without extending one to include the other (as in the first method) or a reference to the other (as in the second method).

The fourth method is to define your own association type and element, similar to the third method, but enabling additional relationship content beyond the name, subject, and object.