Naming Conventions and Best Practices
Naming Conventions and Best Practices
DaSCH provides naming conventions to help organize data clearly. Following these guidelines helps research teams and others understand data structures.
Data Model
- Use a hyphen
-to separate words, e.g. alice-in-dasch-land for "Alice in DaSCH-Land".
Resource Classes
Name:
- Technical identifier (as opposed to the
Label, which is an identifier for humans) - Only letters are allowed (no special characters or numbers)
- Resource classes represent concepts, therefore nouns are particularly suited.
- Class names are written in PascalCase, meaning that each word is capitalized, e.g.
Manuscript,ManuscriptPage.
Label:
- Identifier for humans (as opposed to the
Name, which is an identifier for computers) - Can be multilingual. Available languages:
de,fr,it,rm,en - Should be unique within one data model to avoid confusion
Properties
Name:
- Technical identifier (as opposed to the
Label, which is an identifier for humans) - Only letters are allowed (no special characters or numbers)
- Properties represent relationships between classes. Their names are written in camelCase, i.e. the first letter is lower case, while subsequent words are capitalized, e.g.
hasLinkToPage,isPublished,hasPublicationDate. Depending on the type of the property, specific naming patterns should be followed:hasXXfor text/integer/date/... values (hasName)isXXfor boolean values (isPublished)isPartOfXXfor 'part of' other classes values (isPartOfBook)linkToXXfor links to other classes (linkToAuthor)hasXXListorhasXXTypefor list values (hasTopicList,hasBookType)
Label:
- Identifier for humans (as opposed to the
Name, which is an identifier for computers) - Can be multilingual. Available languages:
de,fr,it,rm,en - Should be unique within one data model to avoid confusion
- Use any useful term. For example, the label of a property with
namelinkToAuthormay beAuthor.
Lists (controlled vocabularies)
Label:
- Can be multilingual (available languages:
de,fr,it,rm,en). - Can contain the following special characters:
- alphanumeric characters
- hyphens
Data
Resource Instance Labels Guidelines
- Labels are the first information that users see from a resource instance.
- Labels should be meaningful but short, because long labels will be cropped in DSP-APP.
- Labels should be unique within a resource class to avoid confusion.
- Labels are not included in the full-text search.
- Abbreviations and acronyms should be used consistently throughout.
- Labels should provide human-readable summaries of resource instances.
File Names Guidelines
- File names should be meaningful but short.
- Prohibited characters: Slash
/, Question mark? - Allowed but not recommended: Whitespace, Dot
., other special characters such as&,=, or! - Use hyphens
-or underscores_to separate elements (no whitespaces). - Abbreviations and acronyms should be used consistently throughout.
Examples:
- Original:
Alice in_Through_the_Looking Glass_1871.pdf - Recommended:
Through_the_Looking_Glass_1871.pdf
- Original:
F102 = ILL47 (13_May_2014_0126) MJ.jpg - Recommended:
F102_ILL47_13-05-2014_0126_MJ.jpg