Package adams.core.base
Class BaseAnnotation
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.base.BaseMarkdown
-
- adams.core.base.BaseAnnotation
-
- All Implemented Interfaces:
CloneHandler<BaseObject>
,Serializable
,Comparable
public class BaseAnnotation extends BaseMarkdown
Class used for annotating actors in the flow.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseAnnotation.Tag
Container class for storing tag information.
-
Field Summary
Fields Modifier and Type Field Description protected List
m_Parts
the parsed list of strings and tags.protected List<BaseAnnotation.Tag>
m_Tags
the tags that have been located.static String
TAG_END
the end of a custom tag.static String
TAG_START
the start of a custom tag.-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description BaseAnnotation()
Initializes the string with length 0.BaseAnnotation(String s)
Initializes the object with the string to parse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
convert(String value)
Converts the string according to the specified conversion.List
getParts()
Returns the building blocks of the annotation, String and Tag objects.List<BaseAnnotation.Tag>
getTags()
Returns the extracted tags from the annotation.String
getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).boolean
hasTag()
Returns whether at least one tag is present.protected void
parse()
Parses the annotation string, if necessary.-
Methods inherited from class adams.core.base.BaseMarkdown
stringValue
-
Methods inherited from class adams.core.base.AbstractBaseString
getValue, initialize, isEmpty, isValid, length, setValue
-
Methods inherited from class adams.core.base.BaseObject
compareTo, equals, getClone, getInternal, getTemplates, getUnicode, hasFavoritesSupport, hashCode, isValidUnicode, newInstance, setUnicode, toObjectArray, toObjectArray, toString, toStringArray, toStringList
-
-
-
-
Field Detail
-
TAG_START
public static final String TAG_START
the start of a custom tag.- See Also:
- Constant Field Values
-
TAG_END
public static final String TAG_END
the end of a custom tag.- See Also:
- Constant Field Values
-
m_Tags
protected List<BaseAnnotation.Tag> m_Tags
the tags that have been located.
-
m_Parts
protected List m_Parts
the parsed list of strings and tags.
-
-
Constructor Detail
-
BaseAnnotation
public BaseAnnotation()
Initializes the string with length 0.
-
BaseAnnotation
public BaseAnnotation(String s)
Initializes the object with the string to parse.- Parameters:
s
- the string to parse
-
-
Method Detail
-
convert
protected String convert(String value)
Converts the string according to the specified conversion.
Just resets the located tags.- Overrides:
convert
in classAbstractBaseString
- Parameters:
value
- the string to convert- Returns:
- the converted string
-
hasTag
public boolean hasTag()
Returns whether at least one tag is present.- Returns:
- true if tag is present
-
parse
protected void parse()
Parses the annotation string, if necessary.
-
getTags
public List<BaseAnnotation.Tag> getTags()
Returns the extracted tags from the annotation.- Returns:
- all the located tags
-
getParts
public List getParts()
Returns the building blocks of the annotation, String and Tag objects.- Returns:
- all the parts of the annotation string
-
getTipText
public String getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).- Overrides:
getTipText
in classBaseMarkdown
- Returns:
- the tool tip
-
-