Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DataObject

A data object is an instance that can be anything ranging from a person or asset to a more abstract object such as a Wi-Fi access point or [[Space]].

Usage

Creation

Objects can be created with an optional uid and display name.

const myObject = new DataObject("mvdewync", "Maxim");

Service binding

Data objects can be bounded to a service. Persistence is handled in DataObjectServices that store and load data objects.

myObject.bind(myModel).save();

Hierarchy

Index

Constructors

constructor

  • new DataObject(uid?: string, displayName?: string): DataObject

Properties

createdTimestamp

createdTimestamp: number

displayName

displayName: string

Object display name

parentUID

parentUID: string

Parent object identifier

Accessors

position

relativePositions

uid

  • get uid(): string
  • set uid(value: string): void

Methods

addRelativePosition

bind

clone

getPosition

getRelativePosition

  • getRelativePosition(referenceObjectUID: string, type?: string): RelativePosition<any>
  • Get relative position of a specified object

    Parameters

    • referenceObjectUID: string

      Reference object identifier

    • Optional type: string

      Constructor type of the relative position

    Returns RelativePosition<any>

    Relative position to reference object

getRelativePositions

hasRelativePosition

  • hasRelativePosition(referenceObjectUID: string): boolean

removeRelativePositions

  • removeRelativePositions(referenceObjectUID: string): void

setPosition