C# Class Sdl.Web.Common.Mapping.SemanticMapping

General Semantic Mapping Class which reads schema mapping from json files on disk
ファイルを表示 Open project: sdl/dxa-web-application-dotnet Class Usage Examples

Public Methods

Method Description
GetPrefix ( string vocab, Localization loc ) : string

Gets prefix for semantic vocabulary.

GetQualifiedTypeName ( string typeName, string vocab = null ) : string

Gets a qualified (semantic) type name consisting of vocabulary ID and (local) type name.

GetQualifiedTypeName ( string typeName, string prefix, Localization localization ) : string

Gets a qualified (semantic) type name consisting of vocabulary ID and (local) type name.

GetSchema ( string id, Localization loc ) : SemanticSchema

Gets a semantic schema by id.

GetVocabulary ( string prefix, Localization loc ) : string

Gets semantic vocabulary by prefix.

Method Details

GetPrefix() public static method

Gets prefix for semantic vocabulary.
public static GetPrefix ( string vocab, Localization loc ) : string
vocab string Vocabulary name
loc Localization The localization
return string

GetQualifiedTypeName() public static method

Gets a qualified (semantic) type name consisting of vocabulary ID and (local) type name.
public static GetQualifiedTypeName ( string typeName, string vocab = null ) : string
typeName string The (local) type name.
vocab string The vocabulary ID or null for the default/core vocabulary.
return string

GetQualifiedTypeName() public static method

Gets a qualified (semantic) type name consisting of vocabulary ID and (local) type name.
public static GetQualifiedTypeName ( string typeName, string prefix, Localization localization ) : string
typeName string The (local) type name.
prefix string The vocabulary prefix.
localization Localization The context Localization.
return string

GetSchema() public static method

Gets a semantic schema by id.
public static GetSchema ( string id, Localization loc ) : SemanticSchema
id string The schema ID
loc Localization The localization
return SemanticSchema

GetVocabulary() public static method

Gets semantic vocabulary by prefix.
public static GetVocabulary ( string prefix, Localization loc ) : string
prefix string The prefix
loc Localization The localization
return string