COLNEO Pro 1.0
Loading...
Searching...
No Matches
PsCoreAPI

Description

Core API interface for Property Scripts.

internal

This API provides only methods that reads information.

Since
1.0

(c) COLNEO GmbH

Functions

OBJECTS
ApiJsonResponse getObjects (QStringList &domains=QStringList()<< "geo", QString &filterexpression=QString())
 
HIERARCHIES / DOMAINS
ApiJsonResponse getParent (QString &objId)
 
ApiJsonResponse getChildren (QString &objId, int depth=0)
 
OBJECT PROPERTIES
ApiJsonResponse getPropertyValue (QStringList &objIds, QString &name, QString &xsDataType)
 
ApiJsonResponse getProperties (QString &objId, QVariantMap &filter=QVariantMap())
 
RELATIONS
ApiJsonResponse getLinkedObjects (QStringList &sourceIds, QVariantMap &options=QVariantMap())
 

Function Documentation

◆ getChildren

ApiJsonResponse getChildren ( QString & objId,
int depth = 0 )
slot
Note
Usable with script properties

Get children of object with given id recursivly up to given depth.

Parameters
objIdID of the object
depth[optional] Recursion depth, default = 0 (maximum depth).
Returns
List of IDs of child objects.
data : Array<string>
Since
1.0.0

◆ getLinkedObjects

ApiJsonResponse getLinkedObjects ( QStringList & sourceIds,
QVariantMap & options = QVariantMap() )
slot
Note
Usable with script properties

Get all objects linked to given objects.

Parameters
sourceIds
options
{
...
}
Returns
List of Ids
{
data: string
}
Since
1.0.0

◆ getObjects

ApiJsonResponse getObjects ( QStringList & domains = QStringList()<< "geo",
QString & filterexpression = QString() )
slot
Note
Usable with script properties

Get objects.

Parameters
domainsDomain short code or combination as array, e.g. [ 'geo', 'act' ]
filterexpressionObject filter
"$ifc:Entity##xs:string ~like~ 'IfcWall%'"
Returns
List of object IDs.
data : Array<string>
Since
1.0

◆ getParent

ApiJsonResponse getParent ( QString & objId)
slot
Note
Usable with script properties

Get parent of object with given ID.

Parameters
objIdID of the object
Returns
ID of parent object, empty string if object has no parent
data : string
Since
1.0

◆ getProperties

ApiJsonResponse getProperties ( QString & objId,
QVariantMap & filter = QVariantMap() )
slot
Note
Usable with script properties

Get map of properties of a given object.

Note
Parameters
objIdID of the object.
filter[optional] Filter specification for getting properties. If defined the filter affects the name and data type of the fetched properties.
{
name: "MyNumber",
datatype : ["xs:double", "xs:float"]
}
Returns
Object with property type keys and values in JSON, e.g.:
data : {
"MyName##xs:string": "John",
"MyAge##xs:int": 42,
"IsMale##xs:boolean": true
}
Since
1.0.0

◆ getPropertyValue

ApiJsonResponse getPropertyValue ( QStringList & objIds,
QString & name,
QString & xsDataType )
slot
Note
Usable with script properties

Get property value for a one or more objects and property type.

Parameters
objIdsObject ID or list of object IDs
nameName of property.
xsDataTypeDatatype of property, one of
  • 'xs:string'
  • 'xs:double'
  • 'xs:float'
  • 'xs:long'
  • 'xs:int'
  • 'xs:boolean'
  • 'xs:ID'
  • 'xs:IDREF'
  • 'xs:anyURI'
  • 'xs:dateTime'
  • 'xs:date'
  • 'xs:object'
Returns
Value of property, depending on the datatype. In case of xs:object JSON.parse() will be called internally and an javascript object returned.
data : simple datatype | object
Since
1.0.0