Class HtmlSimpleEntityParser
java.lang.Object
de.hybris.platform.commons.translator.parsers.AbstractParser
de.hybris.platform.commons.translator.parsers.HtmlSimpleEntityParser
HtmlSimpleEntityParser is an implementation of AbstractParser created for html
entities like & nbsp; .-
Field Summary
Fields inherited from class de.hybris.platform.commons.translator.parsers.AbstractParser
end, name, start -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNode(String start, String end, String text, Translator translator) CreateAbstractNodeinstance from a given textgetEndExpression(String start) return the same result asgetStartExpressionmethod.
-
Constructor Details
-
HtmlSimpleEntityParser
public HtmlSimpleEntityParser()
-
-
Method Details
-
createNode
Description copied from class:AbstractParserCreateAbstractNodeinstance from a given text- Specified by:
createNodein classAbstractParser- Parameters:
start- is a String that was found when searching for a start of text that should be used to create nodeend- is a String that was found when searching for a end of text that should be used to create nodetext- text is whole text that was between start and end Stringstranslator- reference toTranslatorthat would be used to search for sub tags in giventext- Returns:
- node that was created from the given text (can be with subnodes if any was found in
text)
-
getEndExpression
- Specified by:
getEndExpressionin classAbstractParser- Returns:
- null because there is no separate closing tag for entity.
-
getStartEndExpression
return the same result asgetStartExpressionmethod. There is no separate closing tag, string that was found as beginning always should be considered as a finish for text from which node would be created- Specified by:
getStartEndExpressionin classAbstractParser- Returns:
- regular expression that would be used to check if beginning of text is not also the finishing one ( like br html tag which have no separate closing tag)
-
getStartExpression
- Specified by:
getStartExpressionin classAbstractParser- Returns:
- regular expression that would be used to search for beginning of text from which node would be created
-