Atomic Schema: Classes

How to read classes

Example:

  • description - (required, AtomicURL, TranslationBox) human readable explanation of what the Class represents.

Means:

This class has a required property with shortname description. This Property has a Datatype of AtomicURL, and these should point to TranslationBox instances.

Note: the URLs for properties are missing and will be added at a later time.

Property

URL: https://atomicdata.dev/classes/Property

The Property class. The thing that the Property field should link to. A Property is an abstract type of Resource that describes the relation between a Subject and a Value. A Property provides some semantic information about the relationship (in its description), it provides a shorthand (the shortname) and it links to a Datatype. Here's a list of useful Properties. You can constrain properties further by using SHACL Properties.

Properties of a Property instance:

  • shortname - (required, Slug) the shortname for the property, used in ORM-style dot syntax (thing.property.anotherproperty).
  • description - (optional, AtomicURL, TranslationBox) the semantic meaning of the.
  • datatype - (required, AtomicURL, Datatype) a URL to an Atomic Datatype, which defines what the datatype should be of the Value in an Atom where the Property is the
  • classtype - (optional, AtomicURL, Class) if the datatype is an Atomic URL, the classtype defines which class(es?) is (are?) acceptable.
["https://example.com/properties/createdAt","https://atomicdata.dev/property/shortname","createdAt"]
["https://example.com/properties/createdAt","https://atomicdata.dev/property/datatype","https://atomicdata.dev/datatype/datetime"]

Datatype

URL: https://atomicdata.dev/classes/Datatype

A Datatype specifies how a Value value should be interpreted. Datatypes are concepts such as boolean, string, integer. Since DataTypes can be linked to, you dan define your own. However, using non-standard datatypes limits how many applications will know what to do with the data.

Properties:

  • description - (required, AtomicURL, TranslationBox) how the datatype functions.
  • stringSerialization - (required, AtomicURL, TranslationBox) how the datatype should be parsed / serialized as an UTF-8 string
  • stringExample - (required, string) an example stringSerialization that should be parsed correctly
  • binarySerialization - (optional, AtomicURL, TranslationBox) how the datatype should be parsed / serialized as a byte array.
  • binaryExample - (optional, string) an example binarySerialization that should be parsed correctly. Should have the same contents as the stringExample. Required if binarySerialization is present on the DataType.

Class

URL: https://atomicdata.dev/classes/Class

A Class is an abstract type of Resource, such as Person. It is convention to use an Uppercase in its URI. Note that in Atomic Data, a Resource can have several Classes - not just a single one. If you need to set more complex constraints to your Classes (e.g. maximum string length, Properties that depend on each other), check out SHACL.

Properties:

  • shortname - (required, Slug) a short string shorthand.
  • description - (required, AtomicURL, TranslationBox) human readable explanation of what the Class represents.
  • requires - (optional, ResourceArray, Property) a list of Properties that are required. If absent, none are required. These SHOULD have unique shortnames.
  • recommends - (optional, ResourceArray, Property) a list of Properties that are recommended. These SHOULD have unique shortnames.
  • deprecatedProperties - (optional, ResourceArray, Property) - a list of Properties that should no longer be used.

A resource indicates it is an instance of that class by adding a https://atomicdata.dev/properties/isA Atom.

Example:

["https://example.com/classes/Person","https://atomicdata.dev/properties/isA","https://atomicdata.dev/classes/Class"]
["https://example.com/classes/Person","https://atomicdata.dev/properties/recommends","https://example.com/classes/Person/recommends"]
["https://example.com/classes/Person/recommends","https://atomicdata.dev/properties/isA","https://atomicdata.dev/dataTypes/ResourceArray"]