Options
All
  • Public
  • Public/Protected
  • All
Menu

A comunica Parse Dereference Rule Actor.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • args: IActorDereferenceRuleArgs

      @defaultNested {{ "hylar": "text/hylar", "ttl": "text/turtle", "turtle": "text/turtle", "nt": "application/n-triples", "ntriples": "application/n-triples", "nq": "application/n-quads", "nquads": "application/n-quads", "rdf": "application/rdf+xml", "rdfxml": "application/rdf+xml", "owl": "application/rdf+xml", "n3": "text/n3", "trig": "application/trig", "jsonld": "application/ld+json", "json": "application/json", "html": "text/html", "htm": "text/html", "xhtml": "application/xhtml+xml", "xht": "application/xhtml+xml", "xml": "application/xml", "svg": "image/svg+xml", "svgz": "image/svg+xml" }} mediaMappings

    Returns ActorDereferenceRuleParse

Properties

Readonly beforeActors

beforeActors: Actor<IActionDereferenceParse<IActionRuleParseMetadata>, IActorTest, IActorDereferenceParseOutput<RuleStream, undefined>>[]

Readonly bus

bus: Bus<Actor<IActionDereferenceParse<IActionRuleParseMetadata>, IActorTest, IActorDereferenceParseOutput<RuleStream, undefined>>, IActionDereferenceParse<IActionRuleParseMetadata>, IActorTest, IActorDereferenceParseOutput<RuleStream, undefined>>

Readonly mediaMappings

mediaMappings: Record<string, string>

Readonly mediatorDereference

mediatorDereference: MediatorDereference

Readonly mediatorParse

mediatorParse: MediateMediaTyped<IActionParse<IActionRuleParseMetadata>, IActorTest, IActorParseOutput<RuleStream, undefined>>

Readonly mediatorParseMediatypes

mediatorParseMediatypes: MediateMediaTypes

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 dereferenceErrorHandler

  • dereferenceErrorHandler<N, M>(action: IActionDereferenceParse<IActionRuleParseMetadata>, error: unknown, output: N): Promise<N & { data: M }>
  • Handle the given error as a rejection or delegate it to the logger, depending on whether or not hard errors are enabled.

    Type parameters

    • N

    • M: Readable<M>

    Parameters

    • action: IActionDereferenceParse<IActionRuleParseMetadata>

      An action.

    • error: unknown

      An error that has occurred.

    • output: N

      Data to add to the output

    Returns Promise<N & { data: M }>

Protected getDefaultLogData

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

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

    Returns any

getMetadata

Protected handleDereferenceStreamErrors

  • handleDereferenceStreamErrors<L, T>(action: IActionDereferenceParse<L>, data: T): T
  • If hard errors are disabled, modify the given stream so that errors are delegated to the logger.

    Type parameters

    • L: IParseMetadata

    • T: Readable<T>

    Parameters

    • action: IActionDereferenceParse<L>

      A dereference action.

    • data: T

      A data stream.

    Returns T

    The resulting data stream.

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

runObservable

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

    Parameters

    Returns Promise<IActorDereferenceParseOutput<RuleStream, undefined>>

    A promise that resolves to the run result.

test

  • test(action: IActionDereference): Promise<IActorTest>
  • Parameters

    • action: IActionDereference

    Returns Promise<IActorTest>

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