niemopen / niem-naming-design-rules

NIEM Naming and Design Rules Specification
Other
4 stars 2 forks source link

Support inline metadata for objects #8

Open cdmgtri opened 1 year ago

cdmgtri commented 1 year ago

Migrated from NIEM/NIEM-NDR#112

"Make the default behavior correct." -- Christina

todo Christina and Tom Carlson more examples, esp Brian Handspicker stuff

resolved kill off relationshipMetadata

Some people say metadata is hard to use. Could restructure things a bit to make it easier.

Dr. Scott: Which RDF one is the one that we keep? relationshipMetadata takes you out of tuple-space

Current

<nc:Person>
  <nc:PersonBirthDate structures:metadata="m1">
    <nc:Date>1945-12-01</nc:Date>
  </nc:PersonBirthDate>
  <nc:PersonName structures:metadata="m1 m2">
    <nc:PersonFullName>John Doe</nc:PersonFullName>
  </nc:PersonName>
</nc:Person>

<nc:Metadata structures:id="m1">
  <nc:SourceText>Adam Barber</nc:SourceText>
  <nc:ReportedDate>
    <nc:Date>2005-04-26</nc:Date>
  </nc:ReportedDate>
</nc:Metadata>

<j:Metadata structures:id="m2">
  <j:CriminalInformationIndicator>true</j:CriminalInformationIndicator>
</j:Metadata>

Proposed - Simple use case (inline)

<nc:Person>

  <!-- Inline metadata -->
  <structures:Metadata>
    <nc:MetadataAugmentation>
      <nc:SourceText>Adam Barber</nc:SourceText>
      <nc:ReportedDate>
        <nc:Date>2005-04-26</nc:Date>
      </nc:ReportedDate>
    </nc:MetadataAugmentation>
    <j:MetadataAugmentation>
      <j:CriminalInformationIndicator>true</j:CriminalInformationIndicator>
    </j:MetadataAugmentation>
  </structures:Metadata>

  <nc:PersonBirthDate>
    <nc:Date>1945-12-01</nc:Date>
  </nc:PersonBirthDate>
  <nc:PersonName>
    <nc:PersonFullName>John Doe</nc:PersonFullName>
  </nc:PersonName>

</nc:Person>

Proposed - Advanced use case (reference)

<nc:Person>
  <!-- Metadata reference, similar to how other objects in NIEM can be referenced -->
  <structures:Metadata structures:ref="m1" xsi:nil="true"/>
  <nc:PersonBirthDate>
    <nc:Date>1945-12-01</nc:Date>
  </nc:PersonBirthDate>
  <nc:PersonName>
    <nc:PersonFullName>John Doe</nc:PersonFullName>
  </nc:PersonName>
</nc:Person>

<structures:Metadata id="m1">
  <nc:MetadataAugmentation>
    <nc:SourceText>Adam Barber</nc:SourceText>
    <nc:ReportedDate>
      <nc:Date>2005-04-26</nc:Date>
    </nc:ReportedDate>
  </nc:MetadataAugmentation>
  <j:MetadataAugmentation>
    <j:CriminalInformationIndicator>true</j:CriminalInformationIndicator>
  </j:MetadataAugmentation>
</structures:Metadata>

Questions:

<nc:Person>

  <!-- Removed Core and Justice augmentation element containers -->
  <structures:Metadata>
    <nc:SourceText>Adam Barber</nc:SourceText>
    <nc:ReportedDate>
      <nc:Date>2005-04-26</nc:Date>
    </nc:ReportedDate>
    <j:CriminalInformationIndicator>true</j:CriminalInformationIndicator>
  </structures:Metadata>

  <nc:PersonBirthDate>
    <nc:Date>1945-12-01</nc:Date>
  </nc:PersonBirthDate>
  <nc:PersonName>
    <nc:PersonFullName>John Doe</nc:PersonFullName>
  </nc:PersonName>

</nc:Person>
cdmgtri commented 1 year ago

Harmonization Subcommittee feedback:

Add the following to make metadata easier to use in well-known places. Message designers can still add, extend, or augment types on their own to place metadata exactly where they need it to appear.

Consider whether we can add a new attribute augmentation cui:portionMarkingMetadataRef to nc:TextType in the reference model. CUI is an auxiliary namespace. Is it allowed to be referenced in Core?

It was discussed whether to add nc:Metadata to a Core augmentation of structures:ObjectType but rejected because if it is available everywhere, it's not easy to tell in a subset exactly which places it should be used.

cdmgtri commented 1 year ago

Model updates merged into the dev branch for 6.0.