Class StructuredTextExpertFactory

    • Method Detail

      • getExpert

        public static IStructuredTextExpert getExpert()
        Obtains a IStructuredTextExpert instance for processing structured text with a default type handler segmenting the text according to default separators. This expert instance does not handle states.
        Returns:
        the IStructuredTextExpert instance.
        See Also:
        StructuredTextProcessor.getDefaultSeparators()
      • getExpert

        public static IStructuredTextExpert getExpert​(String type)
        Obtains a IStructuredTextExpert instance for processing structured text with the specified type handler. This expert instance does not handle states.
        Parameters:
        type - the identifier for the required type handler. This identifier may be one of those listed in StructuredTextTypeHandlerFactory or it may be have been registered by a plug-in.
        Returns:
        the IStructuredTextExpert instance.
        Throws:
        IllegalArgumentException - if type is not a known type identifier.
      • getExpert

        public static IStructuredTextExpert getExpert​(String type,
                                                      StructuredTextEnvironment environment)
        Obtains a IStructuredTextExpert instance for processing structured text with the specified type handler and the specified environment. This expert instance does not handle states.
        Parameters:
        type - the identifier for the required type handler. This identifier may be one of those listed in StructuredTextTypeHandlerFactory or it may be have been registered by a plug-in.
        environment - the current environment, which may affect the behavior of the expert. This parameter may be specified as null, in which case the StructuredTextEnvironment.DEFAULT environment should be assumed.
        Returns:
        the IStructuredTextExpert instance.
        Throws:
        IllegalArgumentException - if type is not a known type identifier.
      • getStatefulExpert

        public static IStructuredTextExpert getStatefulExpert​(String type)
        Obtains a IStructuredTextExpert instance for processing structured text with the specified type handler. This expert instance can handle states.
        Parameters:
        type - the identifier for the required type handler. This identifier may be one of those listed in StructuredTextTypeHandlerFactory or it may be have been registered by a plug-in.
        Returns:
        the IStructuredTextExpert instance.
        Throws:
        IllegalArgumentException - if type is not a known type identifier.
      • getStatefulExpert

        public static IStructuredTextExpert getStatefulExpert​(String type,
                                                              StructuredTextEnvironment environment)
        Obtains a IStructuredTextExpert instance for processing structured text with the specified type handler and the specified environment. This expert instance can handle states.
        Parameters:
        type - the identifier for the required type handler. This identifier may be one of those listed in StructuredTextTypeHandlerFactory or it may be have been registered by a plug-in.
        environment - the current environment, which may affect the behavior of the expert. This parameter may be specified as null, in which case the StructuredTextEnvironment.DEFAULT environment should be assumed.
        Returns:
        the IStructuredTextExpert instance.
        Throws:
        IllegalArgumentException - if type is not a known type identifier.