Interface ResourceProcessor<C extends ProcessedResource>

Type Parameters:
C - The type of the processed resource.
All Known Implementing Classes:
AbstractResourceProcessor

public interface ResourceProcessor<C extends ProcessedResource>
For a given resource, it implements a mechanism to transform such resource in a ProcessedResource. This is the interface of some "compiler" of sort, that translate a Resource into an "executable" representation of some kind, suitable for execution by some existing runtime. In most cases, implementors are expected to just extend AbstractResourceProcessor
  • Method Details

    • process

      void process()
      Perform the processing of the given resource
    • getResource

      Resource getResource()
      Returns:
      the resource that is processed by this object
    • getProcessedResource

      C getProcessedResource()
      Returns:
      the processed resource or null if there were errors
      Throws:
      IllegalStateException - if process() was never called
    • getErrors

      Collection<? extends KnowledgeBuilderError> getErrors()
      Returns any error that have been generated while processing the resource.
      Returns:
      empty if no errors occurred and the resource have been successfully processed