Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SupplementalTypeInfoImpl

Package version

Class that provides information about a type is not materialized as a TS class.

Hierarchy

  • SupplementalTypeInfoImpl

Implements

Index

Constructors

constructor

Properties

allowedCotypeKinds

allowedCotypeKinds: EntityKinds[]

contextId

contextId: string

extensionKind

extensionKind: ExtensionKind

isAbstract

isAbstract: boolean

Optional parentSupplementalType

parentSupplementalType: SupplementalTypeInfo

Optional parentType

parentType: undefined | string

properties

properties: {}

Type declaration

type

type: string

Accessors

allowedCotypeVersions

  • get allowedCotypeVersions(): number[]

Methods

addConstraint

  • addConstraint(propertyName: string, valueConstraint: ValueConstraint): void

addCotype

addCotypeVersion

  • addCotypeVersion(version: number): void

addProperty

  • addProperty(propertyName: string, propertyTypeUri: string, isPlural: boolean, isOptional: boolean, maxCount?: undefined | number, minCount?: undefined | number, dictionaryKey?: undefined | string, instanceProperty?: undefined | string): void
  • Adds a property to this supplemental type

    Parameters

    • propertyName: string

      Name of the property.

    • propertyTypeUri: string

      URI that defines the type of the property.

    • isPlural: boolean

      True if the property is plural.

    • isOptional: boolean

      True if the property is optional.

    • Optional maxCount: undefined | number

      The maximum count of permitted values of the property.

    • Optional minCount: undefined | number

      The minimum count of permitted values of the property.

    • Optional dictionaryKey: undefined | string

      The name of the child property that acts as a dictionary key, or undefined if this property is not expressed as a dictionary.

    • Optional instanceProperty: undefined | string

      The name of a property of which this property's value must be an instance.

    Returns void

attachConstraints

bindInstanceProperties

checkForRequiredProperties

  • checkForRequiredProperties(parsingErrors: ParsingError[], parentId: string, properties: {}): void

doesHaveType

  • doesHaveType(typeId: string): boolean

tryParseProperty

  • Parse a property in a JSON token

    Parameters

    • model: Model

      Model to which to add object properties.

    • objectPropertyInfoList: ParsedObjectPropertyInfo[]

      List of object info structs for deferred assignments.

    • elementPropertyConstraints: ElementPropertyConstraint[]

      List of ElementPropertyConstraint to be checked after object property assignment.

    • aggregateContext: AggregateContext

      An AggregateContext object representing information retrieved from JSON-LD context blocks.

    • parsingErrors: ParsingError[]

      A ParsingErrorCollection to which any parsing errors are added.

    • parentId: string

      The identifier of the parent of the element.

    • propName: string

      The name of the property by which the parent refers to this element, used for auto ID generation.

    • propToken: any

      The property token to parse.

    • properties: {}

      A collection of properties to update with the property information.

      • [x: string]: any

    Returns boolean

    True if the property name is recognized.

trySetObjectProperty

  • trySetObjectProperty(propertyName: string, value: any, key: string | undefined, properties: {}): boolean
  • Try to set an object property with a given propertyName

    Parameters

    • propertyName: string

      The name of the property whose value to set if the property is recognized.

    • value: any

      The value to set.

    • key: string | undefined

      The key for dictionary properties.

    • properties: {}

      A collection of properties to update with the property information.

      • [x: string]: any

    Returns boolean

    True if the property name is recognized.

Generated using TypeDoc