Skip to content

Latest commit

 

History

History
92 lines (64 loc) · 6.86 KB

dataModel.md

File metadata and controls

92 lines (64 loc) · 6.86 KB

Data Model

The data model used in SDOAdapter is based on the data model of Schema.org.

The data model used in SDOAdapter consists of following 5 types:

The algorithm that translates the data model of schema.org to the one used by this library is described in algorithm.md. How the data model of schema.org is used to define external vocabularies is described in vocabularies.md

Class

A Class (also known as Type in schema.org) is a concept that describes entities like a "Hotel" or a "Person". Classes can have properties that describe them. Classes are organized in a "multiple inheritance hierarchy" where each Class may be a subclass of one or multiple Classes, where "Thing" is the most general Class.

Classes have following important attributes (for a complete list check the API):

  • IRI: The IRI of the Class. e.g. http://schema.org/Hotel
  • name: The name(s) (multilinguality) of the Class. e.g. Hotel
  • description: The description(s) about the Class.
  • properties: The possible properties that this Class can have. e.g. http://schema.org/openingHoursSpecification
  • superclasses: Classes that are "parents" of this Class. e.g. http://schema.org/LodgingBusiness
  • subclasses: Classes that are "children" of this Class.
  • superseded by: A newer Class that is meant to substitute this Class, in general it is recommended to not use superseded Classes.

Property

A Property is a characteristic that a Class can have, like "name" or "address". Properties have one or multiple classes as domains, those domains (and their subclasses) can use the Property. Properties have one or multiple classes/enumerations/data types as ranges, describing valid value types for the Property.

Properties have following important attributes (for a complete list check the API):

  • IRI: The IRI of the Property. e.g. http://schema.org/name
  • name: The name(s) (multilinguality) of the Property. e.g. name
  • description: The description(s) about the Property.
  • domains: The classes that can use this Property . e.g. http://schema.org/Thing
  • ranges: The classes, enumerations, and data types that can be used as values for this Property. e.g. http://schema.org/Text
  • superseded by: A newer Property that is meant to substitute this Property, in general it is recommended to not use superseded Properties.

Enumeration

An Enumeration is a specific type of Class, for which predefined instances (Enumeration Members) exist. In practise, instead of creating a new instance for an Enumeration, predefined instances referenced by their IRI are used (the property dayOfWeek has the Enumeration DayOfWeek as range. In this example the predefined instance with the @id http://schema.org/Saturday is used as value for the Enumeration):

{
  "@type": "OpeningHoursSpecification",
  "closes": "17:00:00" ,
  "dayOfWeek": "http://schema.org/Saturday",
  "opens": "09:00:00"
}

Unfortunately, the data model of schema.org does not specify exactly how Enumerations are supposed to be modeled and used, which has generated some uncertainty around their definition (especially in schema.org extensions) and usage, e.g. Enumerations without Enumeration Members, Enumerations that have Properties, Enumeration Members that belong to multiple Enumerations, etc.

However, in the data model of SDOAdapter Enumerations are treated as Classes with a set of predefined instances (for a complete list of attributes check the API):

  • enumeration members: The Enumeration Members that are predefined instances (values) for this Enumeration . e.g. http://schema.org/Saturday

SDOAdapter treats any Class that is directly or indirectly a subclass of the Class http://schema.org/Enumeration as an Enumeration. For details, check algorithm.md.

EnumerationMember

An EnumerationMember is a predefined instance for a specific Enumeration.

EnumerationMember have following important attributes (for a complete list check the API):

  • IRI: The IRI of the EnumerationMember. e.g. http://schema.org/Friday
  • name: The name(s) (multilinguality) of the EnumerationMember. e.g. Friday
  • description: The description(s) about the EnumerationMember.
  • domain enumeration: The Enumeration type(s) for which this EnumerationMember is a valid predefined instance (usually there is only 1 Enumeration type to which an EnumerationMember belongs). e.g. http://schema.org/DayOfWeek
  • superseded by: A newer EnumerationMember that is meant to substitute this EnumerationMember, in general it is recommended to not use superseded EnumerationMember.

DataType

A DataType represents a basic data type such as Integer or String.

DataType have following important attributes (for a complete list check the API):

  • IRI: The IRI of the DataType. e.g. http://schema.org/Integer
  • name: The name(s) (multilinguality) of the DataType. e.g. Integer
  • description: The description(s) about the DataType.
  • super-dataTypes: DataTypes that are "parents" of this DataType. e.g. http://schema.org/Number
  • sub-dataTypes: DataTypes that are "children" of this DataType.
  • superseded by: A newer DataType that is meant to substitute this DataType, in general it is recommended to not use superseded DataType.