Skip to content

refactor Document.json#77

Draft
zopalmer14 wants to merge 1 commit intomainfrom
bug/Document-fix
Draft

refactor Document.json#77
zopalmer14 wants to merge 1 commit intomainfrom
bug/Document-fix

Conversation

@zopalmer14
Copy link

Summary

Should resolve: #75

Relevant Documentation: Document

Changes to Document.json

  • created accessURL property to create a way to link to the Document
  • added accessURL to 'required' array
  • mediaType - changed cardinality from 0..n to 0..1 (i.e., no longer an array) in line with James's recommendation
  • removed $id field from all properties/subschemas - related to DCAT-US3 JSON Schema doesn't comply with standard #73
  • changed order of properties to match documentation and to make it easier to remember which I'd reviewed (sorry if this ruined the diff)
  • added individual author property from documentation; key/name: creator
  • corporate author - adjusted key/name to corporateCreator
  • publisher(s) as a literal - changed from a string to an array of strings; matches documentation and makes sense
  • document type - adjusted key/name to type and title to "document type"; both originally category
  • conformsTo - adjusted title to "conforms to"; matches documentation

Discussion Topics

  • mediaType - could a single Document have multiple mediaTypes? What if a piece of documentation can be accessed as a .docx, .pdf, or .html file?
  • Do we need multiple options for listing the publisher(s)/author(s)
  • Should individual author and corporate author be an array rather than a single entry? If we did this, we could potentially consolidate the duplicative properties into one.
  • identifier - should it be changed from an array of strings to a string (e.g., from 0..n to 0..1)? We changed this for Dataset but it has the otherIdentifier property and Document does not.

Documentation and jsonschema Desynchronization

I don't think these are particularly important to fix, and I also know we've discussed ditching the HTML documentation and generating the documentation from the jsonschema, but I thought I would list what I noticed here anyways:

  • Documentation is generally missing the property descriptions/usage notes
  • title - cardinality is 1..n in documentation, jsonschema is 1; does the language map change the cardinality?
  • publisher - title is "publisher", but documentation says "publisher organization"
  • identifier - cardinality is 0..1 in documentation, jsonschema is 0..n
  • publication date (i.e., issued) - cardinality is 0..1 in jsonschema and class description, but is 0..n in property description
  • abstract - cardinality is 0..n in documentation, jsonschema is 0..1; does the language map change the cardinality?
  • description - cardinality is 0..n in documentation, jsonschema is 0..1; does the language map change the cardinality?

- created "accessURL" property to create a way to link to the Document
- added "accessURL" to 'required' array
- removed $id field from all properties (subschemas)
- added 'individual author' property from documentation to jsonschema; key/name: "creator"
- 'corporate author': adjusted key/name to "corporateCreator"
- 'publisher(s) as a literal': changed from a string to an array of strings; matches documentation and makes sense
- 'document type': adjusted key/name to "type" and title to "document type"; originally "category"
- 'conformsTo': adjusted title to "conforms to"; matches documentation
- 'mediaType': changed cardinality from 0..n to 0..1 (i.e., no longer an array) in line with James's recommendation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Document class

1 participant