51Degrees IP Intelligence for Node.js

SwigData Class Reference

Detailed Description

Extension of aspectData which stores the results created by the SWIG wrapper.

Inheritance diagram for SwigData:

[legend]

Collaboration diagram for SwigData:

[legend]

Public Member Functions

 constructor ({ flowElement, swigResults })
 Constructor for SwigData.
 getInternal (key)
 Retrieves elementData via the swigWrapper but also casts it to the correct type via a check of the engine's property list metadata.
 getInternalIgnoringCase (key)
 Looks for a key again in lower case, which is how the engine keys its properties, so a key in any letter case finds its property.

Public Member Functions inherited from AspectData

 constructor ({ flowElement, missingPropertyService=new MissingPropertyServiceBase() })
 get (key)

Public Member Functions inherited from ElementData

 constructor ({ flowElement })
 getInternal (key)
 getInternalIgnoringCase (key)
 get (key)
 getAsString (key)
 getAsFloat (key)
 getAsInteger (key)

Member Function Documentation

◆ constructor()

SwigData::constructor ( { flowElement, swigResults })
inline

Constructor for SwigData.

Parameters
{object}options options object
{FlowElement}options.flowElement the FlowElement the data is part of
{object}options.swigResults the results from the swig engine

◆ getInternal()

SwigData::getInternal ( key)
inline

Retrieves elementData via the swigWrapper but also casts it to the correct type via a check of the engine's property list metadata.

IP intelligence properties are usually lists of weighted values where the weight indicates the proportion of the result that the value applies to. These are returned as JavaScript arrays of objects with 'value', 'weight' and 'rawWeight' entries.

Parameters
{string}key the property key to retrieve
Returns
{AspectPropertyValue} value property value

◆ getInternalIgnoringCase()

SwigData::getInternalIgnoringCase ( key)
inline

Looks for a key again in lower case, which is how the engine keys its properties, so a key in any letter case finds its property.

Parameters
{string}key the property key to retrieve
Returns
{AspectPropertyValue} value property value