Checked for duplicates
Yes - I've already checked
π§βπ¬ User Persona(s)
Node operator and data providers.
πͺ Motivation
Whenever there is context name mismatch warning reported in the validate report it shows what value the label has and what the possible acceptable values are form the context object. Sometimes the names make it unclear what context object this should be. So I always have to open up the label, go to the line specified in the validate report and see what the LID is, so I can see if label provided value may actually be correct or which value may be wanted. If I knew what the LID was quickly, I could more quickly investigate the problem. One problem with some context names is that they are the same across multiple LIDs or not very descript (yes, this is probably a problem with the context objects themselves), this can then report a similar (or exact) looking warning which are actually for multiple LIDs.
π Additional Details
No response
Acceptance Criteria
Given a PDS4 label containing context product references where the name or type in the label does not match the registered context product values
When I perform validation using the validate tool with context validation enabled
Then I expect the validation report warning/info message to include the LIDVID of the context object, formatted as:
Context reference name mismatch. LIDVID: '<lidvid>'. Value: '<label_value>' Expected one of: '<registered_values>'
Context reference type mismatch. LIDVID: '<lidvid>'. Value: '<label_value>' Expected one of: '<registered_values>'
βοΈ Engineering Details
File to modify: src/main/java/gov/nasa/pds/tools/validate/rule/pds4/ContextProductReferenceValidationRule.java
Changes required:
- Name mismatch message (lines 281-286): Update from:
"Context reference name mismatch. Value: '" + name + "'" + " Expected one of: '" + rgp.getNames() + "'"
To:
"Context reference name mismatch. LIDVID: '" + lidvid + "'. Value: '" + name + "'" + " Expected one of: '" + rgp.getNames() + "'"
- Type mismatch message (lines 294-298): Update from:
"Context reference type mismatch. Value: '" + type + "'" + " Expected one of: '" + rgp.getTypes() + "'"
To:
"Context reference type mismatch. LIDVID: '" + lidvid + "'. Value: '" + type + "'" + " Expected one of: '" + rgp.getTypes() + "'"
Note: The lidvid variable is already in scope at both locations (defined at line 225), so no additional data retrieval is needed.
Testing: Add test case to verify LIDVID appears in mismatch messages. Consider adding scenario to src/test/resources/features/ with expected output containing the LIDVID pattern.
π I&T
No response
Checked for duplicates
Yes - I've already checked
π§βπ¬ User Persona(s)
Node operator and data providers.
πͺ Motivation
Whenever there is context name mismatch warning reported in the validate report it shows what value the label has and what the possible acceptable values are form the context object. Sometimes the names make it unclear what context object this should be. So I always have to open up the label, go to the line specified in the validate report and see what the LID is, so I can see if label provided value may actually be correct or which value may be wanted. If I knew what the LID was quickly, I could more quickly investigate the problem. One problem with some context names is that they are the same across multiple LIDs or not very descript (yes, this is probably a problem with the context objects themselves), this can then report a similar (or exact) looking warning which are actually for multiple LIDs.
π Additional Details
No response
Acceptance Criteria
Given a PDS4 label containing context product references where the name or type in the label does not match the registered context product values
When I perform validation using the validate tool with context validation enabled
Then I expect the validation report warning/info message to include the LIDVID of the context object, formatted as:
Context reference name mismatch. LIDVID: '<lidvid>'. Value: '<label_value>' Expected one of: '<registered_values>'Context reference type mismatch. LIDVID: '<lidvid>'. Value: '<label_value>' Expected one of: '<registered_values>'βοΈ Engineering Details
File to modify:
src/main/java/gov/nasa/pds/tools/validate/rule/pds4/ContextProductReferenceValidationRule.javaChanges required:
To:
To:
Note: The
lidvidvariable is already in scope at both locations (defined at line 225), so no additional data retrieval is needed.Testing: Add test case to verify LIDVID appears in mismatch messages. Consider adding scenario to
src/test/resources/features/with expected output containing the LIDVID pattern.π I&T
No response