Class AITemplatingServiceImpl

  • All Implemented Interfaces:
    AITemplatingService

    public class AITemplatingServiceImpl
    extends Object
    implements AITemplatingService
    This implementation uses the markers:
    • A field that is a prompt begins with PROMPTFIELD:
    • A field that is referenced by other fields begins with PROMPTFIELD#ID: where ID is a unique identifier for the field
    • A URL source is added as SOURCEURL(https://example.com/) after that.
    • A prompt that applies to the whole page can be put into a multi line field; it begins on a line with PAGEPROMPT:
    • Field Detail

      • PROPERTY_PREFIX_PROMPT

        public static final String PROPERTY_PREFIX_PROMPT
        Property prefix: if a property contains a prompt, it's copied into a property with this prefix so that we can redo and undo the process.
        See Also:
        Constant Field Values
      • IGNORED_PROPERTIES

        protected static final Pattern IGNORED_PROPERTIES
        A pattern for property names which we ignore. We only care about String properties that have whitespace, anyway.
      • HAS_WHITESPACE

        protected static final Pattern HAS_WHITESPACE
      • PROMPTFIELD

        protected static final Pattern PROMPTFIELD
        Matches a text with PROMPTFIELD start and determines the id if there is one given. Either it's PROMPTFIELD: ... or PROMPTFIELD#ID: ....
      • SOURCEURL

        protected static final Pattern SOURCEURL
        Pattern for a SOURCEURL(https://example.com/) to extract the URL - group "url".
      • PAGEPROMPT

        protected static final Pattern PAGEPROMPT
        Pattern for a PAGEPROMPT: ... - all lines to the end of the field are in group "url".
      • RICHTEXT_PATTERN

        protected static final Pattern RICHTEXT_PATTERN
        Heuristics to identify richtext properties: start and end with a HTML tag.
      • SEPARATOR_PATTERN

        protected static final Pattern SEPARATOR_PATTERN
      • THE_END_PATTERN

        protected static final Pattern THE_END_PATTERN
        Matches a properly executed THE_END_COMMAND.
      • TYPE_MAP_STRING_STRING

        protected static final Type TYPE_MAP_STRING_STRING
      • gson

        protected final com.google.gson.Gson gson
      • LOG

        protected static final org.slf4j.Logger LOG
    • Constructor Detail

      • AITemplatingServiceImpl

        public AITemplatingServiceImpl()