API / geotoolkit / schematics / data / WellBoreData / 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
↳
WellBoreData
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
units | UnitsOptions | Units options |
units-depth | string | Depth units |
units-value | string | Value units |
Constructors
• new WellBoreData(options?)
EventDispatcher.constructor
Methods
▸ addComponent(componentName, data, index?): WellBoreData
Adds the component's data to the well bore
Fires
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}
}
});| Name | Type | Description |
|---|---|---|
componentName | string | element name |
data | Element | data to build component node |
Optional index | number | index to add the component at (@see WellBoreNode's 'setRenderingHints' method API for subset usage example) |
this
▸ addComponents(elements): WellBoreData
Adds the component's data to the well bore
Fires
this
▸ dispose(): void
Dispose.
void
▸ generateId(): string
Generates unique component id
string
id
▸ getClassName(): string
string
▸ getComponent(componentName): Element[]
Gets all the component's data if available; "undefined" otherwise
| Name | Type | Description |
|---|---|---|
componentName | string | component name |
Element[]
the component's data array
▸ 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
| Name | Type | Description |
|---|---|---|
id | string | component id |
a meta information for component with the given id or null if not found.
▸ getGeometryBounds(): Rect
Gets geometry bounds
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
properties
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
EventDispatcher.hasEventListener
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify<E>(type, source, args?): WellBoreData
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | WellBoreData | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: WellBoreData, args: EventMap[E]) => void | function to be called |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: WellBoreData, args: EventMap[E]) => void | to be called |
this
▸ removeAll(): WellBoreData
Removes all data elements from the well bore
Fires
this
▸ removeComponent(componentName): WellBoreData
Removes all data elements with the name specified
Fires
| Name | Type | Description |
|---|---|---|
componentName | string | element name |
this
▸ removeComponentById(componentId): WellBoreData
Removes an element with the specified ID
Fires
| Name | Type | Description |
|---|---|---|
componentId | string | element ID |
this
▸ setProperties(properties?): WellBoreData
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | properties |
this
▸ setSilent(bool): WellBoreData
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ updateComponents(modified): WellBoreData
Updates contents with the elements data
this
▸ Static fromObject(object?): WellBoreData
Creates or gets WellBoreData instance from object (array of component data objects)
| Name | Type | Description |
|---|---|---|
Optional object | Elements[] | WellBoreData | Options | object can be in format of constructor |
▸ Static getClassName(): string
string
▸ Static Protected getGeometryBounds(components): Rect
Gets geometry bounds
| Name | Type | Description |
|---|---|---|
components | Elements[] | the components array |