Module: baja/tag/Id


new (require("baja/tag/Id"))(dictionary [, name])

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

Parameters:
Name Type Argument 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


<static> facetKeyToId(key)

Return an Id from the facet key.

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)

Return a facet key for the specified id.

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

equals(arg)

Check for one Id equaling another.

Parameters:
Name Type Description
arg

The argument to be tested.

Returns:

true if the same.

Type
Boolean

getDictionary()

Return the Id's dictionary.

Returns:

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

Type
String

getName()

Return the name of the Id.

Returns:

Returns the name.

Type
String

getQName()

Return the qname of the Id.

Returns:

Returns the qname.

Type
String

hasDictionary()

Return true if a dictionary is available.

Returns:

Returns true if a dictionary
is available.

Type
Boolean

toString()

Return the string representation of an Id.

Returns:

Returns the string representation of an Id.

Type
String