Class QueryConsumingTreeProcessor

  • All Implemented Interfaces:
    org.asciidoctor.extension.Processor

    public class QueryConsumingTreeProcessor
    extends org.asciidoctor.extension.Treeprocessor
    Extension for Asciidoctor. It looks for two kinds of blocks in the AsciiDoc source: 1) Blocks with the role `setup-query`. The content is passed to a SetupQueryConsumer. A doc test can use this by making the SetupQueryConsumer run the content as a setup query before running tests. 2) Blocks with the role `query-example`. The content is expected to contain exactly two blocks: 2.1) First, a block containing a Cypher query example. 2.2) Second, a table containing a Cypher query result. The query, the table header, and all the rows, are passed to the QueryExampleConsumer. A doc test can use this by making the QueryExampleConsumer run the queries and assert that the result on each row matches the result
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryConsumingTreeProcessor​(org.neo4j.gds.doc.QueryConsumingTreeProcessor.SetupQueryConsumer setupQueryConsumer, org.neo4j.gds.doc.QueryConsumingTreeProcessor.QueryExampleConsumer queryExampleConsumer, org.neo4j.gds.doc.QueryConsumingTreeProcessor.QueryExampleNoResultConsumer queryExampleNoResultConsumer, java.lang.Runnable cleanup)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.asciidoctor.ast.Document process​(org.asciidoctor.ast.Document document)  
      • Methods inherited from class org.asciidoctor.extension.BaseProcessor

        createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createDocument, createList, createList, createList, createListItem, createListItem, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createSection, createSection, createSection, createSection, createSection, createTable, createTable, createTableCell, createTableCell, createTableCell, createTableCell, createTableColumn, createTableColumn, createTableRow, getConfig, log, parseContent, setConfig, unwrap, updateConfig
      • Methods inherited from class java.lang.Object

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

      • QueryConsumingTreeProcessor

        public QueryConsumingTreeProcessor​(org.neo4j.gds.doc.QueryConsumingTreeProcessor.SetupQueryConsumer setupQueryConsumer,
                                           org.neo4j.gds.doc.QueryConsumingTreeProcessor.QueryExampleConsumer queryExampleConsumer,
                                           org.neo4j.gds.doc.QueryConsumingTreeProcessor.QueryExampleNoResultConsumer queryExampleNoResultConsumer,
                                           java.lang.Runnable cleanup)
    • Method Detail

      • process

        public org.asciidoctor.ast.Document process​(org.asciidoctor.ast.Document document)
        Specified by:
        process in class org.asciidoctor.extension.Treeprocessor