Class EntityRenderer


  • public class EntityRenderer
    extends AbstractRenderer
    EntityRenderer for all nodes created from html entities
    it gets additional inputStream with rules how to render nodes.
    • Constructor Detail

      • EntityRenderer

        public EntityRenderer()
    • Method Detail

      • renderTextFromNode

        public java.lang.String renderTextFromNode​(AbstractNode node,
                                                   Translator translator)
        this method is using data from changeRulesMap, which is a map where keys are input and values are output texts. When the renderTextFromNode method is called by the Translator, nodeText from a given node is compared with all keys from changeRulesMap. If a matching key is found the nodeText is replaced by the output value of changeRulesMap for this key.
        Specified by:
        renderTextFromNode in class AbstractRenderer
      • setEntitiesReplaceFileStream

        public void setEntitiesReplaceFileStream​(java.io.InputStream entitiesReplaceFileStream)
        Parameters:
        entitiesReplaceFileStream - the entitiesReplaceFileStream to set