libs/sensorml/src/lib/model/sml/NamedSweDataComponent.ts
Properties |
Methods |
component |
Type : AbstractDataComponent
|
Decorators :
@DisplayName('Component')
|
name |
Type : string
|
Default value : ''
|
Decorators :
@DisplayName('Name')
|
toString |
toString()
|
Returns :
any
|
import { AbstractDataComponent } from '../swe';
import { DisplayName } from '../../common/decorators/DisplayName';
export class NamedSweDataComponent {
@DisplayName('Name')
name = '';
@DisplayName('Component')
component: AbstractDataComponent;
toString() {
if (this.component.getLabel() && this.component.getValue()) {
return this.component.getLabel() + ': ' + this.component.getValue();
} else if (this.component.getLabel()) {
return this.component.getValue();
} else {
return this.component.toString();
}
}
}