File

libs/sensorml/src/lib/model/gml/TimePeriod.ts

Description

gml:TimePeriod acts as a one-dimensional geometric primitive that represents an identifiable extent in time.

Extends

AbstractTime

Index

Properties
Methods

Properties

begin
Type : Date
Decorators :
@DisplayName('Begin')
end
Type : Date
Decorators :
@DisplayName('End')
description
Type : string
Decorators :
@DisplayName('Description')
Inherited from AbstractTime
Defined in AbstractTime:23

The value of this property is a text description of the object. gml:description uses gml:StringOrRefType as its content model, so it may contain a simple text string content, or carry a reference to an external description. The use of gml:description to reference an external description has been deprecated and replaced by the gml:descriptionReference property.

descriptionReference
Type : string
Decorators :
@DisplayName('Description reference')
Inherited from AbstractTime
Defined in AbstractTime:30

The value of this property is a remote text description of the object. The xlink:href attribute of the gml:descriptionReference property references the external description.

gmlId
Type : string
Decorators :
@DisplayName('GML ID')
Inherited from AbstractTime
Defined in AbstractTime:13
identifier
Type : CodeType
Decorators :
@DisplayName('Identifier')
Inherited from AbstractTime
Defined in AbstractTime:51

Often, a special identifier is assigned to an object by the maintaining authority with the intention that it is used in references to the object. For such cases, the codeSpace shall be provided. That identifier is usually unique either globally or within an application domain. gml:identifier is a pre-defined property for such identifiers.

name
Type : CodeType[]
Decorators :
@DisplayName('Name')
Inherited from AbstractTime
Defined in AbstractTime:42

The gml:name property provides a label or identifier for the object, commonly a descriptive name. An object may have several names, typically assigned by different authorities. gml:name uses the gml:CodeType content model. The authority for a name is indicated by the value of its (optional) codeSpace attribute. The name may or may not be unique, as determined by the rules of the organization responsible for the codeSpace. In common usage there will be one name per authority, so a processing application may select the name from its preferred codeSpace.

description
Type : string
Decorators :
@DisplayName('Description')
Inherited from AbstractGML
Defined in AbstractGML:23

The value of this property is a text description of the object. gml:description uses gml:StringOrRefType as its content model, so it may contain a simple text string content, or carry a reference to an external description. The use of gml:description to reference an external description has been deprecated and replaced by the gml:descriptionReference property.

descriptionReference
Type : string
Decorators :
@DisplayName('Description reference')
Inherited from AbstractGML
Defined in AbstractGML:30

The value of this property is a remote text description of the object. The xlink:href attribute of the gml:descriptionReference property references the external description.

gmlId
Type : string
Decorators :
@DisplayName('GML ID')
Inherited from AbstractGML
Defined in AbstractGML:13
identifier
Type : CodeType
Decorators :
@DisplayName('Identifier')
Inherited from AbstractGML
Defined in AbstractGML:51

Often, a special identifier is assigned to an object by the maintaining authority with the intention that it is used in references to the object. For such cases, the codeSpace shall be provided. That identifier is usually unique either globally or within an application domain. gml:identifier is a pre-defined property for such identifiers.

name
Type : CodeType[]
Decorators :
@DisplayName('Name')
Inherited from AbstractGML
Defined in AbstractGML:42

The gml:name property provides a label or identifier for the object, commonly a descriptive name. An object may have several names, typically assigned by different authorities. gml:name uses the gml:CodeType content model. The authority for a name is indicated by the value of its (optional) codeSpace attribute. The name may or may not be unique, as determined by the rules of the organization responsible for the codeSpace. In common usage there will be one name per authority, so a processing application may select the name from its preferred codeSpace.

Methods

getLabel
getLabel()
Returns : string
getValue
getValue()
Returns : string
toString
toString()
Returns : string
toString
toString()
Inherited from AbstractTime
Defined in AbstractTime:4
Returns : string
toString
toString()
Inherited from AbstractTime
Defined in AbstractTime:53
Returns : string
toString
toString()
Inherited from AbstractGML
Defined in AbstractGML:53
Returns : string
import { AbstractTime } from './AbstractTime';
import { DisplayName } from '../../common/decorators/DisplayName';

/**
 * gml:TimePeriod acts as a one-dimensional geometric primitive that represents
 * an identifiable extent in time.
 */
export class TimePeriod extends AbstractTime {
    @DisplayName('Begin')
    begin: Date;

    @DisplayName('End')
    end: Date;

    toString() {
        return 'Time period';
    }

    getLabel() {
        return this.toString();
    }

    getValue() {
        if (this.begin && this.end) {
            return this.begin.toLocaleDateString().replace(/ /g, '\xa0') + ' - '
                + this.end.toLocaleDateString().replace(/ /g, '\xa0');
        }
        return this.toString();
    }
}

result-matching ""

    No results matching ""