Class ReasonerFactoryAssembler

All Implemented Interfaces:

public class ReasonerFactoryAssembler extends AssemblerBase implements Assembler
The ReasonerFactoryAssembler constructs a ReasonerFactory from the description. The factory class may be specified by a URL (which looks the class up in the registry) or by class name; otherwise it defaults to the GenericRuleReasonerFactory.

If the class is specified by class name then an instance of that class is acquired by calling its theInstance method if it has one. Otherwise a fresh instance is constructed by calling its zero-argument constructor (and exploding if it hasn't got one).

Thanks to Adam Cimarosti for provoking this code and providing an example implementation.

  • Constructor Details

    • ReasonerFactoryAssembler

      public ReasonerFactoryAssembler()
  • Method Details

    • open

      public Object open(Assembler a, Resource root, Mode irrelevant)
      Description copied from interface: Assembler
      The core operation: answer a new object constructed according to the object description hanging from root, using the assembler a for any sub-objects. Use mode to decide if persistent objects are to be re-used or created; this mode is passed down to all sub-object construction.
      Specified by:
      open in interface Assembler
      Specified by:
      open in class AssemblerBase
    • getReasonerFactoryByURL

      public static ReasonerFactory getReasonerFactoryByURL(Resource root, Resource reasonerURL)
      Answer a ReasonerFactory which delivers reasoners with the given URL reasonerURL. If there is no such reasoner, throw an UnknownreasonerException.