Options
All
  • Public
  • Public/Protected
  • All
Menu

A comunica actor for parsing reasoning rules

Actor types:

  • Input: IActionRuleParse: A parse input or a media type input.
  • Test:
  • Output: IActorRuleParseOutput: The parsed rules.
see

IActionRuleParse

see

IActorRuleParseOutput

Hierarchy

Index

Constructors

constructor

Properties

Readonly beforeActors

beforeActors: Actor<IActionAbstractMediaTyped<IActionRuleParse>, IActorTestAbstractMediaTyped<IActorTest>, IActorOutputAbstractMediaTyped<IActorRuleParseOutput>>[]

Readonly bus

bus: Bus<Actor<IActionAbstractMediaTyped<IActionRuleParse>, IActorTestAbstractMediaTyped<IActorTest>, IActorOutputAbstractMediaTyped<IActorRuleParseOutput>>, IActionAbstractMediaTyped<IActionRuleParse>, IActorTestAbstractMediaTyped<IActorTest>, IActorOutputAbstractMediaTyped<IActorRuleParseOutput>>

Readonly name

name: string

Methods

deinitialize

  • deinitialize(): Promise<any>
  • Deinitialize this actor. This should be used for cleaning up things when the application is shut down, such as closing files and removing temporary files.

    Returns Promise<any>

    A promise that resolves when the actor has been deinitialized.

Protected getDefaultLogData

  • getDefaultLogData(context: IActionContext, data?: () => any): any
  • Parameters

    • context: IActionContext
    • Optional data: () => any
        • (): any
        • Returns any

    Returns any

Abstract getMediaTypeFormats

  • getMediaTypeFormats(context: IActionContext): Promise<Record<string, string>>
  • Get the media type formats of this given actor.

    Parameters

    • context: IActionContext

      An optional context.

    Returns Promise<Record<string, string>>

    } A promise that resolves to the media types.

Abstract getMediaTypes

  • getMediaTypes(context: IActionContext): Promise<Record<string, number>>
  • Get the media type of this given actor.

    Parameters

    • context: IActionContext

      An optional context.

    Returns Promise<Record<string, number>>

    } A promise that resolves to the media types.

initialize

  • initialize(): Promise<any>
  • Initialize this actor. This should be used for doing things that take a while, such as opening files.

    Returns Promise<any>

    A promise that resolves when the actor has been initialized.

Protected logDebug

  • logDebug(context: IActionContext, message: string, data?: () => any): void
  • Parameters

    • context: IActionContext
    • message: string
    • Optional data: () => any
        • (): any
        • Returns any

    Returns void

Protected logError

  • logError(context: IActionContext, message: string, data?: () => any): void
  • Parameters

    • context: IActionContext
    • message: string
    • Optional data: () => any
        • (): any
        • Returns any

    Returns void

Protected logFatal

  • logFatal(context: IActionContext, message: string, data?: () => any): void
  • Parameters

    • context: IActionContext
    • message: string
    • Optional data: () => any
        • (): any
        • Returns any

    Returns void

Protected logInfo

  • logInfo(context: IActionContext, message: string, data?: () => any): void
  • Parameters

    • context: IActionContext
    • message: string
    • Optional data: () => any
        • (): any
        • Returns any

    Returns void

Protected logTrace

  • logTrace(context: IActionContext, message: string, data?: () => any): void
  • Parameters

    • context: IActionContext
    • message: string
    • Optional data: () => any
        • (): any
        • Returns any

    Returns void

Protected logWarn

  • logWarn(context: IActionContext, message: string, data?: () => any): void
  • Parameters

    • context: IActionContext
    • message: string
    • Optional data: () => any
        • (): any
        • Returns any

    Returns void

run

  • Parameters

    Returns Promise<IActorOutputAbstractMediaTyped<IActorRuleParseOutput>>

Abstract runHandle

  • Run the given handle action on this actor.

    Parameters

    • action: IActionRuleParse

      The handle action to run.

    • mediaType: undefined | string

      The media type to run with.

    • context: IActionContext

      An optional context.

    Returns Promise<IActorRuleParseOutput>

    A promise that resolves to the handle run result.

runObservable

  • Run the given action on this actor AND invokes the {@link Bus#onRun} method.

    Parameters

    Returns Promise<IActorOutputAbstractMediaTyped<IActorRuleParseOutput>>

    A promise that resolves to the run result.

test

  • test(action: IActionAbstractMediaTyped<IActionRuleParse>): Promise<IActorTestAbstractMediaTyped<IActorTest>>
  • Parameters

    Returns Promise<IActorTestAbstractMediaTyped<IActorTest>>

Abstract testHandle

  • testHandle(action: IActionRuleParse, mediaType: undefined | string, context: IActionContext): Promise<IActorTest>
  • Check if this actor can run the given handle action, without actually running it.

    Parameters

    • action: IActionRuleParse

      The handle action to test.

    • mediaType: undefined | string

      The media type to test.

    • context: IActionContext

      An optional context.

    Returns Promise<IActorTest>

    A promise that resolves to the handle test result.

Abstract testMediaType

  • testMediaType(context: IActionContext): Promise<boolean>
  • Check if this actor can emit its media types.

    Parameters

    • context: IActionContext

      An optional context.

    Returns Promise<boolean>

    A promise that resolves to the media type run result.

Abstract testMediaTypeFormats

  • testMediaTypeFormats(context: IActionContext): Promise<boolean>
  • Check if this actor can emit its media type formats.

    Parameters

    • context: IActionContext

      An optional context.

    Returns Promise<boolean>

    A promise that resolves to the media type run result.

Static getContextLogger

  • getContextLogger(context: IActionContext): undefined | Logger
  • Get the logger from the given context.

    Parameters

    • context: IActionContext

      An optional context.

    Returns undefined | Logger

    The logger or undefined.

Generated using TypeDoc