Class HashTag
- java.lang.Object
-
- org.symphonyoss.symphony.messageml.elements.Element
-
- org.symphonyoss.symphony.messageml.elements.Entity
-
- org.symphonyoss.symphony.messageml.elements.HashTag
-
public class HashTag extends Entity
Class representing a convenience element for a hash tag. Translated to an anchor element.- Since:
- 3/27/17
- Author:
- lukasz
-
-
Field Summary
Fields Modifier and Type Field Description static StringENTITY_TYPEstatic StringHASHTAG_PATTERNstatic StringMESSAGEML_TAGstatic StringPREFIXprotected Stringtag-
Fields inherited from class org.symphonyoss.symphony.messageml.elements.Entity
ENTITY_ID_ATTR, ID_FIELD, PRESENTATIONML_CLASS, TYPE_FIELD, VALUE_FIELD
-
Fields inherited from class org.symphonyoss.symphony.messageml.elements.Element
CLASS_ATTR, format, ID_ATTR, ID_MAX_LENGTH, MAPPER, STYLE_ATTR
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.commonmark.node.NodeasMarkdown()voidasPresentationML(XmlPrintStream out, MessageMLContext context)StringasText()Return a text representation of the element, descending into its children.protected voidbuildAttribute(MessageMLParser parser, Node item)protected StringgetEntityIdPrefix()protected StringgetEntitySubType()protected StringgetEntityType()protected StringgetEntityValue()protected StringgetEntityVersion()StringgetTag()StringgetTagPattern()a Keyword must provide its validation patternStringtoString()voidupdateBiContext(BiContext context)voidvalidate()-
Methods inherited from class org.symphonyoss.symphony.messageml.elements.Entity
asEntityJson, getPresentationMLTag
-
Methods inherited from class org.symphonyoss.symphony.messageml.elements.Element
addChild, areNestedElementsAllowed, buildAll, buildNode, countChildrenOfType, countNonTextNodesInNodeList, findElements, findElements, findElements, getAttribute, getAttributes, getChild, getChildren, getFormat, getMessageMLTag, getParent, getStringAttribute, hasExactNumberOfChildren, hasIdAttribute, putIntegerIfPresent, putOneIfPresent, putStringIfPresent, size, throwInvalidInputException
-
-
-
-
Field Detail
-
MESSAGEML_TAG
public static final String MESSAGEML_TAG
- See Also:
- Constant Field Values
-
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
-
ENTITY_TYPE
public static final String ENTITY_TYPE
- See Also:
- Constant Field Values
-
HASHTAG_PATTERN
public static final String HASHTAG_PATTERN
- See Also:
- Constant Field Values
-
tag
protected String tag
-
-
Method Detail
-
asText
public String asText()
Description copied from class:ElementReturn a text representation of the element, descending into its children.
-
asMarkdown
public org.commonmark.node.Node asMarkdown()
-
toString
public String toString()
-
getTagPattern
public String getTagPattern()
a Keyword must provide its validation pattern- Returns:
-
getEntitySubType
protected String getEntitySubType()
- Specified by:
getEntitySubTypein classEntity
-
getEntityVersion
protected String getEntityVersion()
- Specified by:
getEntityVersionin classEntity
-
getEntityType
protected String getEntityType()
- Specified by:
getEntityTypein classEntity
-
updateBiContext
public void updateBiContext(BiContext context)
-
buildAttribute
protected void buildAttribute(MessageMLParser parser, Node item) throws InvalidInputException
- Overrides:
buildAttributein classEntity- Throws:
InvalidInputException
-
validate
public void validate() throws InvalidInputException- Overrides:
validatein classEntity- Throws:
InvalidInputException
-
getTag
public String getTag()
-
getEntityIdPrefix
protected String getEntityIdPrefix()
- Specified by:
getEntityIdPrefixin classEntity
-
asPresentationML
public void asPresentationML(XmlPrintStream out, MessageMLContext context)
-
getEntityValue
protected String getEntityValue()
- Specified by:
getEntityValuein classEntity
-
-