new (require("baja/tag/SmartTags"))(directTags, impliedTags)
SmartTags holds a collection of both direct and implemented
module:baja/tag/Tag objects.
Parameters:
Name | Type | Description |
---|---|---|
directTags |
A direct Tags implementation. |
|
impliedTags |
An implied Tags implementation. |
Methods
-
contains(id)
-
Returns true a Tag with the specified Id (or qname)
is found.Parameters:
Name Type Description id
String | module:baja/tag/Id The Id
used for the search. This can be an Id or a qname for an Id.Returns:
Returns true if found.
- Type
- Boolean
-
get(id)
-
Get the value for the specified tag.
Parameters:
Name Type Description id
String | module:baja/tag/Id The Id
used for the search. This can be an Id or a qname for an Id.Returns:
The value for the tag or null if nothing can be found.
-
getAll()
-
Returns a copy of the contained Tags array.
Any duplicate tags are filtered out.
Returns:
An array of Tag objects.
- Type
- Array.<module:baja/tag/Tag>
-
getDirectTags()
-
Return the direct tags.
Returns:
The direct Tags.
-
getImpliedTags()
-
Return the implied tags.
Returns:
the implied tags.
-
isEmpty()
-
Returns:
Returns true if there are no Tag objects.
- Type
- Boolean