|
VTT Java 2010 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.nls.vtt.Model.Tags
public class Tags
This is the collection of Tag Java objects class. It is used directly in VTT.
History:
Constructor Summary | |
---|---|
Tags()
Create a tags list Java object with default values. |
|
Tags(java.lang.String inFile)
Create a tags list Java object from a input file. |
|
Tags(Tags tags)
Create a tags list Java object by specifying tags. |
Method Summary | |
---|---|
void |
AddTag(Tag tag)
Add a tag to tags list. |
boolean |
ContainsNameCategory(java.lang.String nameCategory)
Check if category list contains the specified name category. |
static boolean |
ContainsTextTag(java.util.Vector<Tag> tags)
Check if specified tags contain text tag, "Text/Clear". |
void |
DeleteTag(int index)
Delete a tag from tags list. |
java.util.Vector<TagFilter> |
GetCategoryList()
Get category list from tags list. |
int |
GetIndexByTag(java.lang.String nameCategory)
Get the index of tags list by the specifying name category |
java.util.Vector<java.lang.String> |
GetNameCategoryList()
Get name category list from tags list. |
java.util.Vector<TagFilter> |
GetNameList()
Get name list from tags list. |
int |
GetQuickKeyMappingIndex(int index)
Get the index of tags at the specified quick key index (0 ~ 9) |
java.util.Vector<java.lang.String> |
GetQuickKeyMappings()
Get quick key mapping of tags. |
Tag |
GetTagAt(int index)
Get the tag from tags list by specifying the index |
Tag |
GetTagByIndex(int index)
Get tag by the specified index |
Tag |
GetTagByNameCategory(java.lang.String nameCategory)
Get tag by specifying name and category |
java.util.Vector<java.lang.String> |
GetTagNames()
Get names of tags in a format of Vector of String |
java.util.Vector<Tag> |
GetTags()
Get the tags list |
boolean |
IsDisplayAfterFilter(Tag tag)
Get the boolean flag of display after filter. |
void |
LoadTagsFromFile(java.lang.String inFile)
Load tags from a file |
void |
MoveDown(int index)
Move down a specified indexed tag on the tags list. |
void |
MoveUp(int index)
Move up a speficied indexed tag on the tags list. |
static Tag |
ReadTagFromLine(java.lang.String line)
Read a tag information from a line with verbose options of both gui and stnadard system io. |
static Tag |
ReadTagFromLine(java.lang.String line,
int verboseType)
Read a tag information from a line with specifying verbose option. |
static void |
SaveTagsToFile(java.lang.String outFile,
java.util.Vector<Tag> tags)
Save tags to a specified file. |
void |
SetCategoryList(java.util.Vector<TagFilter> categoryList)
Set category list. |
void |
SetNameList(java.util.Vector<TagFilter> nameList)
Set name list. |
void |
SetQucikKeyMappingAt(java.lang.String tagNameCategory,
int index)
Set quick key mapping of tags with specified name category at the specified index. |
void |
SetQuickKeyMappings(java.util.Vector<java.lang.String> quickKeyMappings)
Set quick key mapping of tags. |
void |
SetQuickKeyMappingsToDefault()
Set quick key mapping to default (same order as the order of tags list). |
void |
SetTagAt(int index,
Tag tag,
boolean updateFlag)
Set the tag at the specified position with specifying tag and update flag. |
void |
SortTags()
Sort Tags by name|category. |
static java.lang.String |
ToString(java.util.Vector<Tag> tags)
Convert tags to string representation of VTT format: header + tags |
static java.lang.String |
ToString(java.util.Vector<Tag> tags,
boolean headerFlag)
Convert tags to string representation of VTT format: header + tags |
static void |
WriteTagsToFile(java.io.BufferedWriter out,
java.util.Vector<Tag> tags)
Write tags to a buffered writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tags()
public Tags(Tags tags)
tags
- the tags to be instantiated for this tags listpublic Tags(java.lang.String inFile)
inFile
- the input file with data of tagsMethod Detail |
---|
public java.util.Vector<Tag> GetTags()
public Tag GetTagAt(int index)
index
- the position of interest
public void SetTagAt(int index, Tag tag, boolean updateFlag)
index
- the position of interesttag
- tag to be setupdateFlag
- a boolean flag of updatepublic java.util.Vector<java.lang.String> GetTagNames()
public Tag GetTagByNameCategory(java.lang.String nameCategory)
nameCategory
- the name and category string of interest
public Tag GetTagByIndex(int index)
index
- the specified index of interest
public java.util.Vector<TagFilter> GetNameList()
public java.util.Vector<TagFilter> GetCategoryList()
public java.util.Vector<java.lang.String> GetNameCategoryList()
public java.util.Vector<java.lang.String> GetQuickKeyMappings()
public void SetQuickKeyMappings(java.util.Vector<java.lang.String> quickKeyMappings)
quickKeyMappings
- quick key mapping of tagspublic void SetQucikKeyMappingAt(java.lang.String tagNameCategory, int index)
tagNameCategory
- name category of tag to be set on quick keyindex
- the specified index of quick key mappingpublic int GetQuickKeyMappingIndex(int index)
index
- the quick key index
public void AddTag(Tag tag)
tag
- the tag to be addedpublic void DeleteTag(int index)
index
- the index of tags list to be deletedpublic void SortTags()
public int GetIndexByTag(java.lang.String nameCategory)
nameCategory
- name and category of interest
public void MoveUp(int index)
index
- the index of tag to be moved uppublic void MoveDown(int index)
index
- the index of tag to be moved downpublic boolean IsDisplayAfterFilter(Tag tag)
tag
- the tag of interest
public boolean ContainsNameCategory(java.lang.String nameCategory)
nameCategory
- the name and category of interest
public void SetQuickKeyMappingsToDefault()
public static void SaveTagsToFile(java.lang.String outFile, java.util.Vector<Tag> tags)
outFile
- the output file to be savedtags
- the tags list to be savedpublic static void WriteTagsToFile(java.io.BufferedWriter out, java.util.Vector<Tag> tags) throws java.io.IOException
out
- buffered writer to be write totags
- the tags list to be saved
java.io.IOException
public static java.lang.String ToString(java.util.Vector<Tag> tags)
tags
- the tags list of interest
public static java.lang.String ToString(java.util.Vector<Tag> tags, boolean headerFlag)
tags
- the tags list of interestheaderFlag
- the boolean flag of showing header
public void LoadTagsFromFile(java.lang.String inFile)
inFile
- the input file of tagspublic static Tag ReadTagFromLine(java.lang.String line)
line
- a line represents a tag
public static Tag ReadTagFromLine(java.lang.String line, int verboseType)
line
- a line represents a tagverboseType
- verbose types: VERVOSE_GUI and VERBOSE_STD_IO
public static boolean ContainsTextTag(java.util.Vector<Tag> tags)
tags
- the tags list to be checked
public void SetNameList(java.util.Vector<TagFilter> nameList)
nameList
- the name list to be setpublic void SetCategoryList(java.util.Vector<TagFilter> categoryList)
categoryList
- the category list to be set
|
VTT Java 2010 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |