@argdown/core
    Preparing search index...

    Class ModelPlugin

    The ModelPlugin builds the basic data model from the abstract syntax tree (AST) in the [[IArgdownResponse.ast]] response property that is provided by the [[ParserPlugin]]. This includes the following response object properties:

    • [[IArgdownResponse.statements]]
    • [[IArgdownResponse.arguments]]
    • [[IArgdownResponse.relations]]
    • [[IArgdownResponse.sections]]

    Most of the other plugins depend on the data produced by this plugin. Whenever possible plugins should use the data processed by this plugin instead of working with the AST nodes directly.

    depends on data from: [[ParserPlugin]]

    Implements

    Index

    Constructors

    Properties

    defaults: IModelPluginSettings = {}
    name: string = "ModelPlugin"

    The name of the plugin

    prepare: IRequestHandler = ...

    Called each time the plugin's processor is run, before any other method of this plugin is called. Use this to add default settings to the request and to check that all required data is present in the response. If not, throw an [[ArgdownPluginError]] to cancel the the current processor's execution.

    ruleListeners: { [eventId: string]: IRuleNodeHandler }

    A map of [[IRuleNode]] event listeners to be added to [[IArgdownPlugin.ruleListeners]]. You can use ruleListeners to visit every rule node in the Argdown AST.

    The listeners will be called by the ArgdownTreeWalker event emitter before the [[run]] method and after the [[prepare]] method. The tree walker visits the nodes depth first and emits [RuleNames.RULE_NAME + "Entry"] and [RuleNames.RULE_NAME + "Exit"] events for every [[IRuleNode]] encountered.

    The eventId has to be a [[RuleNames]] member plus either "Entry" or "Exit".

    [RuleNames.RELATIONS + "Exit"]: ()=>...
    
    run: IRequestHandler = ...

    Use this method to do the main work outside of the Argdown AST. This is the last method to be called by the [[ArgdownApplication]].

    tokenListeners: { [eventId: string]: ITokenNodeHandler }

    A map of [[ITokenNode]] event listeners. You can use tokenListeners to visit every token node in the Argdown abstract syntax tree.

    The listeners will be called by the ArgdownTreeWalker event emitter before the [[run]] method and after the [[prepare]] method.

    The tree walker visits the nodes depth first and emits [TokenNames.TOKEN_NAME] events for every [[ITokenNode]] encountered.

    The eventId has to be a [[TokenNames]] member.

    [TokenNames.STATEMENT_DEFINITION]: ()=>...
    

    Methods

    • Transforms outgoing relations of arguments with an assigned pcs into outgoing relations of the pcs's main conclusion. Transforms incoming undercut relations of arguments with an assigned pcs into undercut relations of the pcs's last inference.

      Parameters

      Returns void

    • Change dialectical types of statement-to-statement relations to semantic types. Support relations become entails relations. Attack relations become contrary relations. Equivalent contrary relations are merged (e.g. [A] - [B] and [B] - [A]).

      Parameters

      Returns void