Class Mention
- java.lang.Object
-
- org.symphonyoss.symphony.messageml.elements.Element
-
- org.symphonyoss.symphony.messageml.elements.Entity
-
- org.symphonyoss.symphony.messageml.elements.Mention
-
public class Mention extends Entity
Class representing a convenience element for a user mention. Translated to an anchor element.- Since:
- 3/27/17
- Author:
- lukasz
-
-
Field Summary
Fields Modifier and Type Field Description static StringENTITY_TYPEstatic StringMESSAGEML_TAG-
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
-
-
Constructor Summary
Constructors Constructor Description Mention(Element parent, int entityIndex, Long uid, IDataProvider dataProvider)Mention(Element parent, int entityIndex, IDataProvider dataProvider)Mention(Element parent, String presentationMlTag, Long uid, IDataProvider dataProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.node.ObjectNodeasEntityJson(com.fasterxml.jackson.databind.node.ObjectNode parent)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()IUserPresentationgetUserPresentation()StringtoString()voidupdateBiContext(BiContext context)voidvalidate()-
Methods inherited from class org.symphonyoss.symphony.messageml.elements.Entity
getPresentationMLTag
-
Methods inherited from class org.symphonyoss.symphony.messageml.elements.Element
addChild, areNestedElementsAllowed, buildAll, buildNode, checkIntegerAttribute, 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
-
ENTITY_TYPE
public static final String ENTITY_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Mention
public Mention(Element parent, int entityIndex, IDataProvider dataProvider)
-
Mention
public Mention(Element parent, int entityIndex, Long uid, IDataProvider dataProvider)
-
Mention
public Mention(Element parent, String presentationMlTag, Long uid, IDataProvider dataProvider)
-
-
Method Detail
-
buildAttribute
protected void buildAttribute(MessageMLParser parser, Node item) throws InvalidInputException
- Overrides:
buildAttributein classEntity- Throws:
InvalidInputException
-
asPresentationML
public void asPresentationML(XmlPrintStream out, MessageMLContext context)
-
asMarkdown
public org.commonmark.node.Node asMarkdown() throws InvalidInputException- Throws:
InvalidInputException
-
asEntityJson
public com.fasterxml.jackson.databind.node.ObjectNode asEntityJson(com.fasterxml.jackson.databind.node.ObjectNode parent)
- Overrides:
asEntityJsonin classEntity
-
asText
public String asText()
Description copied from class:ElementReturn a text representation of the element, descending into its children.
-
validate
public void validate() throws InvalidInputException- Overrides:
validatein classEntity- Throws:
InvalidInputException
-
getUserPresentation
public IUserPresentation getUserPresentation()
-
getEntityIdPrefix
protected String getEntityIdPrefix()
- Specified by:
getEntityIdPrefixin classEntity
-
getEntityValue
protected String getEntityValue()
- Specified by:
getEntityValuein classEntity
-
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)
-
-