module:baja/tag/Id

module:baja/tag/Id

new (require("baja/tag/Id"))(dictionary, nameopt)

Description:
  • An id is an immutable dictionary/name code pair. An id uniquely
    identifies (Tag)s and (Relation)s.

Source:
Parameters:
Name Type Attributes Description
dictionary String

The dictionary to be used. Or if only argument
is being specified, this should be the qname for the Id.

name String <optional>

The name of Id. If the first argument is the qname,
this parameter is optional.

Methods

equals(arg) → {Boolean}

Description:
  • Check for one Id equaling another.

Source:
Parameters:
Name Type Description
arg

The argument to be tested.

Returns:

true if the same.

Type
Boolean

getDictionary() → {String}

Description:
  • Return the Id's dictionary.

Source:
Returns:

The dictionary name or a blank string if
there's no dictionary.

Type
String

getName() → {String}

Description:
  • Return the name of the Id.

Source:
Returns:

Returns the name.

Type
String

getQName() → {String}

Description:
  • Return the qname of the Id.

Source:
Returns:

Returns the qname.

Type
String

hasDictionary() → {Boolean}

Description:
  • Return true if a dictionary is available.

Source:
Returns:

Returns true if a dictionary
is available.

Type
Boolean

toString() → {String}

Description:
  • Return the string representation of an Id.

Source:
Returns:

Returns the string representation of an Id.

Type
String

(static) facetKeyToId(key) → {module:baja/tag/Id}

Description:
  • Return an Id from the facet key.

Source:
Parameters:
Name Type Description
key String

The facet key to create an
Id from.

Returns:

An
Id created from the facet key.

Type
module:baja/tag/Id

(static) idToFacetKey(id) → {String}

Description:
  • Return a facet key for the specified id.

Source:
Parameters:
Name Type Description
id module:baja/tag/Id | String

The id
or qname if the id to turn into a facet key.

Returns:

The encoded key.

Type
String