Documentation Center

Core models overview

The SDL Digital Experience Accelerator core models provide options for semantic mapping of, for example, Links, Keywords, Paragraphs and content blocks, geo location, and media items. Browse through the model classes to get a feel for the flexibility provided by semantic mapping and read the documentation in this section te get an overview of the functionality.

Core models can be found:
  • for .NET: Sdl.Web.Common.Models
  • for Java: com.sdl.webapp.common.api.model

Links

Links can be represented by a simple text field, but you will often want to specify additional characteristics for a link. You can specify links in your models using the Link class and use the following properties:
  • Url
  • LinkText
  • AlternateText

The class also has semantics applied to it to ensure that it is automatically mapped correctly if your Content Manager Schemas use the Link Embedded Schema to define links. You can use this Schema to create internal links (links to Components in the Content Manager) or external links.

Keywords

If you use Keywords in your content model, by default your View Model property is populated with the Keyword title. To add information such as Keyword description, ID/key, or category, use the Tag class which provides:

  • DisplayText—the keyword description (or title if there is no description)
  • Key—the keyword key (or URI if there is no key)
  • TagCategory—the taxonomy URI

Paragraphs and content blocks

Articles on the Web site use the Paragraph class to represent a list of content blocks containing:
  • Subheading
  • Content
  • Media (see MediaItem below)
  • Caption

Geo location

If your model has properties representing a geographic location, you can use the Location class which provides:
  • Longitude
  • Latitude
  • Query (a free text field used to identify content on a map using a query string such as an address rather than exact co-ordinates)

Media items

If your model has media items, there are a set of classes you can use:
  • Image—if your media item is an image
  • Download—if your media item is a downloadable file
  • YouTubeVideo—if your media item is a link to a YouTube video
  • MediaItem—if your media item can be any one of the above