Infohub JS API
Loading...
Searching...
No Matches
PropertySchema Class Reference

Description

An object of class PropertySchema' consists of metadata, an info block and the property schema itself.

ps = { 'info' : 'meta' : 'schema' : }

Public Member Functions

 _handle_dep (dep)
 _overrideMembers (overrides, obj)
 clear ()
 constructor ()
 findGroup (grpid)
 findPropertyType (typeid)
 getAsJson ()
 getId ()
 getInfo ()
 getMeta ()
 getName ()
 getPropertytypeList ()
 getPropertytypeListForQuery ()
 getPropertyTypes ()
 getSchema ()
 getShortId ()
 restoreSchemaState ()
 saveSchemaState ()
 setByJson (json_object)
 updateSchemaByDependencies (cb=null, node=null)

Function Documentation

◆ _handle_dep()

_handle_dep ( dep)

◆ _overrideMembers()

_overrideMembers ( overrides,
obj )

◆ clear()

clear ( )

◆ constructor()

constructor ( )

◆ findGroup()

findGroup ( grpid)
Parameters
{*}grpid
Returns
{Object|null}

◆ findPropertyType()

findPropertyType ( typeid)
Parameters
{*}typeid
Returns
{Object|null}

◆ getAsJson()

getAsJson ( )
Returns
{Object|null}

◆ getId()

getId ( )

◆ getInfo()

getInfo ( )

◆ getMeta()

getMeta ( )

◆ getName()

getName ( )

get name

◆ getPropertytypeList()

getPropertytypeList ( )

Get list of property types as string list.

Since
1.0, 03.2026, jh

◆ getPropertytypeListForQuery()

getPropertytypeListForQuery ( )

Get property types from key 'propertytypes' as list of { 'property_type' : '~eq~ ...typeid... ', 'value' : '~notnull'
} to pass it as a parameter to endpoint which creates a queryid.

◆ getPropertyTypes()

getPropertyTypes ( )

◆ getSchema()

getSchema ( )

◆ getShortId()

getShortId ( )

◆ restoreSchemaState()

restoreSchemaState ( )

◆ saveSchemaState()

saveSchemaState ( )

Save current schema internally.

The last saved schema can be restored by restoreSchemaState()

◆ setByJson()

setByJson ( json_object)

Set schema by JSON object.

Example:

{
"info" : {
"object_name" : "MONTAGEKONZEPT",
"object_id": "id037680084a76d8"
},
"metadata": {
"id": "id037680084a76d8",
"name": "MONTAGEKONZEPT"
},
"schema": {
"groups": {
"$order": [
"id7935cca9acbc8"
],
"id7935cca9acbc8": {
"comment": "",
...
}
Parameters
{Object}json_object
Returns
{boolean} true if schema is valid, false if schema is not valid @updated 06.2026

◆ updateSchemaByDependencies()

updateSchemaByDependencies ( cb = null,
node = null )

Update property members in schema taking dependencies into account.


The current state is saved and can be restored by restoreSchemaState().

Parameters
{function}cb
{Object}node Optional node with properties. By default the values in property list are used.
Returns
{Object} updated schema as JSON