Class StructuredTextTypeHandlerFactory

java.lang.Object
org.eclipse.equinox.bidi.StructuredTextTypeHandlerFactory

public final class StructuredTextTypeHandlerFactory extends Object
Provides access to registered structured text handlers.

A structured text handler is a subclass of StructuredTextTypeHandler adapted for a given type of structured text.

The constants in this class are identifiers for structured text handlers which are defined and supported "out of the box" by this package. Text handler identifiers can be used when invoking StructuredTextProcessor.processTyped(String, String), or when invoking getExpert methods in StructuredTextExpertFactory.

The getHandler(java.lang.String) method in this class can be used to get a structured text handler reference for one of the handlers defined in this package or for additional structured text handlers registered by plug-ins via the org.eclipse.equinox.bidi.bidiTypes extension point. Text handler references can be used when invoking StructuredTextExpertFactory.getStatefulExpert(StructuredTextTypeHandler, StructuredTextEnvironment).

This class can be used without OSGi running, but only the structured text types declared as string constants in this class are available in that mode.

Restriction:
This class is not intended to be instantiated by clients.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Structured text handler identifier for comma-delimited lists, such as:
    static final String
    Structured text handler identifier for e-mail addresses.
    static final String
    Structured text handler identifier for directory and file paths.
    static final String
    Structured text handler identifier for Java code, possibly spanning multiple lines.
    static final String
    Structured text handler identifier for regular expressions, possibly spanning multiple lines.
    static final String
    Structured text handler identifier for SQL statements, possibly spanning multiple lines.
    static final String
    Structured text handler identifier for compound names.
    static final String
    Structured text handler identifier for URLs.
    static final String
    Structured text handler identifier for XPath expressions.
  • Method Summary

    Modifier and Type
    Method
    Description
    Obtains a structured text handler of a given type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • COMMA_DELIMITED

      public static final String COMMA_DELIMITED
      Structured text handler identifier for comma-delimited lists, such as:
        part1,part2,part3
       
      See Also:
    • EMAIL

      public static final String EMAIL
      Structured text handler identifier for e-mail addresses.
      See Also:
    • FILE

      public static final String FILE
      Structured text handler identifier for directory and file paths.
      See Also:
    • JAVA

      public static final String JAVA
      Structured text handler identifier for Java code, possibly spanning multiple lines.
      See Also:
    • REGEX

      public static final String REGEX
      Structured text handler identifier for regular expressions, possibly spanning multiple lines.
      See Also:
    • SQL

      public static final String SQL
      Structured text handler identifier for SQL statements, possibly spanning multiple lines.
      See Also:
    • UNDERSCORE

      public static final String UNDERSCORE
      Structured text handler identifier for compound names. It expects text to be made of one or more parts separated by underscores:
        part1_part2_part3
       
      See Also:
    • URL

      public static final String URL
      Structured text handler identifier for URLs.
      See Also:
    • XPATH

      public static final String XPATH
      Structured text handler identifier for XPath expressions.
      See Also:
  • Method Details

    • getHandler

      public static StructuredTextTypeHandler getHandler(String id)
      Obtains a structured text handler of a given type. Supported type ids are:
      • the String constants in StructuredTextTypeHandlerFactory
      • if OSGi is running, the types that have been contributed to the org.eclipse.equinox.bidi.bidiTypes extension point.
      Parameters:
      id - the string identifying a structured text handler
      Returns:
      a handler of the required type, or null if the type is unknown