Add custom statuses for resources (MDP)
If you would like to add custom statuses for resources, you may do so by editing the metadata profile.
About asset statuses
Asset statuses are metadata labels that can be applied to all resources in a data.world org. Asset Statuses can be used to display at-a-glance status information about resources, and are often used for approval or validation use cases. They also provide another metadata feature for data.world to leverage in search and navigation.
Important
Note that you add status to all resources in the application.
STEP 1: Add default statuses
We recommend that you add at least the following status for use in the application. The disposition represents if the status is positive, negative, or neutral.
Status | Disposition |
---|---|
Approved | Positive disposition |
Deprecated | Negative disposition |
Pending | Neutral disposition |
Rejected | Negative disposition |
Warning | Negative disposition |
Use the following syntax to add these statuses.
# ### Asset Statuses # Asset Statuses can be applied to all resources and render through the app, like in search and when browsing the metadata catalog. # You can customize your org's asset statuses by subclassing `dwec:AssetStatus` like we've done here. # --- # First, define a subclass of `dwec:AssetStatus` and declare it's `dwec:inMetadataProfile`. It's normal to only have one metadata profile defined: `:MetadataProfileDefault`. :ApprovalStatus rdf:type rdfs:Class ; rdfs:label "Approval status" ; rdfs:subClassOf dwec:AssetStatus ; dwec:inMetadataProfile :MetadataProfileDefault ; . # An asset status with a "positive" disposition will render green. # ![asset_status](https://p195.p4.n0.cdn.getcloudapp.com/items/Blu4l2YG/76b26e29-a2d4-4c76-9927-5ddda3a37326.jpg?v=de5ca409e8388f03216b8f264aafcab4 "Positive disposition: Approved status example") :ApprovalStatusApproved rdf:type :ApprovalStatus ; rdfs:label "Approved" ; dwec:hasDisposition :DispositionPositive ; . # An asset status with a "negative" disposition will render red, such as "Warning", "Rejected", or "Deprecated" :ApprovalStatusDeprecated rdf:type :ApprovalStatus ; rdfs:label "Deprecated" ; dwec:hasDisposition :DispositionNegative ; . # ![asset_status](https://p195.p4.n0.cdn.getcloudapp.com/items/NQuwQ5wq/99551af2-f548-4583-8a2f-5a3870a55ae3.jpg?v=81b9793365d87205a8f8f0d3e140a75b "Negative disposition: Rejected status example") :ApprovalStatusRejected rdf:type :ApprovalStatus ; rdfs:label "Rejected" ; dwec:hasDisposition :DispositionNegative ; . # An asset status with a "neutral" disposition will render grey: # ![asset_status](https://p195.p4.n0.cdn.getcloudapp.com/items/WnuYjpYo/8d92e5c6-bed9-4c98-8d1b-b02da555518d.jpg?v=a56e1866b2b04d1c1f0a36923014dd37 "Neutral disposition: Pending status example") :ApprovalStatusPending rdf:type :ApprovalStatus ; rdfs:label "Pending" ; dwec:hasDisposition :DispositionNeutral ; . :ApprovalStatusWarning rdf:type :ApprovalStatus ; rdfs:label "Warning" ; dwec:hasDisposition :DispositionNegative ; .
Use the following syntax to add dispositions for these statuses - Positive, Neutral, Negative. The statuses will not show on the UI till you add these dispositions.
# ### Asset Statuses # Asset Statuses can be applied to all resources and render through the app, like in search and when browsing the metadata catalog. # You can customize your org's asset statuses by subclassing `dwec:AssetStatus` like we've done here. # --- # First, define a subclass of `dwec:AssetStatus` and declare it's `dwec:inMetadataProfile`. It's normal to only have one metadata profile defined: `:MetadataProfileDefault`. :ApprovalStatus rdf:type rdfs:Class ; rdfs:label "Approval status" ; rdfs:subClassOf dwec:AssetStatus ; dwec:inMetadataProfile :MetadataProfileDefault ;
STEP 2: Add custom subtypes for status
Now, let us extend the list of sub types by adding the following three custom subtypes for statutes: Certified, Under review, High Quality.
:ApprovalStatusCertified rdf:type :ApprovalStatus ; rdfs:label "Certified" ; dwec:hasDisposition :DispositionPositive ; . :ApprovalStatusUnderReview rdf:type :ApprovalStatus ; rdfs:label "Under Review" ; dwec:hasDisposition :DispositionNeutral ; . :ApprovalStatusHighQuality rdf:type :ApprovalStatus ; rdfs:label "High quality" ; dwec:hasDisposition :DispositionPositive ; .
View the results
Click Edit on any resource in the application and you will new status options.
Complete syntax after doing this task
ASSET STATUSES :ApprovalStatus rdf:type rdfs:Class ; rdfs:label "Approval status" ; rdfs:subClassOf dwec:AssetStatus ; dwec:inMetadataProfile :MetadataProfileDefault ; . :ApprovalStatusApproved rdf:type :ApprovalStatus ; rdfs:label "Approved" ; dwec:hasDisposition :DispositionPositive ; . :ApprovalStatusDeprecated rdf:type :ApprovalStatus ; rdfs:label "Deprecated" ; dwec:hasDisposition :DispositionNegative ; . :ApprovalStatusRejected rdf:type :ApprovalStatus ; rdfs:label "Rejected" ; dwec:hasDisposition :DispositionNegative ; . :ApprovalStatusPending rdf:type :ApprovalStatus ; rdfs:label "Pending" ; dwec:hasDisposition :DispositionNeutral ; . :ApprovalStatusWarning rdf:type :ApprovalStatus ; rdfs:label "Warning" ; dwec:hasDisposition :DispositionNeutral ; . :ApprovalStatusCertified rdf:type :ApprovalStatus ; rdfs:label "Certified" ; dwec:hasDisposition :DispositionPositive ; . :ApprovalStatusUnderReview rdf:type :ApprovalStatus ; rdfs:label "Under Review" ; dwec:hasDisposition :DispositionNeutral ; . :ApprovalStatusHighQuality rdf:type :ApprovalStatus ; rdfs:label "High quality" ; dwec:hasDisposition :DispositionPositive ; . :DispositionPositive rdf:type dwec:Disposition ; rdfs:label "Positive" ; . :DispositionNegative rdf:type dwec:Disposition ; rdfs:label "Negative" ; . :DispositionNeutral rdf:type dwec:Disposition ; rdfs:label "Neutral" ; .