Class LingvoDSL.HtmlVisitor

  • Enclosing class:
    LingvoDSL

    public static class LingvoDSL.HtmlVisitor
    extends io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
    Simple HTML filter for LingvoDSL parser.
    • Constructor Summary

      Constructors 
      Constructor Description
      HtmlVisitor​(java.lang.String dirPath, boolean condensedView)
      Constructor with media path.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void finish()
      End of accept.
      java.lang.String getObject()
      Return result.
      void start()
      Start of accept.
      void visit​(io.github.eb4j.dsl.DslArticle.Attribute a)
      Visit an Attribute.
      void visit​(io.github.eb4j.dsl.DslArticle.EndTag endTag)
      Visit an EndTag.
      void visit​(io.github.eb4j.dsl.DslArticle.Newline n)
      Visit a NewLine.
      void visit​(io.github.eb4j.dsl.DslArticle.Tag tag)
      Visit a tag.
      void visit​(io.github.eb4j.dsl.DslArticle.Text t)
      Visit a text.
      • Methods inherited from class io.github.eb4j.dsl.visitor.DslVisitor

        visit, visit
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HtmlVisitor

        public HtmlVisitor​(java.lang.String dirPath,
                           boolean condensedView)
                    throws java.io.IOException
        Constructor with media path.
        Parameters:
        dirPath - media base path.
        Throws:
        java.io.IOException - when given directory not found.
    • Method Detail

      • start

        public void start()
        Start of accept.

        super#visit(ElementSequence) call this.

        Overrides:
        start in class io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
      • finish

        public void finish()
        End of accept.

        super#visit(ElementSequence) call this.

        Overrides:
        finish in class io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
      • visit

        public void visit​(io.github.eb4j.dsl.DslArticle.Tag tag)
        Visit a tag.
        Specified by:
        visit in class io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
        Parameters:
        tag - to visit.
      • visit

        public void visit​(io.github.eb4j.dsl.DslArticle.EndTag endTag)
        Visit an EndTag.
        Specified by:
        visit in class io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
        Parameters:
        endTag - to visit.
      • getObject

        public java.lang.String getObject()
        Return result.
        Specified by:
        getObject in class io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
        Returns:
        result.
      • visit

        public void visit​(io.github.eb4j.dsl.DslArticle.Text t)
        Visit a text.
        Specified by:
        visit in class io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
        Parameters:
        t - Text object to process.
      • visit

        public void visit​(io.github.eb4j.dsl.DslArticle.Attribute a)
        Visit an Attribute.
        Specified by:
        visit in class io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
        Parameters:
        a - Attribute object to visit.
      • visit

        public void visit​(io.github.eb4j.dsl.DslArticle.Newline n)
        Visit a NewLine.
        Specified by:
        visit in class io.github.eb4j.dsl.visitor.DslVisitor<java.lang.String>
        Parameters:
        n - NewLine object to visit.