VirtualPath

baja. VirtualPath

new VirtualPath()

Description:
  • Resolves Virtual Slot Paths.

Source:

Extends

Methods

depth() → {Number}

Description:
  • Return the SlotPath depth.

Source:
Inherited From:
Returns:

the SlotPath depth.

Type
Number

equals(obj) → {Boolean}

Description:
  • Indicates whether some other object is equal to this one.

Source:
Inherited From:
Parameters:
Name Type Description
obj Object

the reference object with which to compare.

Returns:

true if this object is the same as the obj argument; false otherwise.

Type
Boolean

getBackupDepth() → {Number}

Description:
  • Return the SlotPath backup depth.

Source:
Inherited From:
Returns:

the SlotPath depth.

Type
Number

getBody() → {String}

Description:
  • Return the body for the query.

Source:
Inherited From:
Returns:
Type
String

getNames() → {Array.<String>}

Description:
  • Return all of the names for this SlotPath

Source:
Inherited From:
Returns:

the names

Type
Array.<String>

getScheme() → {baja.VirtualScheme}

Description:
  • Return the scheme used with this SlotPath.

Source:
Overrides:
Returns:
Type
baja.VirtualScheme

getSchemeName() → {String}

Description:
  • Return the scheme name for the SlotPath.

Source:
Overrides:
Returns:
Type
String

isAbsolute() → {Boolean}

Description:
  • Return true if the SlotPath is absolute.

Source:
Inherited From:
Returns:

true if the SlotPath is absolute.

Type
Boolean

isHost() → {Boolean}

Description:
  • Return true if the Query is a Host.

Source:
Inherited From:
Returns:
Type
Boolean

isSession() → {Boolean}

Description:
  • Return true if the Query is a Session.

Source:
Inherited From:
Returns:
Type
Boolean

isValidPathName(pathName) → {Boolean}

Description:
  • Return whether the specified path name is valid.

Source:
Overrides:
Parameters:
Name Type Description
pathName String

the path name to validate.

Returns:

true if the slot name is valid.

Type
Boolean

merge(a) → {String}

Description:
  • Merge this path with the specified path.

Source:
Inherited From:
Parameters:
Name Type Description
a baja.SlotPath
Returns:

the body of the SlotPath.

Type
String

nameAt(depth) → {String}

Description:
  • Return the name at the given depth.

Source:
Inherited From:
Parameters:
Name Type Description
depth Number

the specified depth for the name.

Returns:

the name at the specified depth.

Type
String

toString() → {String}

Description:
  • Return a String representation of the query.

Source:
Inherited From:
Returns:
Type
String

valueOf() → {*}

Description:
  • Return the inner value of the object.

    By default the object's instance is returned.

Source:
Inherited From:
Returns:

the inner value of the object or just the object's instance.

Type
*

(static) isValidName(nm) → {Boolean}

Description:
  • Return whether the slot name is valid.

Source:
Parameters:
Name Type Description
nm String

the name to validate.

Returns:

true if the slot name is valid.

Type
Boolean

(static) toSlotPathName(virtualPathName) → {String}

Description:
  • Converts the given VirtualPath name to a valid SlotPath name. This method will unescape any
    unsupported virtual characters ('/', '|', '$', ':', and the '~' escape character itself) in the
    given VirtualPath name that were previously escaped using the '~' escape character. It will
    also ensure that the result is in proper SlotPath escaped form before returning it.

    In order to support legacy uses of the '~' escape character in pre-4.6 VirtualPath names,
    this method will only consider '~' as an escape character if it is followed by the code for
    one of the unsupported virtual characters ('/', '|', '$', ':', and the '~' escape character
    itself) in the given VirtualPath name.

Source:
Since:
  • Niagara 4.6
See:
Parameters:
Name Type Description
virtualPathName String

The VirtualPath name to be converted to a valid SlotPath name.

Returns:

A valid SlotPath name.

Type
String

(static) toVirtualPathName(slotPathName) → {String}

Description:
  • Converts the given SlotPath name to a valid VirtualPath name. The SlotPath name argument
    must be in its proper slot escaped form - don't call SlotPath.unescape() on the SlotPath name
    argument before calling this method. This method will unescape the given SlotPath name and
    look for any unsupported virtual characters ('/', '|', '$', ':', and the '~' escape character
    itself) and escape those using the '~' escape character.

Source:
Since:
  • Niagara 4.6
See:
Parameters:
Name Type Description
slotPathName String

The SlotPath name to be converted to a valid VirtualPath name.
This argument must be in its proper slot escaped form - don't call SlotPath.unescape() on this
SlotPath name argument before passing it to this method.

Returns:

A valid VirtualPath name where any unsupported virtual characters have been
escaped using the '~' escape character.

Type
String