@Singleton public class TagService extends Object
| Constructor and Description |
|---|
TagService() |
| Modifier and Type | Method and Description |
|---|---|
Tag |
findTag(String tagName)
Returns the
Tag with the provided name. |
Set<Tag> |
getAncestorTags(Tag tag)
Returns all tags that designate this tag.
|
Set<Tag> |
getDescendantTags(Tag tag)
Returns all tags that are designated by this tag.
|
Tag |
getOrCreateTag(String tagName,
boolean isRef)
|
List<Tag> |
getPrimeTags()
Gets all tags that are "prime" tags.
|
List<Tag> |
getRootTags()
Returns the tags that were root in the definition files.
|
Tag |
getTag(String tagName) |
boolean |
isUnderTag(String superTagName,
String subTagName)
Convenience method, calls this.isUnderTag(Tag superTag, Tag subTag).
|
boolean |
isUnderTag(Tag superTag,
Tag subTag) |
void |
readTags(InputStream tagsXML)
Read the tag structure from the provided stream.
|
String |
toString() |
void |
writeTagsToJavaScript(Writer writer)
Writes the JavaScript code describing the tags as Tag classes to given writer.
|
public void readTags(InputStream tagsXML)
public List<Tag> getRootTags()
public Tag getOrCreateTag(String tagName, boolean isRef)
isRef - True if the given tag name is a reference, in which case it should already exist.public Set<Tag> getAncestorTags(Tag tag)
public Set<Tag> getDescendantTags(Tag tag)
public boolean isUnderTag(String superTagName, String subTagName)
public boolean isUnderTag(Tag superTag, Tag subTag)
public void writeTagsToJavaScript(Writer writer) throws IOException
IOExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.