Package-level declarations

Types

Link copied to clipboard
data class DatasetDrafted(val table: String, val document: ObjectNode, val skipped: List<SkippedColumn> = emptyList())
Link copied to clipboard
data class DatasetPublished(val version: Int, val document: ObjectNode)
Link copied to clipboard

The dataset registry's own error codes. The starter registers an HTTP status for each.

Link copied to clipboard
data class DatasetRetired(val version: Int)
Link copied to clipboard
data class DatasetRevised(val document: ObjectNode, val reviews: Map<String, FieldSensitivity>)
Link copied to clipboard
@Order(value = 1)
@Summary(value = "Draft a dataset from a table")
@CommandRoute(action = "draft", method = CommandRoute.Method.POST, appendIdPath = CommandRoute.AppendPath.ALWAYS)
data class DraftDataset(val id: String, val table: String, val source: String? = null)

Drafts the dataset id ({context}.{dataset}) from table: the server reads the table's columns and declares what they prove (types, nullability, dates, string arrays), suggests the scope and identity from conventional column names, and leaves sensitivity to the review.

Link copied to clipboard
data class FieldSensitivity(val level: SensitivityLevel? = null, val keepPrefix: Int = 0, val keepSuffix: Int = 0)

How one field is protected, as a reviewer decided: level null is the decision that the field is not sensitive, which is a decision too.

Link copied to clipboard
@Order(value = 4)
@Summary(value = "Publish a dataset")
@CommandRoute(action = "publish", method = CommandRoute.Method.POST, appendIdPath = CommandRoute.AppendPath.ALWAYS)
data class PublishDataset(val id: String)

Publishes the draft as the dataset's next version. Refused until the declaration names its scope, every string field's sensitivity is reviewed, and the declaration compiles against its table.

Link copied to clipboard
@Order(value = 5)
@Summary(value = "Retire a dataset")
@CommandRoute(action = "retire", method = CommandRoute.Method.POST, appendIdPath = CommandRoute.AppendPath.ALWAYS)
data class RetireDataset(val id: String)

Stops serving the dataset. Its draft and history stay; publishing again serves it again.

Link copied to clipboard
@Order(value = 3)
@Summary(value = "Review the sensitivity of a dataset's fields")
@CommandRoute(action = "sensitivity", method = CommandRoute.Method.PUT, appendIdPath = CommandRoute.AppendPath.ALWAYS)
data class ReviewSensitivity(val id: String, val fields: Map<String, FieldSensitivity>)

Records the reviewer's decision on each of fields: sensitive at a level, or not sensitive.

Link copied to clipboard
@Order(value = 2)
@Summary(value = "Revise a dataset's draft")
@CommandRoute(action = "revise", method = CommandRoute.Method.PUT, appendIdPath = CommandRoute.AppendPath.ALWAYS)
data class ReviseDataset(val id: String, val document: ObjectNode)

Replaces the draft's declaration with document, in the format of a dataset file. Sensitivity is not part of it: it is reviewed field by field (ReviewSensitivity). A field whose declaration is unchanged keeps its review.

Link copied to clipboard
Link copied to clipboard
data class SkippedColumn(val name: String, val type: String)

A column the draft leaves out because a dataset cannot declare its type.