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

Incorrect schematron rules for Bundle (type:External), Collection (type:External), and Product_External logical_identifiers CCB-29 #837

Merged
merged 12 commits into from
Nov 11, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public void insertValueMeaning() {
lPVD = new PermValueDefn("0001_NASA_PDS_1.Bundle_Member_Entry.reference_type_<Value>_10",
"bundle_has_miscellaneous_collection", "The bundle has a miscellaneous collection member");
masterValueMeaningMap.put(lPVD.identifier, lPVD);
lPVD = new PermValueDefn("0001_NASA_PDS_1.Bundle_Member_Entry.reference_type_<Value>_11",
"bundle_has_external_collection", "The bundle has an external collection member");
masterValueMeaningMap.put(lPVD.identifier, lPVD);

lPVD = new PermValueDefn("0001_NASA_PDS_1.DD_Association.reference_type_<Value>_1",
"attribute_of", "The referenced attribute is a member of this class");
Expand Down
15 changes: 8 additions & 7 deletions model-lddtool/src/test/resources/features/validate.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Running integration tests for validate module
Feature: pds4_information_model_integration

Scenario Outline: Execute validate command for tests below.
Scenario Outline: <testId>
Given the test <testName> at directory <testDir>
Given the latest PDS4 schema/schematron is generated
Given a new LDD is generated using the IngestLDDs <ingestLDDFileName>
Expand All @@ -14,13 +14,14 @@ Feature: Running integration tests for validate module

@v15.2.x
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" | 9 | "9 errors expected" | "SCHEMATRON_ERROR" | "--rule pds4.bundle --target {resourceDir}/github795/" | "" |
| testId | testName | testDir | messageCount | messageText | problemEnum | commandArgs | ingestLDDFileName |
| "NASA-PDS/pds4-information-model#795a" | "Expected reference_type Failures for all Data Types" | "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}/github795b/" | "" |
| "NASA-PDS/pds4-information-model#795b"| "Expected reference_type Failure for Product_External" | "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" | "Expected schematron failure for kernel_type values" | "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#816" | "Expected failure for Product_External LID formation rule" | "github816" | 1 | "1 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github816/" | "" |



2,999 changes: 0 additions & 2,999 deletions model-lddtool/src/test/resources/github795b/PDS4_PDS_1N00.sch

This file was deleted.

9,034 changes: 0 additions & 9,034 deletions model-lddtool/src/test/resources/github795b/PDS4_PDS_1N00.xsd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1N00.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_External
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_1N00.xsd
file:///Users/jpadams/proj/pds/pdsen/workspace/pds4-information-model/export/PDS4_PDS_1N00.xsd
">
<Identification_Area>
<logical_identifier>urn:bull:shiite:french23_occult_pred</logical_identifier>
<logical_identifier>urn:bull:shiite:ha:ha:french23_occult_pred</logical_identifier>
<version_id>1.0</version_id>
<title>Occultation Predictions from R. G. French and D. Souami (2023)</title>
<information_model_version>1.23.0.0</information_model_version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
don't have the real file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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_External
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
file:///Users/jpadams/proj/pds/pdsen/workspace/pds4-information-model/export/PDS4_PDS_1N00.xsd
">
<Identification_Area>
<logical_identifier>urn:bull:shiite:french23_occult_pred</logical_identifier>
<version_id>1.0</version_id>
<title>Occultation Predictions from R. G. French and D. Souami (2023)</title>
<information_model_version>1.23.0.0</information_model_version>
<product_class>Product_External</product_class>
<Citation_Information>
<!--author_list>French, R.G.; Souami, D.</author_list-->
<!--editor_list>Mace, M.J.T.; Gordon, M.K.; Tiscareno, M.S.</editor_list-->
<publication_year>2023</publication_year>
<doi>10.17189/m9sk-g963</doi>
<keyword>jupiter</keyword>
<keyword>saturn</keyword>
<keyword>uranus</keyword>
<keyword>neptune</keyword>
<keyword>titan</keyword>
<keyword>triton</keyword>
<description>
Supplementary Online Material (SOM) for Occultation Predictions,
R. G. French and D. Souami (2023)
</description>
</Citation_Information>
<Modification_History>
<Modification_Detail>
<modification_date>2023-06-29</modification_date>
<version_id>1.0</version_id>
<description>Initial version.</description>
</Modification_Detail>
</Modification_History>
</Identification_Area>

<Context_Area>
<Target_Identification>
<name>Jupiter</name>
<type>Planet</type>
<Internal_Reference>
<lid_reference>urn:nasa:pds:context:target:planet.jupiter</lid_reference>
<reference_type>external_to_target</reference_type>
</Internal_Reference>
</Target_Identification>
<Target_Identification>
<name>Io</name>
<type>Satellite</type>
<Internal_Reference>
<lid_reference>urn:nasa:pds:context:target:satellite.jupiter.io</lid_reference>
<reference_type>external_to_target</reference_type> <!--RChen should fail-->
</Internal_Reference>
</Target_Identification>
</Context_Area>

<Reference_List>
<External_Reference>
<doi>10.3847/PSJ/aced50</doi>
<reference_text>R.G. French, D. Souami, Earth-based Stellar Occultation Predictions for Jupiter, Saturn, Uranus, Neptune, Titan, and Triton: 2023-2050
2023, PSJ, 4</reference_text>
<description>Journal article providing details on the occultation prediction files included
in this collection.</description>
</External_Reference>
</Reference_List>
<File_Area_External>
<File>
<file_name>occultation_prediction_som_manifest.tif</file_name>
<creation_date_time>2023-10-13T16:35:45</creation_date_time>
<!--file_size unit="byte">3084963</file_size-->
<comment>
Text file containing a list of all the files present in the
Supplementary Online Material (SOM) for Occultation Predictions,
R. G. French and D. Souami (2023)
</comment>
</File>
<Encoded_External>
<offset unit="byte">0</offset>
<encoding_standard_id>TIFF</encoding_standard_id>
</Encoded_External>
</File_Area_External>
</Product_External>
Loading