Last updated

API / geotoolkit / schematics / data / WellBoreData / WellBoreData

Class: WellBoreData

data.WellBoreData.WellBoreData

WellBore data container. Schematics data are stored in “geotoolkit.schematics.data.WellBoreData” object. “addComponent” is the method to accumulate components in the object.

Throws

if param.units.depth or param.units.value does NOT belong to 'length' units

Hierarchy

Table of contents

Constructors
Methods
Css Properties
Name Type Description
unitsUnitsOptionsUnits options
units-depthstringDepth units
units-valuestringValue units

Contents

Constructors

new WellBoreData(options)

new WellBoreData(options?)

Parameters

Name Type
Optional optionsElements[] | Options

Overrides

EventDispatcher.constructor

Methods

addComponent

addComponent(componentName, data, index?): WellBoreData

Adds the component's data to the well bore

Fires

Events.Add

Example

const wellBoreData = new WellBoreData();
// Adding standard component - i.e. component inherited
// from @int/geotoolkit/schematics/scene/ReusableComponentNode:
wellBoreData.addComponent('tubing', { geometry: { depth: { from: 350, to: 400}} });
// Adding custom component  - i.e. component inherited
// from {@int/geotoolkit/schematics/scene/ComponentNode}:
wellBoreData.addComponent('MyCustomComponentName', { parA: valueA, parB: valueB, setOfParametersC: { C1: valueC1, C2: valueC2 } });

// (adding) - casings & cements:
wellBoreData.addComponent('casing', {
description: 'Drive Pipe',
geometry: {
depth: {from: 0, to: 341},
diameter: {outer: 26, inner: 25}
}
});

Parameters

Name Type Description
componentNamestringelement name
dataElementdata to build component node
Optional indexnumberindex to add the component at (@see WellBoreNode's 'setRenderingHints' method API for subset usage example)

Returns

WellBoreData

this


addComponents

addComponents(elements): WellBoreData

Adds the component's data to the well bore

Fires

Events.Add

Parameters

Name Type Description
elementsElements | Elements[]schematics element(s) to add

Returns

WellBoreData

this


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

EventDispatcher.dispose


generateId

generateId(): string

Generates unique component id

Returns

string

id


getClassName

getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getComponent

getComponent(componentName): Element[]

Gets all the component's data if available; "undefined" otherwise

Parameters

Name Type Description
componentNamestringcomponent name

Returns

Element[]

the component's data array


getComponentById

getComponentById(id): Elements

Gets a component by its ID. Returns instance if the component exists or null if id is null or no such component has been registered

Parameters

Name Type Description
idstringcomponent id

Returns

Elements

a meta information for component with the given id or null if not found.


getGeometryBounds

getGeometryBounds(): Rect

Gets geometry bounds

Returns

Rect


getProperties

getProperties(): OptionsOut

Gets all the properties pertaining to this object

Returns

OptionsOut

properties


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

EventDispatcher.hasEventListener


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

EventDispatcher.isDisposed


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

EventDispatcher.isSilent


notify

notify<E>(type, source, args?): WellBoreData

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceWellBoreDataof the event
Optional argsEventMap[E]arguments of the event

Returns

WellBoreData

this

Overrides

EventDispatcher.notify


off

off<E>(type?, callback?): WellBoreData

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: WellBoreData, args: EventMap[E]) => voidfunction to be called

Returns

WellBoreData

this

Overrides

EventDispatcher.off


on

on<E>(type, callback): WellBoreData

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: WellBoreData, args: EventMap[E]) => voidto be called

Returns

WellBoreData

this

Overrides

EventDispatcher.on


removeAll

removeAll(): WellBoreData

Removes all data elements from the well bore

Fires

Events.Remove

Returns

WellBoreData

this


removeComponent

removeComponent(componentName): WellBoreData

Removes all data elements with the name specified

Fires

Events.Remove

Parameters

Name Type Description
componentNamestringelement name

Returns

WellBoreData

this


removeComponentById

removeComponentById(componentId): WellBoreData

Removes an element with the specified ID

Fires

Events.Remove

Parameters

Name Type Description
componentIdstringelement ID

Returns

WellBoreData

this


setProperties

setProperties(properties?): WellBoreData

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesOptionsproperties

Returns

WellBoreData

this


setSilent

setSilent(bool): WellBoreData

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

WellBoreData

this

Inherited from

EventDispatcher.setSilent


updateComponents

updateComponents(modified): WellBoreData

Updates contents with the elements data

Parameters

Name Type Description
modifiedElements | Elements[]element(s) to update

Returns

WellBoreData

this


fromObject

Static fromObject(object?): WellBoreData

Creates or gets WellBoreData instance from object (array of component data objects)

Parameters

Name Type Description
Optional objectElements[] | WellBoreData | Optionsobject can be in format of constructor

Returns

WellBoreData


getClassName

Static getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getGeometryBounds

Static Protected getGeometryBounds(components): Rect

Gets geometry bounds

Parameters

Name Type Description
componentsElements[]the components array

Returns

Rect