new DescribedDataFieldBuilder()
Builds a module:described_field.DescribedDataField. DescribedDataField is the main element of the restructured data and therefore considered "public".
- Source:
Members
describedField :module:described_field.DescribedDataField
Type:
- Source:
Methods
abbreviation(valueopt) → {DescribedDataFieldBuilder}
Sets the optional abbreviation.
Contains a symbol character or a very short abbreviation of the category.
- "P" for products
- "V" for vendors
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
String |
<optional> |
"" |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
abbreviation("P")
build() → {module:described_field.DescribedDataField}
Finalizes the settings and builds the module:described_field.DescribedDataField.
- Source:
Returns:
category(valueopt) → {DescribedDataFieldBuilder}
Sets the category.
Contains a short domain nam, for example:
- "product" for products
- "vendor" for vendors
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
String |
<optional> |
"" |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
category("Product")
displayName(valueopt) → {DescribedDataFieldBuilder}
Sets the display name.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
String |
<optional> |
"" |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
displayName("Color")
fieldName(valueopt) → {DescribedDataFieldBuilder}
Sets the (technical) field name.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
String |
<optional> |
"" |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
fieldName("color")
fromDescribedDataField(template) → {DescribedDataFieldBuilder}
Takes over all values of the template module:described_field.DescribedDataField.
Parameters:
Name | Type | Description |
---|---|---|
template |
module:described_field.DescribedDataField |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
fromDescribedDataField(sourceField)
groupNames(valueopt) → {DescribedDataFieldBuilder}
Sets the group names as an array of strings containing the names of the dynamically added properties, that contain an array of module:described_field.DescribedDataField-Objects.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
Array.<string> |
<optional> |
[] |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
groupNames(["summaries","details","options"])
image(valueopt) → {DescribedDataFieldBuilder}
Sets the optional path to an image resource.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
String |
<optional> |
"" |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
image("img/product.png")
index(valueopt) → {DescribedDataFieldBuilder}
Sets the index as an array of numbers containing the splitted array indexes of the source field. Example: "responses[2].hits.hits[4]._source.name" will have an index of [2,4].
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
Array.<number> |
<optional> |
[] |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
index([2,4])
type(valueopt) → {DescribedDataFieldBuilder}
Sets the type.
Contains the type of the entry, for example:
- "summary" for e.g. a list overview.
- "detail" e.g. when a summary is selected.
- "filter" e.g. for field/value pair results that can be selected as search parameters.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
String |
<optional> |
"" |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
type("summary")
value(value) → {DescribedDataFieldBuilder}
Sets the value/content of the field.
Parameters:
Name | Type | Description |
---|---|---|
value |
* |
- Source:
Returns:
- Type
- DescribedDataFieldBuilder
Example
value("darkblue")