Home Manual Reference Source
public class | source

ResourceAddress

Represents a fully qualified DMR address ready to be put into a DMR operation. The address consists of 0-n segments with a name and a value for each segment.

Static Method Summary

Static Public Methods
public static

Member Summary

Public Members
public get
public get
public get
public get
public get
public get

Method Summary

Public Methods
public

Adds the specified address to this address.

public

addSegment(propertyName: string, propertyValue: string): ResourceAddress

Adds the specified segment to this address.

public

Replaces the value in the specified segment

public

Static Public Methods

public static root(): ResourceAddress source

Return:

ResourceAddress

the empty (root) address

Public Members

public get empty: boolean source

Return:

boolean

whether this address is empty.

public get firstValue: string source

Return:

string

the value of the first segment or null if this address is empty.

public get lastName: string source

Return:

string

the name of the last segment or null if this address is empty.

public get lastValue: string source

Return:

string

the value of the last segment or null if this address is empty.

public get parent: ResourceAddress source

Return:

ResourceAddress

the parent address or the root address if this address has no parent.

public get size: number source

Return:

number

the number of segments.

Public Methods

public addAddress(address: ResourceAddress): ResourceAddress source

Adds the specified address to this address.

Params:

NameTypeAttributeDescription
address ResourceAddress

The address to add.

Return:

ResourceAddress

this address with the specified address added

public addSegment(propertyName: string, propertyValue: string): ResourceAddress source

Adds the specified segment to this address.

Params:

NameTypeAttributeDescription
propertyName string

the property name

propertyValue string

the property value

Return:

ResourceAddress

this address with the specified segment added

public replaceValue(name: string, newValue: string): ResourceAddress source

Replaces the value in the specified segment

Params:

NameTypeAttributeDescription
name string

The name of the segment.

newValue string

The new value.

Return:

ResourceAddress

this address containing the replaced value

public toString(): string source

Return:

string

the address as string