Constructor
new SubstanceMetadataBuilder()
Create a new SubstanceMetadataBuilder.
- Source:
Methods
build() → {SubstanceMetadata}
Build a SubstanceMetadata instance from current builder state.
- Source:
Throws:
-
If required fields are null or empty.
- Type
- Error
Returns:
The constructed metadata instance.
- Type
- SubstanceMetadata
setApplication(application) → {SubstanceMetadataBuilder}
Set the application name.
Parameters:
| Name | Type | Description |
|---|---|---|
application |
string | The application name. |
- Source:
Returns:
This builder instance for method chaining.
setDefaultSales(defaultSales) → {SubstanceMetadataBuilder}
Set the default sales assumption mode.
Parameters:
| Name | Type | Description |
|---|---|---|
defaultSales |
string | The default sales mode (user-facing value). |
- Source:
Returns:
This builder instance for method chaining.
setEnergy(energy) → {SubstanceMetadataBuilder}
Set the energy consumption value.
Parameters:
| Name | Type | Description |
|---|---|---|
energy |
string | The energy consumption value. |
- Source:
Returns:
This builder instance for method chaining.
setEquipment(equipment) → {SubstanceMetadataBuilder}
Set the equipment type.
Parameters:
| Name | Type | Description |
|---|---|---|
equipment |
string | The equipment type. |
- Source:
Returns:
This builder instance for method chaining.
setGhg(ghg) → {SubstanceMetadataBuilder}
Set the GHG equivalency value.
Parameters:
| Name | Type | Description |
|---|---|---|
ghg |
string | The GHG value. |
- Source:
Returns:
This builder instance for method chaining.
setHasDomestic(hasDomestic) → {SubstanceMetadataBuilder}
Set whether domestic stream is enabled.
Parameters:
| Name | Type | Description |
|---|---|---|
hasDomestic |
boolean | True if domestic stream is enabled. |
- Source:
Returns:
This builder instance for method chaining.
setHasExport(hasExport) → {SubstanceMetadataBuilder}
Set whether export stream is enabled.
Parameters:
| Name | Type | Description |
|---|---|---|
hasExport |
boolean | True if export stream is enabled. |
- Source:
Returns:
This builder instance for method chaining.
setHasImport(hasImport) → {SubstanceMetadataBuilder}
Set whether import stream is enabled.
Parameters:
| Name | Type | Description |
|---|---|---|
hasImport |
boolean | True if import stream is enabled. |
- Source:
Returns:
This builder instance for method chaining.
setInitialChargeDomestic(initialChargeDomestic) → {SubstanceMetadataBuilder}
Set the initial charge for domestic stream.
Parameters:
| Name | Type | Description |
|---|---|---|
initialChargeDomestic |
string | The initial charge value. |
- Source:
Returns:
This builder instance for method chaining.
setInitialChargeExport(initialChargeExport) → {SubstanceMetadataBuilder}
Set the initial charge for export stream.
Parameters:
| Name | Type | Description |
|---|---|---|
initialChargeExport |
string | The initial charge value. |
- Source:
Returns:
This builder instance for method chaining.
setInitialChargeImport(initialChargeImport) → {SubstanceMetadataBuilder}
Set the initial charge for import stream.
Parameters:
| Name | Type | Description |
|---|---|---|
initialChargeImport |
string | The initial charge value. |
- Source:
Returns:
This builder instance for method chaining.
setRetirement(retirement) → {SubstanceMetadataBuilder}
Set the retirement rate.
Parameters:
| Name | Type | Description |
|---|---|---|
retirement |
string | The retirement rate. |
- Source:
Returns:
This builder instance for method chaining.
setRetirementWithReplacement(retirementWithReplacement) → {SubstanceMetadataBuilder}
Set the retirement with replacement flag.
Parameters:
| Name | Type | Description |
|---|---|---|
retirementWithReplacement |
string | String "true" or "false". |
- Source:
Returns:
This builder instance for method chaining.
setSubstance(substance) → {SubstanceMetadataBuilder}
Set the substance name.
Parameters:
| Name | Type | Description |
|---|---|---|
substance |
string | The substance name. |
- Source:
Returns:
This builder instance for method chaining.