API / geotoolkit / report / parsers / Utils / Utils
Helper class for the Report parsers utils The class Utils contains common Parser utils
Constructors
Methods
▸ getClassName(): string
string
▸ Static getAttribute(node, attrName, defaultValue?): string
Extracts requested attribute from provided node
| Name | Type | Description |
|---|---|---|
node | Node | XML node |
attrName | string | The name of attribute to obtain |
Optional defaultValue | string | default value |
string
Value of the attribute
▸ Static getClassName(): string
string
▸ Static tryParseArray(value): any[]
Parse string into array of objects, assuming that string value looks like "[value,value,value]" for example "[10,20,30,75.8999,36]" or "[x:10;y:20,x:15;y:45]"
| Name | Type | Description |
|---|---|---|
value | string | value |
any[]
▸ Static tryParseJSON(value, trimValues?): any
Parse string in to object, assuming that string value looks like "name:value;name:value" for example
| Name | Type | Description |
|---|---|---|
value | string | value |
Optional trimValues | boolean | automatically trim values |
any
▸ Static tryParseValue(value): string | number | boolean
Try parse value to avoid converting it in our existing code
| Name | Type | Description |
|---|---|---|
value | string | value |
string | number | boolean