Interface DSLKnowledgeProvider


public interface DSLKnowledgeProvider
  • Method Summary

    Modifier and Type Method Description
    default void apply​(RuntimeContext<?> targetContext, InputStream... inputStreams)
    Given the input stream, the DSL implementation must compile and append rules to the provided context.
    default void apply​(RuntimeContext<?> targetContext, Reader... readers)  
    void apply​(RuntimeContext<?> targetContext, URL... resources)
    Given the sources' URLs, the DSL implementation must compile and append rules to the provided context.
    Knowledge create​(KnowledgeService service, URL... resources)
    Given the sources' URLs, the DSL implementation must return new Knowledge instance.
    String getName()  
  • Method Details

    • getName

      String getName()
    • create

      Knowledge create​(KnowledgeService service, URL... resources) throws IOException

      Given the sources' URLs, the DSL implementation must return new Knowledge instance. Depending on the DSL implementation, URLs may refer to plain text resources, Java classes/archives, JDBC connection strings, files, etc.

      Parameters:
      resources - remote or local resources to apply
      service - Knowledge service.
      Throws:
      IOException
    • apply

      void apply​(RuntimeContext<?> targetContext, URL... resources) throws IOException

      Given the sources' URLs, the DSL implementation must compile and append rules to the provided context.

      Parameters:
      targetContext - the runtime to append rules to
      resources - remote or local resources to apply
      Throws:
      IOException
    • apply

      default void apply​(RuntimeContext<?> targetContext, InputStream... inputStreams) throws IOException

      Given the input stream, the DSL implementation must compile and append rules to the provided context.

      Parameters:
      targetContext - the runtime to append rules to
      inputStreams - input streams to ruleset sources
      Throws:
      IOException
    • apply

      default void apply​(RuntimeContext<?> targetContext, Reader... readers) throws IOException
      Parameters:
      targetContext - the runtime to append rules to
      readers - readers of ruleset sources
      Throws:
      IOException
      See Also:
      apply(RuntimeContext, InputStream...)