예제 #1
0
  private KeywordFacade createKeywordFacade(GenerateRequest request) {
    LOGGER.debug("creating keyword facade");

    KeywordFacadeImpl keywordFacade = new KeywordFacadeImpl();
    keywordFacade.setKeywords(request.getKeywords());

    return keywordFacade;
  }
예제 #2
0
  @Override
  public DoorwayContext createContext(GenerateRequest request) {
    LOGGER.debug("creating doorway context");

    DoorwayContext context = new DoorwayContext();

    AbstractTextGenerator generator =
        textGeneratorFacade.getGenerator(request.getGeneralProperties().getTextGeneratorName());
    generator.setSource(request.getTextSource().getContent());

    if (!generator.isInitialized()) {
      generator.initialize();
    }

    context.setTextGenerator(generator);
    context.setKeywordFacade(createKeywordFacade(request));
    context.setUrl(request.getGeneralProperties().getUrl());

    return context;
  }