You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Title (Goal)Content and structural validation
Primary Actor Information architect, developer
ScopeComponent
LevelSummary  
AuthorStefano Cossu
Story (A paragraph or two describing what happens)Enable validation of content structure and properties

 

I want to enforce input validation outside of individual client systems. This is related to the Content modeling use case.

This validation may include constraints for property domain and range, cardinality, uniqueness, etc.

Range validation should include both data types for literal properties and class constraints for in-repo resource properties.

Examples

  • Restrict the “myns:created” property to xsd:dateTime;

  • Restrict the “myns:hasInstance” property to resources of type “myns:Instance” or its subtypes (structural validation);

  • Make myns:createdDate single-valued (i.e. cardinality = 0..1)
  • Make myns:uid mandatory and single-valued (i.e. cardinality = 1..1)

  • Inherit property constraints from super-types
    • type myns:Document has a property definition for myns:uid as mandatory and myns:content as single-valued
    • type myns:TextDocument inherits these definitions
    • type myns:ImageDocument inherits myns:uid but overrides myns:content to being multi-valued
  • Ensure that no two resources with the same myns:uid are present in the repository (similar to a unique key constraint in a relational database)

 

Note

Due to the long discussion in the comments, this use case has been split into three child pages. See links below.

  • No labels