new SlotPath(body)
SlotPath
is used for resolving BValue
s using slot names.
Parameters:
Name | Type | Description |
---|---|---|
body |
String | the body of the ORD scheme |
Extends
Methods
-
<static> escape(str)
-
Escape the string so it becomes a valid name for a slot.
Parameters:
Name Type Description str
String the string to be escaped.
Returns:
the escaped String.
- Type
- String
-
<static> isValidName(nm)
-
Return whether the slot name is valid
Parameters:
Name Type Description nm
String the name to be validated.
Returns:
true if the slot name is valid.
- Type
- Boolean
-
<static> unescape(str)
-
Unescape the string so all escaped characters become readable.
Parameters:
Name Type Description str
String the string to be unescaped.
- See:
Returns:
the unescaped String.
- Type
- String
-
<static> unescapeFully(str)
-
Sometimes a slot name will run through
escape
multiple times before
getting to your code, so callingbaja.SlotPath.unescape
will still give
you a string that's escaped and not very readable by humans.This function will essentially run
unescape
multiple times until it stops
having any effect, removing all traces ofSlotPath.escape()
ing.Note that while
unescape(escape(str)) === str
, the same does not hold
forunescapeFully(escape(str))
, so do not use this function if you will
need to translate back to a validSlot
name.Parameters:
Name Type Description str
a slot name, potentially escaped multiple times
- Since:
-
- Niagara 4.4
Returns:
a fully unescaped, human readable slot name
- Type
- String
-
<static> verifyValidName(nm)
-
Verify whether the slot name is valid.
Parameters:
Name Type Description nm
String the name to be validated.
Throws:
-
if the slot name isn't valid.
- Type
- Error
-
-
depth()
-
Return the SlotPath depth.
Returns:
the SlotPath depth.
- Type
- Number
-
equals(obj)
-
Indicates whether some other object is equal to this one.
Parameters:
Name Type Description obj
Object the reference object with which to compare.
- Inherited From:
Returns:
true if this object is the same as the obj argument; false otherwise.
- Type
- Boolean
-
getBackupDepth()
-
Return the SlotPath backup depth.
Returns:
the SlotPath depth.
- Type
- Number
-
getBody()
-
Return the body for the query.
- Inherited From:
Returns:
- Type
- String
-
getNames()
-
Return all of the names for this SlotPath
Returns:
the names
- Type
- Array.<String>
-
getScheme()
-
Return the ORD Scheme.
- Inherited From:
Returns:
- Type
- baja.OrdScheme
-
getSchemeName()
-
Return the ORD Scheme name.
- Inherited From:
Returns:
- Type
- String
-
isAbsolute()
-
Return true if the SlotPath is absolute.
Returns:
true if the SlotPath is absolute.
- Type
- Boolean
-
isHost()
-
Return true if the Query is a Host.
- Inherited From:
Returns:
- Type
- Boolean
-
isSession()
-
Return true if the Query is a Session.
- Inherited From:
Returns:
- Type
- Boolean
-
isValidPathName(pathName)
-
Return whether the specified path name is valid.
Parameters:
Name Type Description pathName
String the path name to validate.
Returns:
true if the slot name is valid.
- Type
- Boolean
-
merge(a)
-
Merge this path with the specified path.
Parameters:
Name Type Description a
baja.SlotPath Returns:
the body of the SlotPath.
- Type
- String
-
nameAt(depth)
-
Return the name at the given depth.
Parameters:
Name Type Description depth
Number the specified depth for the name.
Returns:
the name at the specified depth.
- Type
- String
-
toString()
-
Return a String representation of the query.
- Inherited From:
Returns:
- Type
- String
-
valueOf()
-
Return the inner value of the object.
By default the object's instance is returned.
- Inherited From:
Returns:
the inner value of the object or just the object's instance.
- Type
- *