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

Liability Statement Missing in Translations from mdJSON #236

Closed
dwalt opened this issue Oct 18, 2022 · 11 comments
Closed

Liability Statement Missing in Translations from mdJSON #236

dwalt opened this issue Oct 18, 2022 · 11 comments

Comments

@dwalt
Copy link
Collaborator

dwalt commented Oct 18, 2022

Distribution Liability (distliab) is not writing to CSDGM from mdJSON input: schema{ } > metadata{ } > resourceDistribution[ ] > distribution{ } > liabilityStatement. Data appears to be in mdJSON file.

@dwalt dwalt added bug Unexpected problem or unintended behavior writer:fgdc labels Oct 18, 2022
@timothypage
Copy link
Contributor

I think the issue might be, related to this comment in the fgdc writer for distribution

# in FGDC each distribution can have only one distributor
# the passed in mdJson hDistribution may contain multiple distributors
# therefore, create a separate FGDC distribution record for each distributor
# and repeat the distribution information

so if they're no distributor, no distribution info gets printed out. I added a check if there's no distributors, still print out the description and liabilityStatement

@dwalt
Copy link
Collaborator Author

dwalt commented Oct 20, 2022

While that rule is true, it is not the use case here in which there is a single distribution.

Here is the mdJSON, followed by the translated CSDGM:

	"resourceDistribution": [{
		"distributor": [{
			"contact": {
				"role": "distributor",
				"party": [{
					"contactId": "1b759b80-bb2a-4b66-898d-56e4c9b4a341"
				}]
			},
			"orderProcess": [{
				"fees": "None",
				"orderingInstructions": "It is recommended that a geographic information system or other native GeoTIFF viewer be used to view the elevation raster."
			}],
			"transferOption": [{
				"onlineOption": [{
					"uri": "https://doi.org/10.5066/P9K7CFRI",
					"protocol": "HTTPS",
					"description": "Landing webpage for data download"
				}],
				"distributionFormat": [{
					"formatSpecification": {
						"title": "geoTIFF"
					},
					"compressionMethod": "LZW"
				}],
				"transferSize": 6000
			}]
		}],
		"description": "Authoritative source for the data.",
		"liablityStatement": "Unless otherwise stated, all data, metadata and related materials are considered to satisfy the quality standards relative to the purpose for which the data were collected. Although these data and associated metadata have been reviewed for accuracy and completeness and approved for release by the U.S. Geological Survey (USGS), no warranty expressed or implied is made regarding the display or utility of the data on any other system or for general or scientific purposes, nor shall the act of distribution constitute any such warranty."
	}],
<distinfo>
     <distrib>
        <cntinfo>
           <cntorgp>
              <cntorg>U.S. Geological Survey, Alaska Science Center</cntorg>
           </cntorgp>
           <cntaddr>
              <addrtype>physical</addrtype>
              <address>4210 University Drive</address>
              <city>Anchorage</city>
              <state>AK</state>
              <postal>99508</postal>
              <country>USA</country>
           </cntaddr>
           <cntvoice>907-786-7000</cntvoice>
           <cntfax>907-786-7020</cntfax>
           <cntemail>ascweb@usgs.gov</cntemail>
        </cntinfo>
     </distrib>
     <resdesc>Authoritative source for the data.</resdesc>
     <stdorder>
        <digform>
           <digtinfo>
              <formname>geoTIFF</formname>
              <formspec>geoTIFF</formspec>
              <filedec>LZW</filedec>
              <transize>6000</transize>
           </digtinfo>
           <digtopt>
              <onlinopt>
                 <computer>
                    <networka>
                       <networkr>https://doi.org/10.5066/P9K7CFRI</networkr>
                    </networka>
                 </computer>
                 <accinstr>HTTPS</accinstr>
                 <oncomp>Landing webpage for data download</oncomp>
              </onlinopt>
           </digtopt>
        </digform>
        <fees>None</fees>
        <ordering>It is recommended that a geographic information system or other native GeoTIFF viewer be used to view the elevation raster.</ordering>
     </stdorder>
     <techpreq/>
  </distinfo>

The distliab tags should appear below the resdesc tags

@timothypage
Copy link
Contributor

@dwalt I see the issue, it looks like there a misspelling, liablityStatement vs liabilityStatement (missing i)

this is coming from mdEditor https://github.com/adiwg/mdEditor/blob/f94770686df07ef76aa111f8f9734b32bbad7f21/app/pods/components/object/md-distribution/template.hbs#L22

since this is in the Production version I'll do a little digging on how we can handle upgrading existing mdJson to the correct spelling transparently in the editor, and I suppose we should handle both spellings in the translator

@dwalt
Copy link
Collaborator Author

dwalt commented Oct 21, 2022

Good eye! I would agree with supporting both spellings in the translator to avoid breaking older mdJSON files. I am surprised the schema validator did not catch the invalid tag.

timothypage added a commit that referenced this issue Oct 24, 2022
@timothypage
Copy link
Contributor

@dwalt this and the other "CSDGM" issues are deployed here for testing:

https://dev-translator.mdeditor.org/demo

(and https://dev-editor.mdeditor.org/dashboard points to the above)

@dwalt
Copy link
Collaborator Author

dwalt commented Nov 3, 2022

mdJSON-CSDGM translated successfully in test

@hmaier-fws
Copy link

@dwalt how do we want to handle instances where BOTH a liabilityStatement (imported from CSDGM) and a liablityStatement (missing i) are present? I came across an instance of this today. In theory, the statement entered via the editor (after CSDGM import) could supersede the initial statement. Do we want to append the two values into a single statement?

@dwalt
Copy link
Collaborator Author

dwalt commented Nov 29, 2022

@hmaier-fws I would tend to think that what the user entered in mdEditor is the latest and greatest and should supersede what was imported. Often, the re-entered text is the same as what was imported, so if it is appended, it is definitely wrong.

@dwalt dwalt changed the title CSDGM Writer - Liability Statement Missing Liability Statement Missing in Translations from mdJSON Jun 28, 2023
@dwalt
Copy link
Collaborator Author

dwalt commented Jun 28, 2023

This problem has been discovered in -2 output and HTML and is therefore universal. The fix should solve it for all writers that write Liability Statement, but should be verified.

@jwaspin
Copy link
Contributor

jwaspin commented Jul 5, 2023

PR created adiwg/mdEditor#557

@jwaspin jwaspin self-assigned this Jul 10, 2023
@jwaspin
Copy link
Contributor

jwaspin commented Jul 10, 2023

adiwg/mdEditor#497 is related

@hmaier-fws hmaier-fws linked a pull request Apr 8, 2024 that will close this issue
Merged
@hmaier-fws hmaier-fws removed a link to a pull request Apr 8, 2024
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants