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

Issue #670 Adds to default output JSON TermMap #671

Merged
merged 1 commit into from
Aug 10, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public class DMDocument extends Object {

// import export file flags
static boolean exportJSONFileFlag = false; // LDDTool, set by -J option
static boolean exportJSONFileAllFlag = false; // LDDTool, set by -6 option
static boolean exportJSONFileAllFlag = false; // LDDTool, set by -6 option *** Not Currently Used - Deprecate? ***
static boolean exportSpecFileFlag = false;
static boolean exportDDFileFlag = false;
static boolean exportTermMapFileFlag = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,14 @@ public Boolean getexportOWLRDFFileFlag() {
}
return false;
}
public Boolean getexportJSONFileAllFlag() {
Integer lProcessOrder = processFlagMap.get("Export JSON File All Flag");
if (lProcessOrder != null) {
return true;
}
return false;
}

// public Boolean getexportJSONFileAllFlag() {
// Integer lProcessOrder = processFlagMap.get("Export JSON File All Flag");
// if (lProcessOrder != null) {
// return true;
// }
// return false;
// }

public Boolean getcheckFileNameFlag() {
Integer lProcessOrder = processFlagMap.get("Check File Name Flag");
Expand Down Expand Up @@ -378,10 +379,10 @@ public void setExportOWLRDFFileFlag() {
return;
}

public void setexportJSONFileAllFlag() {
processFlagMap.put("Export JSON File All Flag", 1200);
return;
}
// public void setexportJSONFileAllFlag() {
// processFlagMap.put("Export JSON File All Flag", 1200);
// return;
// }

public void setcheckFileNameFlag() {
processFlagMap.put("Check File Name Flag", 1210);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,16 @@ public void writeAllArtifacts() throws java.io.IOException {
.registerMessage("0>info " + "writeAllArtifacts - DD Pins *** plus class *** File Done");

// write the 11179 DOM JSON file - requires DOMInfoModel to be executed
DMDocument.dmProcessState.setRelativeFileSpecDOMModelJSON(DMDocument.masterPDSSchemaFileDefn);
WriteDOMDDJSONFile writeDOMDDJSONFile = new WriteDOMDDJSONFile();
writeDOMDDJSONFile.writeJSONFile();
DMDocument.registerMessage("0>info " + "writeAllArtifacts - JSON Done");
// DMDocument.dmProcessState.setRelativeFileSpecDOMModelJSON(DMDocument.masterPDSSchemaFileDefn);
// WriteDOMDDJSONFile writeDOMDDJSONFile = new WriteDOMDDJSONFile();
// writeDOMDDJSONFile.writeJSONFile();
// DMDocument.registerMessage("0>info " + "writeAllArtifacts - JSON Done");

// write the 11179 DOM JSON file - requires DOMInfoModel to be executed
// *** NEW VERSION ***
// DMDocument.dmProcessState.setRelativeFileSpecDOMModelJSON(DMDocument.masterPDSSchemaFileDefn);
WriteDOMDDJSONFileLib writeDOMDDJSONFileNew = new WriteDOMDDJSONFileLib();
writeDOMDDJSONFileNew.writeJSONFile(false, DMDocument.masterPDSSchemaFileDefn); // false -> not LDDToolFlag
DMDocument.registerMessage("0>info " + "writeAllArtifacts - JSON *** NEW *** Done");
DMDocument.dmProcessState.setRelativeFileSpecDOMModelJSON(DMDocument.masterPDSSchemaFileDefn);
WriteDOMDDJSONFileLib writeDOMDDJSONFileLib = new WriteDOMDDJSONFileLib();
writeDOMDDJSONFileLib.writeJSONFile(DMDocument.masterPDSSchemaFileDefn);
DMDocument.registerMessage("0>info " + "writeAllArtifacts - JSON Done");


// write the 11179 DD Data Element Definition XML Files
Expand Down Expand Up @@ -246,12 +245,20 @@ public void writeLDDArtifacts() throws java.io.IOException {
+ DMDocument.masterLDDSchemaFileDefn.identifier + " - Done");

// write the 11179 JSON file
if (DMDocument.exportJSONFileFlag || DMDocument.exportJSONFileAllFlag) {
DMDocument.dmProcessState.setRelativeFileSpecDOMModelJSON(DMDocument.masterLDDSchemaFileDefn);
WriteDOMDDJSONFile writeDOMDDJSONFile = new WriteDOMDDJSONFile();
writeDOMDDJSONFile.writeJSONFile();
DMDocument.registerMessage("0>info " + "writeAllArtifacts - JSON Done");
}
// if (DMDocument.exportJSONFileFlag || DMDocument.exportJSONFileAllFlag) {
// DMDocument.dmProcessState.setRelativeFileSpecDOMModelJSON(DMDocument.masterLDDSchemaFileDefn);
// WriteDOMDDJSONFile writeDOMDDJSONFile = new WriteDOMDDJSONFile();
// writeDOMDDJSONFile.writeJSONFile();
// DMDocument.registerMessage("0>info " + "writeAllArtifacts - JSON Done");
// }

// write the 11179 DOM JSON file
if (DMDocument.exportJSONFileFlag) {
DMDocument.dmProcessState.setRelativeFileSpecDOMModelJSON(DMDocument.masterPDSSchemaFileDefn);
WriteDOMDDJSONFileLib writeDOMDDJSONFileLib = new WriteDOMDDJSONFileLib();
writeDOMDDJSONFileLib.writeJSONFile(DMDocument.masterPDSSchemaFileDefn);
DMDocument.registerMessage("0>info " + "writeAllArtifacts - JSON Done");
}

// write the Info Spec file
if (DMDocument.exportSpecFileFlag) {
Expand Down Expand Up @@ -283,6 +290,7 @@ public void writeLDDArtifacts() throws java.io.IOException {
DMDocument.registerMessage ("0>info " + "ExportModels - OWL/RDF output in RDF format (IM Export) - Done");
}

// *** To be deprecated ***
// write the Terminological Mapping defined in the TermMap LDD to JSON
if (DMDocument.exportTermMapFileFlag) {
// write the terminological entry files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ public void writeArtifacts (boolean lLDDToolFlag, SchemaFileDefn lSchemaFileDefn
WriteLucidFiles.WriteLucidFile();
*/

// write the terminological entry files
/* WriteDOMTermEntryJSON writeDOMTermEntryJSON = new WriteDOMTermEntryJSON ();
writeDOMTermEntryJSON.WriteDOMTermEntries (DMDocument.masterPDSSchemaFileDefn);
DMDocument.registerMessage ("0>info " + "WriteDOMTermEntryJSON - Done"); */


// write the PDS4 CCSDS CSV file
/*
WriteDocCSV writeDocCSV = new WriteDocCSV ();
Expand Down