From 315042f6963104618544461ca975878d11dfee36 Mon Sep 17 00:00:00 2001 From: Carl Wilson Date: Fri, 9 Jun 2023 11:07:16 +0100 Subject: [PATCH] DOC: Publication of JSON schema - abandoned trying to forward the latest schema. --- docs/schema/business-rule.json | 96 ++++ docs/schema/business-rule.json/index.md | 4 - docs/schema/format.json | 433 ++++++++++++++++++ docs/schema/format.json/index.md | 4 - docs/schema/index.md | 4 - docs/schema/par-property.json | 63 +++ docs/schema/par-property.json/index.md | 4 - docs/schema/preservation-action-type.json | 24 + .../preservation-action-type.json/index.md | 4 - docs/schema/preservation-action.json | 268 +++++++++++ docs/schema/preservation-action.json/index.md | 4 - docs/schema/representation-format.json | 113 +++++ .../representation-format.json/index.md | 4 - docs/schema/tool.json | 50 ++ docs/schema/tool.json/index.md | 4 - docs/schema/types.json | 79 ++++ docs/schema/types.json/index.md | 4 - 17 files changed, 1126 insertions(+), 36 deletions(-) create mode 100644 docs/schema/business-rule.json delete mode 100644 docs/schema/business-rule.json/index.md create mode 100644 docs/schema/format.json delete mode 100644 docs/schema/format.json/index.md delete mode 100644 docs/schema/index.md create mode 100644 docs/schema/par-property.json delete mode 100644 docs/schema/par-property.json/index.md create mode 100644 docs/schema/preservation-action-type.json delete mode 100644 docs/schema/preservation-action-type.json/index.md create mode 100644 docs/schema/preservation-action.json delete mode 100644 docs/schema/preservation-action.json/index.md create mode 100644 docs/schema/representation-format.json delete mode 100644 docs/schema/representation-format.json/index.md create mode 100644 docs/schema/tool.json delete mode 100644 docs/schema/tool.json/index.md create mode 100644 docs/schema/types.json delete mode 100644 docs/schema/types.json/index.md diff --git a/docs/schema/business-rule.json b/docs/schema/business-rule.json new file mode 100644 index 0000000..9bf4b07 --- /dev/null +++ b/docs/schema/business-rule.json @@ -0,0 +1,96 @@ +{ + "$id": "http://www.parcore.org/schema/business-rule.json/#", + "$schema": "http://json-schema.org/draft-06/schema#", + "additionalProperties": false, + "definitions": { + "action": { + "properties": { + "optionalInputProperties": { + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/inputProperty" + }, + "type": "array" + }, + "outputFilesRetrieved": { + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/outputFile" + }, + "type": "array" + }, + "outputPropertiesRetrieved": { + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/outputProperty" + }, + "type": "array" + }, + "preservationAction": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "priority": { + "type": "integer" + }, + "rawOutputsRetrieved": { + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/outputRaw" + }, + "type": "array" + } + }, + "required": [ + "preservationAction" + ], + "type": "object" + } + }, + "description": "A Business Rule describes additional context asserting how a Preservation Action should be performed. This allows the author of the rule to specify for example, a priority order in which to attempt certain Preservation Actions on particular content types, which inputs to supply, which outputs to extract etc. It also allows some free text fields to provide justification or share experience.", + "properties": { + "description": { + "description": "A short human readable explanation/display name for the Business Rule, e.g. 'Use md5sum to perform the MD5Check Preservation Action for all files'", + "type": "string" + }, + "formatFamilies": { + "description": "A list of format families that this Business Rule should be applied to", + "items": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "type": "array" + }, + "formats": { + "description": "A list of file formats that this Business Rule should be applied to", + "items": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "type": "array" + }, + "id": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "localLastModifiedDate": { + "format": "date-time", + "type": "string" + }, + "notes": { + "description": "A free text field for providing additional context. This may be used to record the decision making process that led to the formulation of this rule, details of real-world experience in applying the rule, or any other text.", + "type": "string" + }, + "preservationActionTypes": { + "description": "A list of Preservation Action Types that this Business Rule should be applied to. This might be a subset of those that the Preservation Actions themselves apply to. For example, a file format transformation action might itself apply to Migration and Normalization action types, but the Business Rule might be applicable only to Normalization", + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action-type.json/#" + }, + "type": "array" + }, + "preservationActions": { + "description": "A list of specific actions. These are defined internally to reference the Core Preservation Action, the priority order in which it should be performed, and any inputs and outputs that should be used.", + "items": { + "$ref": "http://www.parcore.org/schema/business-rule.json/#/definitions/action" + }, + "type": "array" + } + }, + "required": [ + "id" + ], + "title": "Business Rule", + "type": "object" +} diff --git a/docs/schema/business-rule.json/index.md b/docs/schema/business-rule.json/index.md deleted file mode 100644 index 8fcd723..0000000 --- a/docs/schema/business-rule.json/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /business-rule.json ---- diff --git a/docs/schema/format.json b/docs/schema/format.json new file mode 100644 index 0000000..fbb91da --- /dev/null +++ b/docs/schema/format.json @@ -0,0 +1,433 @@ +{ + "$id": "http://www.parcore.org/schema/format.json/#", + "$schema": "http://json-schema.org/draft-06/schema#", + "additionalProperties": false, + "definitions": { + "authorInformation": { + "additionalProperties": false, + "properties": { + "authorCompoundName": { + "type": "string" + }, + "authorId": { + "type": "string" + }, + "authorIdNamespace": { + "type": "string" + }, + "authorName": { + "type": "string" + }, + "organisationName": { + "type": "string" + } + }, + "required": [ + "authorId", + "authorIdNamespace" + ], + "type": "object" + }, + "byteSequenceInformation": { + "additionalProperties": false, + "properties": { + "byteSequenceId": { + "type": "string" + }, + "byteSequenceIdNamespace": { + "type": "string" + }, + "byteSequenceValue": { + "type": "string" + }, + "encoding": { + "default": "PRONOM", + "enum": [ + "PRONOM", + "ASCII", + "HEX", + "REGEX_PERL" + ], + "type": "string" + }, + "endianness": { + "type": "string" + }, + "indirectOffsetLength": { + "type": "string" + }, + "indirectOffsetLocation": { + "type": "string" + }, + "maxOffset": { + "type": "string" + }, + "offset": { + "type": "string" + }, + "positionType": { + "type": "string" + } + }, + "required": [ + "byteSequenceId", + "byteSequenceIdNamespace" + ], + "type": "object" + }, + "developerInformation": { + "additionalProperties": false, + "properties": { + "developerCompoundName": { + "type": "string" + }, + "developerId": { + "type": "string" + }, + "developerIdNamespace": { + "type": "string" + }, + "developerName": { + "type": "string" + }, + "organisationName": { + "type": "string" + } + }, + "required": [ + "developerId", + "developerIdNamespace" + ], + "type": "object" + }, + "documentInformation": { + "additionalProperties": false, + "properties": { + "author": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/authorInformation" + }, + "availabilityDescription": { + "type": "string" + }, + "availabilityNote": { + "type": "string" + }, + "displayText": { + "type": "string" + }, + "documentIPR": { + "type": "string" + }, + "documentId": { + "type": "string" + }, + "documentIdNamespace": { + "type": "string" + }, + "documentNote": { + "type": "string" + }, + "documentType": { + "type": "string" + }, + "publicationDate": { + "type": "string" + }, + "publisher": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/publisherInformation" + }, + "titleText": { + "type": "string" + } + }, + "required": [ + "documentId", + "documentIdNamespace" + ], + "type": "object" + }, + "environmentInformation": { + "type": "string" + }, + "externalSignatureInformation": { + "additionalProperties": false, + "properties": { + "externalSignatureId": { + "type": "string" + }, + "externalSignatureIdNamespace": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "signatureType": { + "type": "string" + } + }, + "type": "object" + }, + "identifierInformation": { + "additionalProperties": false, + "properties": { + "identifier": { + "type": "string" + }, + "identifierType": { + "type": "string" + } + }, + "required": [ + "identifier", + "identifierType" + ], + "type": "object" + }, + "internalSignatureInformation": { + "additionalProperties": false, + "properties": { + "byteSequences": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/byteSequenceInformation" + }, + "type": "array" + }, + "signatureId": { + "type": "string" + }, + "signatureIdNamespace": { + "type": "string" + }, + "signatureName": { + "type": "string" + }, + "signatureNote": { + "type": "string" + } + }, + "required": [ + "signatureId", + "signatureIdNamespace" + ], + "type": "object" + }, + "provenanceInformation": { + "additionalProperties": false, + "properties": { + "provenanceDescription": { + "type": "string" + }, + "provenanceName": { + "type": "string" + }, + "provenanceSourceDate": { + "format": "date", + "type": "string" + }, + "provenanceSourceId": { + "type": "string" + }, + "provenanceSourceNamespace": { + "type": "string" + } + }, + "required": [ + "provenanceSourceId", + "provenanceSourceNamespace" + ], + "type": "object" + }, + "publisherInformation": { + "additionalProperties": false, + "properties": { + "organisationName": { + "type": "string" + }, + "publisherCompoundName": { + "type": "string" + }, + "publisherId": { + "type": "string" + }, + "publisherIdNamespace": { + "type": "string" + }, + "publisherName": { + "type": "string" + } + }, + "required": [ + "publisherId", + "publisherIdNamespace" + ], + "type": "object" + }, + "registryVersionInformation": { + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "registryNamespace": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "registryNamespace", + "version" + ], + "type": "object" + }, + "relatedFormatInformation": { + "additionalProperties": false, + "properties": { + "relatedFormatId": { + "type": "string" + }, + "relatedFormatIdNamespace": { + "type": "string" + }, + "relatedFormatName": { + "type": "string" + }, + "relatedFormatVersion": { + "type": "string" + }, + "relationshipType": { + "type": "string" + } + }, + "required": [ + "relationshipType", + "relatedFormatId", + "relatedFormatIdNamespace" + ], + "type": "object" + } + }, + "description": "A file format as defined by PRONOM", + "properties": { + "aliases": { + "items": { + "type": "string" + }, + "type": "array" + }, + "binaryFileFormat": { + "type": "string" + }, + "byteOrders": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "developers": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/developerInformation" + }, + "type": "array" + }, + "disclosure": { + "type": "string" + }, + "documents": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/documentInformation" + }, + "type": "array" + }, + "externalSignatures": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/externalSignatureInformation" + }, + "type": "array" + }, + "families": { + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier", + "description": "A persistent unique identifier for the format, in PAR form" + }, + "identifiers": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/identifierInformation" + }, + "type": "array" + }, + "internalSignatures": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/internalSignatureInformation" + }, + "type": "array" + }, + "lastUpdatedDate": { + "format": "date", + "type": "string" + }, + "localLastModifiedDate": { + "format": "date-time", + "type": "string" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string" + }, + "provenance": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/provenanceInformation" + }, + "registryVersions": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/registryVersionInformation" + }, + "type": "array" + }, + "relatedFormats": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/relatedFormatInformation" + }, + "type": "array" + }, + "releaseDate": { + "format": "date", + "type": "string" + }, + "risk": { + "type": "string" + }, + "technicalEnvironment": { + "$ref": "http://www.parcore.org/schema/format.json/#/definitions/environmentInformation" + }, + "types": { + "items": { + "type": "string" + }, + "type": "array" + }, + "version": { + "type": "string" + }, + "withdrawnDate": { + "format": "date", + "type": "string" + } + }, + "required": [ + "id", + "localLastModifiedDate" + ], + "title": "Format", + "type": "object" +} diff --git a/docs/schema/format.json/index.md b/docs/schema/format.json/index.md deleted file mode 100644 index e0b79ef..0000000 --- a/docs/schema/format.json/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /format.json ---- diff --git a/docs/schema/index.md b/docs/schema/index.md deleted file mode 100644 index a4fed7b..0000000 --- a/docs/schema/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /types.json ---- diff --git a/docs/schema/par-property.json b/docs/schema/par-property.json new file mode 100644 index 0000000..73a9105 --- /dev/null +++ b/docs/schema/par-property.json @@ -0,0 +1,63 @@ +{ + "$id": "http://www.parcore.org/schema/par-property.json/#", + "$schema": "http://json-schema.org/draft-06/schema#", + "additionalProperties": false, + "description": "this is a skeleton definition of a Property", + "properties": { + "class": { + "description": "Property Class is the logical type of a specific property falls, e.g. fmt/43 is a file format, MD5 and SHA512 are both checksums, PASS and FAIL are both format validity measures.", + "enum": [ + "checksum", + "file format", + "validity", + "size", + "rate", + "raw", + "other" + ] + }, + "description": { + "description": "A human readable description of the property", + "type": "string" + }, + "equivalentTo": { + "description": "Equivalent To allows for assertions that a specific property is equivalent to named properties in other schemas or registries, for example, an Aspect Ration property for a video may be declared to be equivalent to the ebucore:aspectRatio, even if the representation of the measurement is different", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "localLastModifiedDate": { + "format": "date-time", + "type": "string" + }, + "type": { + "description": "Property Type is the datatype in which the value of a specific property should be formatted, for example fmt/43, MD5 and SHA512 values are typically strings, validity metrics may be booleans, size measures will be numeric types.", + "enum": [ + "string", + "boolean", + "integer", + "float", + "other" + ] + }, + "units": { + "description": "Property Units allow for the specification of the units in which the value is given, for example an image size may be given in pixels (px), video bitrates may be specified in bits per second (bps) or kilobits per second (kbps).", + "type": "string" + }, + "value": { + "description": "Property Value is the measured value of a specific property for a particular object.", + "type": "string" + } + }, + "required": [ + "id", + "class", + "type" + ], + "title": "PAR Property", + "type": "object" +} diff --git a/docs/schema/par-property.json/index.md b/docs/schema/par-property.json/index.md deleted file mode 100644 index 81fc10f..0000000 --- a/docs/schema/par-property.json/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /par-property.json ---- diff --git a/docs/schema/preservation-action-type.json b/docs/schema/preservation-action-type.json new file mode 100644 index 0000000..bcc53ee --- /dev/null +++ b/docs/schema/preservation-action-type.json @@ -0,0 +1,24 @@ +{ + "$id": "http://www.parcore.org/schema/preservation-action-type.json/#", + "$schema": "http://json-schema.org/draft-06/schema#", + "additionalProperties": false, + "description": "The type of the preservation action as defined by PREMIS v3 event types. http://id.loc.gov/vocabulary/preservation/eventType.html", + "properties": { + "id": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "label": { + "type": "string" + }, + "localLastModifiedDate": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "label" + ], + "title": "Preservation Action Type", + "type": "object" +} diff --git a/docs/schema/preservation-action-type.json/index.md b/docs/schema/preservation-action-type.json/index.md deleted file mode 100644 index f35c901..0000000 --- a/docs/schema/preservation-action-type.json/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /preservation-action-type.json ---- diff --git a/docs/schema/preservation-action.json b/docs/schema/preservation-action.json new file mode 100644 index 0000000..94e7f29 --- /dev/null +++ b/docs/schema/preservation-action.json @@ -0,0 +1,268 @@ +{ + "$id": "http://www.parcore.org/schema/preservation-action.json/#", + "$schema": "http://json-schema.org/draft-06/schema#", + "anyOf": [ + { + "required": [ + "inputFiles", + "outputFiles" + ] + }, + { + "required": [ + "inputProperties", + "outputFiles" + ] + }, + { + "required": [ + "inputFiles", + "outputProperties" + ] + }, + { + "required": [ + "inputProperties", + "outputProperties" + ] + }, + { + "required": [ + "inputFiles", + "rawOutputs" + ] + }, + { + "required": [ + "inputProperties", + "rawOutputs" + ] + } + ], + "definitions": { + "inputFile": { + "additionalProperties": false, + "description": "A file input to a preservation action", + "properties": { + "description": { + "type": "string" + }, + "file": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parFile" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "file" + ], + "title": "Preservation Action Input File", + "type": "object" + }, + "inputProperty": { + "additionalProperties": false, + "description": "A property input to a preservation action", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parProperty": { + "$ref": "http://www.parcore.org/schema/par-property.json/#" + } + }, + "required": [ + "name", + "description", + "parProperty" + ], + "title": "Preservation Action Input Property", + "type": "object" + }, + "outputFile": { + "additionalProperties": false, + "description": "An output file from a preservation action", + "properties": { + "description": { + "type": "string" + }, + "file": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parFile" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "file" + ], + "title": "Preservation Action Output File", + "type": "object" + }, + "outputProperty": { + "additionalProperties": false, + "description": "An output property from a preservation action", + "properties": { + "description": { + "type": "string" + }, + "groupIdBinding": { + "type": "string" + }, + "groupIdLabel": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parProperty": { + "$ref": "http://www.parcore.org/schema/par-property.json/#" + }, + "toolBinding": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "parProperty" + ], + "title": "Preservation Action Output", + "type": "object" + }, + "outputRaw": { + "additionalProperties": false, + "description": "A raw output from a preservation action", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "value" + ], + "title": "Preservation Action Raw Output", + "type": "object" + } + }, + "properties": { + "constraints": { + "additionalItems": false, + "items": { + "properties": { + "allowedFormats": { + "items": { + "$ref": "http://www.parcore.org/schema/format.json/#" + }, + "type": "array" + }, + "allowedPropertiesAllOf": { + "items": { + "$ref": "http://www.parcore.org/schema/par-property.json/#" + }, + "type": "array" + }, + "allowedPropertiesAnyOf": { + "items": { + "$ref": "http://www.parcore.org/schema/par-property.json/#" + }, + "type": "array" + }, + "inputItemName": { + "type": "string" + } + }, + "type": "object" + }, + "minItems": 1, + "type": "array" + }, + "description": { + "type": "string" + }, + "example": { + "type": "string" + }, + "id": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "inputFiles": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/inputFile" + }, + "type": "array" + }, + "inputProperties": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/inputProperty" + }, + "type": "array" + }, + "inputToolArguments": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/inputToolArgument" + }, + "type": "array" + }, + "localLastModifiedDate": { + "format": "date-time", + "type": "string" + }, + "outputFiles": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/outputFile" + }, + "minItems": 1, + "type": "array" + }, + "outputProperties": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/outputProperty" + }, + "minItems": 1, + "type": "array" + }, + "rawOutputs": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/preservation-action.json/#/definitions/outputRaw" + }, + "minItems": 1, + "type": "array" + }, + "tool": { + "$ref": "http://www.parcore.org/schema/tool.json/#" + }, + "type": { + "$ref": "http://www.parcore.org/schema/preservation-action-type.json/#" + } + }, + "required": [ + "id", + "description", + "type", + "tool" + ], + "title": "Preservation Action", + "type": "object" +} diff --git a/docs/schema/preservation-action.json/index.md b/docs/schema/preservation-action.json/index.md deleted file mode 100644 index 8046b19..0000000 --- a/docs/schema/preservation-action.json/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /preservation-action.json ---- diff --git a/docs/schema/representation-format.json b/docs/schema/representation-format.json new file mode 100644 index 0000000..949e4be --- /dev/null +++ b/docs/schema/representation-format.json @@ -0,0 +1,113 @@ +{ + "$id": "http://www.parcore.org/schema/representation-format.json/#", + "$schema": "http://json-schema.org/draft-06/schema#", + "additionalProperties": false, + "definitions": { + "fileCriterion": { + "additionalProperties": false, + "description": "A criterion for a file within the multi-part object. A list of formats or format families, or both, may be specified, a content file is deemed to match this criterion if it is identified as any of the formats, or format families listed, i.e. the formats and families form a set of OR conditions. If no formats or families are listed, then any content file will match this criterion.", + "properties": { + "formatFamilies": { + "$ref": "http://www.parcore.org/schema/representation-format.json/#/definitions/identifierArray" + }, + "formats": { + "$ref": "http://www.parcore.org/schema/representation-format.json/#/definitions/identifierArray" + }, + "maximum": { + "default": "1", + "description": "This specifies the maximum number of matching content files required, by default this is 1. Specifying 0 means that no content files should match this criterion, specifying \"unbounded\" means any number of files may match this criterion.", + "oneOf": [ + { + "pattern": "^[0-9]+$", + "type": "string" + }, + { + "pattern": "^[Uu][Nn][Bb][Oo][Uu][Nn][Dd][Ee][Dd]$", + "type": "string" + } + ] + }, + "minimum": { + "default": "1", + "description": "This specifies the minimum number of matching content files required, by default this is 1. Specifying 0 makes matching this criterion optional.", + "pattern": "^[0-9]+$", + "type": "string" + } + }, + "title": "File Criterion", + "type": "object" + }, + "identifierArray": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "minItems": 1, + "type": "array" + }, + "representationFormatSignature": { + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "primaryFileCriteria" + ] + }, + { + "required": [ + "fileCriteria" + ] + } + ], + "description": "", + "properties": { + "fileCriteria": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/representation-format.json/#/definitions/fileCriterion" + }, + "minItems": 1, + "type": "array" + }, + "primaryFileCriteria": { + "additionalItems": false, + "items": { + "$ref": "http://www.parcore.org/schema/representation-format.json/#/definitions/fileCriterion" + }, + "minItems": 1, + "type": "array" + } + }, + "title": "Representation Format Signature", + "type": "object" + } + }, + "description": "This allows the definition of a set of criteria that must be matched in order to define a multi-part complex representation of an object. All specified criteria must be met for identification of a set of content as having a specific representation format.", + "properties": { + "description": { + "type": "string" + }, + "hasPriorityOver": { + "$ref": "http://www.parcore.org/schema/representation-format.json/#/definitions/identifierArray" + }, + "id": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "localLastModifiedDate": { + "type": "string" + }, + "name": { + "type": "string" + }, + "representationFormatSignature": { + "$ref": "http://www.parcore.org/schema/representation-format.json/#/definitions/representationFormatSignature" + } + }, + "required": [ + "id", + "name", + "representationFormatSignature" + ], + "title": "Representation Format", + "type": "object" +} diff --git a/docs/schema/representation-format.json/index.md b/docs/schema/representation-format.json/index.md deleted file mode 100644 index 9428396..0000000 --- a/docs/schema/representation-format.json/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /representation-format.json ---- diff --git a/docs/schema/tool.json b/docs/schema/tool.json new file mode 100644 index 0000000..f89e043 --- /dev/null +++ b/docs/schema/tool.json @@ -0,0 +1,50 @@ +{ + "$id": "http://www.parcore.org/schema/tool.json/#", + "$schema": "http://json-schema.org/draft-06/schema#", + "definitions": { + "tool": { + "additionalProperties": false, + "description": "A software tool or application that can be used to perform preservation actions", + "properties": { + "id": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/parIdentifier" + }, + "localLastModifiedDate": { + "format": "date-time", + "type": "string" + }, + "toolAcceptedParameters": { + "items": { + "$ref": "http://www.parcore.org/schema/types.json/#/definitions/inputToolArgument" + }, + "type": "array", + "uniqueItems": true + }, + "toolLabel": { + "type": "string" + }, + "toolName": { + "type": "string" + }, + "toolOperatingEnvironments": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "toolPublisher": { + "type": "string" + }, + "toolVersion": { + "type": "string" + } + }, + "required": [ + "id", + "toolName" + ], + "type": "object" + } + } +} diff --git a/docs/schema/tool.json/index.md b/docs/schema/tool.json/index.md deleted file mode 100644 index d023da4..0000000 --- a/docs/schema/tool.json/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /tool.json ---- diff --git a/docs/schema/types.json b/docs/schema/types.json new file mode 100644 index 0000000..e39cf77 --- /dev/null +++ b/docs/schema/types.json @@ -0,0 +1,79 @@ +{ + "$id": "http://www.parcore.org/schema/types.json/#", + "$schema": "http://json-schema.org/draft-06/schema#", + "definitions": { + "formatFamily": { + "additionalProperties": false, + "description": "A format family is simply a means of grouping more specific file formats into more general groups. These can be high level groupings such as Videos, Documents, etc, or more specific groupings such as JPEGs, Excel Spreadsheets, etc. It may even be used to group otherwise unrelated formats, to capture, for example, the set of accepted formats, for example, [PDF 1.4, TIFF, MKV, WAV], or to specify all formats, e.g. [ALL]. These can be formally specified, with a fixed ID and Namespace, or just a generic label", + "properties": { + "familyType": { + "type": "string" + }, + "fileFormats": { + "items": { + "$ref": "#/definitions/parIdentifier" + }, + "type": "array" + }, + "formatFamilies": { + "items": { + "$ref": "#/definitions/parIdentifier" + }, + "type": "array" + }, + "identifier": { + "$ref": "#/definitions/parIdentifier" + } + }, + "required": [], + "type": "object" + }, + "inputToolArgument": { + "additionalProperties": false, + "description": "A parameter to a tool, controlling the behaviour of that tool", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "parFile": { + "additionalProperties": false, + "description": "A file that is an input or output of a preservation action", + "properties": { + "filepath": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "parIdentifier": { + "additionalProperties": false, + "description": "A generic identifier type for any PAR Core Entity. An identifier in PAR consists of the name of the object to identify, and the namespace in which that name is unique. These basic components should be combined into a GUID (Globally Unique Identifier). This is intended to be the machine readable and usable form and is the resource identifier that can be specified unambiguously in an API call. It is strongly recommended that this is a Version 3 or Version 5 UUID, generated by specifying the name of the object and a UUID identifying the namespace. The name and namespace elements are intended to be more human readable and usable forms of the identifier. Names are not required to be universally unique, but the combination of name and namespace should be.", + "properties": { + "guid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "guid" + ], + "type": "object" + } + } +} diff --git a/docs/schema/types.json/index.md b/docs/schema/types.json/index.md deleted file mode 100644 index a4fed7b..0000000 --- a/docs/schema/types.json/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: forward -target: /types.json ----