From f6e8368552169bad02ad09ff6392e37a59ca14a6 Mon Sep 17 00:00:00 2001 From: jshughes Date: Wed, 14 Aug 2024 17:16:40 -0400 Subject: [PATCH 1/3] Added geom:kernel_type validation rule --- .../gov/nasa/pds/model/plugin/DMDocument.java | 7 ++++++- .../gov/nasa/pds/model/plugin/LDDDOMParser.java | 15 ++++++++------- .../nasa/pds/model/plugin/MasterDOMInfoModel.java | 4 ++-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/DMDocument.java b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/DMDocument.java index 355c904a..1f54c0e8 100644 --- a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/DMDocument.java +++ b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/DMDocument.java @@ -838,7 +838,8 @@ static private void init() { setexposedElementFlag(); // set exposed attributes - setexposedAttributeFlag(); + // 555 commented out until DDWG approves the impact of the fix +// setexposedAttributeFlag(); } static private void reset() { @@ -1099,6 +1100,10 @@ static void setexposedElementFlag() { exposedElementArr.add("0001_NASA_PDS_1.pds.Internal_Reference"); exposedElementArr.add("0001_NASA_PDS_1.pds.Local_Internal_Reference"); exposedElementArr.add("0001_NASA_PDS_1.pds.External_Reference"); + + // 555 added back in until DDWG approves impact of the fix + exposedElementArr.add("0001_NASA_PDS_1.pds.DD_Class.pds.local_identifier"); + exposedElementArr.add("0001_NASA_PDS_1.pds.Identification_Area.pds.logical_identifier"); } static void setexposedAttributeFlag() { diff --git a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/LDDDOMParser.java b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/LDDDOMParser.java index eeacb4a4..1a621291 100644 --- a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/LDDDOMParser.java +++ b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/LDDDOMParser.java @@ -1808,13 +1808,14 @@ private DOMAttr getLocalOrExternAttr(SchemaFileDefn lSchemaFileDefn, DOMClass lD } // validate that referenced attribute is exposed - if (lDOMAttr.nameSpaceIdNC.compareTo("pds") == 0 && ! lDOMAttr.isExposed) { - if (lDOMAttr.isEnumerated) { - DMDocument.registerMessage("2>error Attribute: " + " - The referenced enumerated attribute " + lLocalIdentifier + " must be exposed."); - } else { - DMDocument.registerMessage("2>warning Attribute: " + " - The referenced attribute " + lLocalIdentifier + " is not exposed."); - } - } + // 555 commented out until DDWG approves impact of the fix +// if (lDOMAttr.nameSpaceIdNC.compareTo("pds") == 0 && ! lDOMAttr.isExposed) { +// if (lDOMAttr.isEnumerated) { +// DMDocument.registerMessage("2>warning Attribute: " + " - The referenced enumerated attribute " + lLocalIdentifier + " is not exposed."); +// } else { +// DMDocument.registerMessage("2>warning Attribute: " + " - The referenced attribute " + lLocalIdentifier + " is not exposed."); +// } +// } // clone the USER or LDD attribute for use as a Resolved attribute // returns rdfIdentifier = "TBD_rdfIdentifier" diff --git a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/MasterDOMInfoModel.java b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/MasterDOMInfoModel.java index 5cb63fed..94e67e8c 100644 --- a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/MasterDOMInfoModel.java +++ b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/MasterDOMInfoModel.java @@ -142,8 +142,8 @@ public void getUserClassAttrIdMap() { DOMInfoModel.getAttrIdentifier(DMDocument.masterUserClassNamespaceIdNC, DMDocument.masterUserClassName, lDOMAttr.nameSpaceIdNC, lDOMAttr.title); - // 555 - if (DMDocument.exposedAttributeArr.contains(lUserAttrIdentifier)) lDOMAttr.isExposed = true; + // 555 commented out until DDWG approves impact of the fix +// if (DMDocument.exposedAttributeArr.contains(lUserAttrIdentifier)) lDOMAttr.isExposed = true; DOMInfoModel.userDOMClassAttrIdMap.put(lUserAttrIdentifier, lDOMAttr); } From 9dafbae910bb240e57171bac72400864c112a345 Mon Sep 17 00:00:00 2001 From: jshughes Date: Wed, 14 Aug 2024 19:03:50 -0400 Subject: [PATCH 2/3] Added schematron for geom:kernel_type to protege file --- .../src/ontology/Data/UpperModel.pins | 25 +++++++++++- .../src/ontology/Data/UpperModel.pont | 2 +- .../src/ontology/Data/UpperModel.pprj | 40 +++++++++---------- 3 files changed, 45 insertions(+), 22 deletions(-) diff --git a/model-ontology/src/ontology/Data/UpperModel.pins b/model-ontology/src/ontology/Data/UpperModel.pins index ead4c1d8..1095e2d1 100644 --- a/model-ontology/src/ontology/Data/UpperModel.pins +++ b/model-ontology/src/ontology/Data/UpperModel.pins @@ -1,4 +1,4 @@ -; Thu Aug 08 12:01:13 EDT 2024 +; Wed Aug 14 12:29:19 EDT 2024 ; ;+ (version "3.5") ;+ (build "Build 663") @@ -145,6 +145,29 @@ (identifier "nilReason") (specMesg "The 'nilReason' attribute must be used in conjunction with xsi:nil=\"true\"")) +([http%3A%2F%2Fpds.nasa.gov%2Finfomodel%2Fpds%23.geom%3ASPICE_Kernel_Identification%2Fgeom%3Akernel_type.100004870] of Schematron_Rule + + (alwaysInclude "false") + (attrNameSpaceNC "geom") + (attrTitle "kernel_type") + (classNameSpaceNC "geom") + (classSteward "geom") + (classTitle "SPICE_Kernel_Identification") + (has_Schematron_Assert [http%3A%2F%2Fpds.nasa.gov%2Finfomodel%2Fpds%23.geom%3ASPICE_Kernel_Identification%2Fgeom%3Akernel_type.100004870.101]) + (identifier "geom:SPICE_Kernel_Identification/geom:kernel_type") + (isMissionOnly "false") + (roleId "TBD_roleId") + (type "TBD_type") + (xpath "geom:SPICE_Kernel_Identification/geom:kernel_type")) + +([http%3A%2F%2Fpds.nasa.gov%2Finfomodel%2Fpds%23.geom%3ASPICE_Kernel_Identification%2Fgeom%3Akernel_type.100004870.101] of Schematron_Assert + + (assertMsg "The attribute geom:SPICE_Kernel_Identification/geom:kernel_type must be equal to one of the following values 'CK', 'DBK', 'DSK', 'EK', 'FK', 'IK', 'LSK', 'MK', 'PCK', 'SCLK', 'SPK'.") + (assertStmt ". = ('CK', 'DBK', 'DSK', 'EK', 'FK', 'IK', 'LSK', 'MK', 'PCK', 'SCLK', 'SPK')") + (assertType "RAW") + (attrTitle "kernel_type") + (identifier "kernel_type")) + ([http%3A%2F%2Fpds.nasa.gov%2Finfomodel%2Fpds%23.pds%3A%2FProduct_Observational%2Fpds%3AIdentification_Area%2Fpds%3Alogical_identifier.100002512] of Schematron_Rule (alwaysInclude "true") diff --git a/model-ontology/src/ontology/Data/UpperModel.pont b/model-ontology/src/ontology/Data/UpperModel.pont index 803b8707..f98672a0 100644 --- a/model-ontology/src/ontology/Data/UpperModel.pont +++ b/model-ontology/src/ontology/Data/UpperModel.pont @@ -1,4 +1,4 @@ -; Thu Aug 08 12:01:12 EDT 2024 +; Wed Aug 14 12:29:18 EDT 2024 ; ;+ (version "3.5") ;+ (build "Build 663") diff --git a/model-ontology/src/ontology/Data/UpperModel.pprj b/model-ontology/src/ontology/Data/UpperModel.pprj index cd53e461..cc9a76a7 100644 --- a/model-ontology/src/ontology/Data/UpperModel.pprj +++ b/model-ontology/src/ontology/Data/UpperModel.pprj @@ -1,4 +1,4 @@ -; Thu Aug 08 12:01:13 EDT 2024 +; Wed Aug 14 12:29:19 EDT 2024 ; ;+ (version "3.5") ;+ (build "Build 663") @@ -6,10 +6,10 @@ ([BROWSER_SLOT_NAMES] of Property_List (properties - [UpperModel_ProjectKB_Class10123] - [UpperModel_ProjectKB_Class10124] - [UpperModel_ProjectKB_Class10125] - [UpperModel_ProjectKB_Class10126])) + [UpperModel_ProjectKB_Class123] + [UpperModel_ProjectKB_Class124] + [UpperModel_ProjectKB_Class125] + [UpperModel_ProjectKB_Class126])) ([CLSES_TAB] of Widget @@ -423,10 +423,10 @@ (x 0) (y 120)) -([KB_663782_Class0] of Map +([KB_414268_Class0] of Map ) -([KB_858554_Class0] of Map +([KB_663782_Class0] of Map ) ([KB_887149_Instance_43] of String @@ -841,35 +841,35 @@ ([UpperModel_ProjectKB_Class10] of Property_List ) -([UpperModel_ProjectKB_Class10123] of String +([UpperModel_ProjectKB_Class11] of Widget + + (is_hidden TRUE) + (property_list [UpperModel_ProjectKB_Class12]) + (widget_class_name "edu.stanford.smi.protegex.owl.ui.cls.OWLClassesTab")) + +([UpperModel_ProjectKB_Class12] of Property_List +) + +([UpperModel_ProjectKB_Class123] of String (name "ChangeLog") (string_value "date")) -([UpperModel_ProjectKB_Class10124] of String +([UpperModel_ProjectKB_Class124] of String (name ":INSTANCE-ANNOTATION") (string_value "%3AANNOTATION-TEXT")) -([UpperModel_ProjectKB_Class10125] of String +([UpperModel_ProjectKB_Class125] of String (name ":PAL-CONSTRAINT") (string_value "%3APAL-NAME")) -([UpperModel_ProjectKB_Class10126] of String +([UpperModel_ProjectKB_Class126] of String (name ":META-CLASS") (string_value "%3ANAME")) -([UpperModel_ProjectKB_Class11] of Widget - - (is_hidden TRUE) - (property_list [UpperModel_ProjectKB_Class12]) - (widget_class_name "edu.stanford.smi.protegex.owl.ui.cls.OWLClassesTab")) - -([UpperModel_ProjectKB_Class12] of Property_List -) - ([UpperModel_ProjectKB_Class13] of Widget (is_hidden TRUE) From 830217cbc644b027d8b9087a9b006f679aadc7c0 Mon Sep 17 00:00:00 2001 From: jshughes Date: Thu, 15 Aug 2024 14:05:46 -0400 Subject: [PATCH 3/3] Re-exposed the attributes local_identifier and logical_identifier. --- .../gov/nasa/pds/model/plugin/DMDocument.java | 16 ++++++---------- .../pds/model/plugin/MasterDOMInfoModel.java | 4 ++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/DMDocument.java b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/DMDocument.java index 1f54c0e8..a98cb4ea 100644 --- a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/DMDocument.java +++ b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/DMDocument.java @@ -838,8 +838,7 @@ static private void init() { setexposedElementFlag(); // set exposed attributes - // 555 commented out until DDWG approves the impact of the fix -// setexposedAttributeFlag(); + setexposedAttributeFlag(); } static private void reset() { @@ -1100,21 +1099,18 @@ static void setexposedElementFlag() { exposedElementArr.add("0001_NASA_PDS_1.pds.Internal_Reference"); exposedElementArr.add("0001_NASA_PDS_1.pds.Local_Internal_Reference"); exposedElementArr.add("0001_NASA_PDS_1.pds.External_Reference"); - - // 555 added back in until DDWG approves impact of the fix - exposedElementArr.add("0001_NASA_PDS_1.pds.DD_Class.pds.local_identifier"); - exposedElementArr.add("0001_NASA_PDS_1.pds.Identification_Area.pds.logical_identifier"); } static void setexposedAttributeFlag() { // the set of attributes that will be externalized (defined as xs:Element) exposedAttributeArr = new ArrayList<>(); - exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.comment"); - exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.description"); +// 555 commented out until DDWG addresses impact of using ref: +// exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.comment"); +// exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.description"); exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.local_identifier"); exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.logical_identifier"); - exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.name"); - exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.kernel_type"); +// exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.name"); +// exposedAttributeArr.add("0001_NASA_PDS_1.all.USER.pds.kernel_type"); } static void setRegistryAttrFlag() { diff --git a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/MasterDOMInfoModel.java b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/MasterDOMInfoModel.java index 94e67e8c..11fee5ac 100644 --- a/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/MasterDOMInfoModel.java +++ b/model-dmdocument/src/main/java/gov/nasa/pds/model/plugin/MasterDOMInfoModel.java @@ -142,8 +142,8 @@ public void getUserClassAttrIdMap() { DOMInfoModel.getAttrIdentifier(DMDocument.masterUserClassNamespaceIdNC, DMDocument.masterUserClassName, lDOMAttr.nameSpaceIdNC, lDOMAttr.title); - // 555 commented out until DDWG approves impact of the fix -// if (DMDocument.exposedAttributeArr.contains(lUserAttrIdentifier)) lDOMAttr.isExposed = true; + // set selected attributes to exposed + if (DMDocument.exposedAttributeArr.contains(lUserAttrIdentifier)) lDOMAttr.isExposed = true; DOMInfoModel.userDOMClassAttrIdMap.put(lUserAttrIdentifier, lDOMAttr); }