Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression in schematron improvements for references #828

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -757,65 +757,10 @@ public void insertValueMeaning() {
"The format of the digital object must be described one or more referenced documents");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

/*
* lPVD = new PermValueDefn
* ("pds:Product_Operational/pds:Reference_List/pds:Internal_Reference.reference_type.operational_to_resource",
* "operational_to_resource", "The operational product is associated to a resource");
* masterValueMeaningMap.put(lPVD.identifier, lPVD); lPVD = new PermValueDefn
* ("pds:Product_Operational/pds:Reference_List/pds:Internal_Reference.reference_type.operational_to_associate",
* "operational_to_associate", "The operational product is associated to a product");
* masterValueMeaningMap.put(lPVD.identifier, lPVD); lPVD = new PermValueDefn
* ("pds:Product_Operational/pds:Reference_List/pds:Internal_Reference.reference_type.operational_to_document",
* "operational_to_document", "The operational product is associated to a document");
* masterValueMeaningMap.put(lPVD.identifier, lPVD);
*/

// lPVD = new PermValueDefn
// ("pds:Target_Identification/pds:Internal_Reference.reference_type.data_to_target",
// "data_to_target", "The data product is associated to a target");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);
// lPVD = new PermValueDefn
// ("pds:Target_Identification/pds:Internal_Reference.reference_type.collection_to_target",
// "collection_to_target", "The collection is associated to a target");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);
// lPVD = new PermValueDefn
// ("pds:Target_Identification/pds:Internal_Reference.reference_type.bundle_to_target",
// "bundle_to_target", "The bundle is associated to a target");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);
// lPVD = new PermValueDefn
// ("pds:Target_Identification/pds:Internal_Reference.reference_type.document_to_target",
// "document_to_target", "The document is associated to a target");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_Observational/pds:Observation_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.data_to_target",
"data_to_target", "The data product is associated to a target");
masterValueMeaningMap.put(lPVD.identifier, lPVD);
// lPVD = new PermValueDefn
// ("pds:Product_Observational/pds:Observation_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.collection_to_target",
// "collection_to_target", "The collection is associated to a target");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);
// lPVD = new PermValueDefn
// ("pds:Product_Observational/pds:Observation_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.bundle_to_target",
// "bundle_to_target", "The bundle is associated to a target");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);
// lPVD = new PermValueDefn
// ("pds:Product_Observational/pds:Observation_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.document_to_target",
// "document_to_target", "The document is associated to a target");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);

// lPVD = new PermValueDefn
// ("pds:Update_Entry/pds:Internal_Reference.reference_type.data_to_update", "data_to_update",
// "The data product is associated to an update product");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);
// lPVD = new PermValueDefn
// ("pds:Update_Entry/pds:Internal_Reference.reference_type.collection_to_update",
// "collection_to_update", "The collection is associated to an update product");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);
// lPVD = new PermValueDefn
// ("pds:Update_Entry/pds:Internal_Reference.reference_type.bundle_to_update",
// "bundle_to_update", "The bundle is associated to an update product");
// masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_Update/pds:Reference_List/pds:Internal_Reference.reference_type.update_to_collection",
Expand Down Expand Up @@ -952,42 +897,42 @@ public void insertValueMeaning() {


lPVD = new PermValueDefn(
"pds:Product_Observational/pds:Observation_Area/pds:Target_Identification/pds:Reference_List/pds:Internal_Reference.reference_type.data_to_target",
"pds:Product_Observational/pds:Observation_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.data_to_target",
"data_to_target", "The observational product is associated to a target product");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_Bundle/pds:Context_Area/pds:Target_Identification/pds:Reference_List/pds:Internal_Reference.reference_type.bundle_to_target",
"pds:Product_Bundle/pds:Context_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.bundle_to_target",
"bundle_to_target", "The bundle product is associated to a target product");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_Collection/pds:Context_Area/pds:Target_Identification/pds:Reference_List/pds:Internal_Reference.reference_type.collection_to_target",
"pds:Product_Collection/pds:Context_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.collection_to_target",
"collection_to_target", "The collection product is associated to a target product");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_Browse/pds:Context_Area/pds:Target_Identification/pds:Reference_List/pds:Internal_Reference.reference_type.browse_to_target",
"pds:Product_Browse/pds:Context_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.browse_to_target",
"browse_to_target", "The browse product is associated to a target product");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_External/pds:Context_Area/pds:Target_Identification/pds:Reference_List/pds:Internal_Reference.reference_type.external_to_target",
"pds:Product_External/pds:Context_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.external_to_target",
"external_to_target", "The external product is associated to a target product");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_Native/pds:Context_Area/pds:Target_Identification/pds:Reference_List/pds:Internal_Reference.reference_type.native_to_target",
"pds:Product_Native/pds:Context_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.native_to_target",
"native_to_target", "The native product is associated to a target product");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_SPICE_Kernel/pds:Context_Area/pds:Target_Identification/pds:Reference_List/pds:Internal_Reference.reference_type.data_to_target",
"pds:Product_SPICE_Kernel/pds:Context_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.data_to_target",
"data_to_target", "The SPICE kernel product is associated to a target product");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn(
"pds:Product_XML_Schema/pds:Context_Area/pds:Target_Identification/pds:Reference_List/pds:Internal_Reference.reference_type.schema_to_target",
"pds:Product_XML_Schema/pds:Context_Area/pds:Target_Identification/pds:Internal_Reference.reference_type.schema_to_target",
"schema_to_target", "The XML schema product is associated to a target product");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

Expand Down
6 changes: 3 additions & 3 deletions model-lddtool/src/test/resources/features/validate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Feature: Running integration tests for validate module
Examples:
| testName | testDir | messageCount | messageText | problemEnum | commandArgs | ingestLDDFileName |
# NOTE: as of 10/18/2024, this fails
| "NASA-PDS/pds4-information-model#795 Test Schematron 1" | "github795" | 10 | "10 errors expected" | "SCHEMATRON_ERROR" | "--rule pds4.bundle --target {resourceDir}/github795/" | "" |
| "NASA-PDS/pds4-information-model#795 Test Schematron 1" | "github795" | 9 | "9 errors expected" | "SCHEMATRON_ERROR" | "--rule pds4.bundle --target {resourceDir}/github795/" | "" |

| "NASA-PDS/pds4-information-model#795 Test Schematron 2" | "github795b" | 1 | "1 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github795/" | "" |
| "NASA-PDS/pds4-information-model#795 Test Schematron 2" | "github795b" | 1 | "1 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github795b/" | "" |

| "NASA-PDS/pds4-information-model#797 Test Schematron 1" | "github797" | 3 | "3 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github797/test_label1_FAIL.xml {resourceDir}/github797/u5.xml" | "PDS4_GEOM_IngestLDD.xml" |
#| "NASA-PDS/pds4-information-model#797 Test Schematron 1" | "github797" | 3 | "3 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github797/test_label1_FAIL.xml {resourceDir}/github797/u5.xml" | "PDS4_GEOM_IngestLDD.xml" |



4 changes: 2 additions & 2 deletions model-lddtool/src/test/resources/github795/bundle.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1M00.sch"
<?xml-model href="file:///Users/jpadams/proj/pds/pdsen/workspace/pds4-information-model/export/PDS4_PDS_1N00.sch"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
<Product_Bundle
xmlns="http://pds.nasa.gov/pds4/pds/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://pds.nasa.gov/pds4/pds/v1
https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1M00.xsd">
file:///Users/jpadams/proj/pds/pdsen/workspace/pds4-information-model/export/PDS4_PDS_1N00.xsd">
<Identification_Area>
<logical_identifier>urn:nasa:pds:im795</logical_identifier>
<version_id>1.0</version_id>
Expand Down
Loading