Class ContextBuilder

  • All Implemented Interfaces:
    IBuilder<Context>

    public class ContextBuilder
    extends Object
    implements IBuilder<Context>
    The ContextBuilder class is the builder class of the Context class.
    • Field Detail

      • useCase

        private UseCases useCase
        The useCase field contains the UseCase.
      • source

        private String source
        The source field contains the source from which the data are retrieved.
      • outputArticles

        private String outputArticles
        The outputArticles field contains the output articles file name.
      • outputTerms

        private String outputTerms
        The outputTerms field contains the output terms file name.
      • query

        private String query
        The query field contains the query to be searched.
      • countArticles

        private int countArticles
        The countArticles field contains the number of articles to be retrieved.
      • countTerms

        private int countTerms
        The countTerms field contains the number of terms to be extracted.
      • fromDate

        private Date fromDate
        The fromDate field contains the date from which the articles are retrieved.
      • toDate

        private Date toDate
        The toDate field contains the limit date to which the articles are retrieved.
      • apiKey

        private String apiKey
        The apiKey field contains the API key.
      • lemma

        private boolean lemma
        The lemma field contains the lemma option.
    • Constructor Detail

      • ContextBuilder

        public ContextBuilder()
    • Method Detail

      • setUseCase

        public ContextBuilder setUseCase​(UseCases useCase)
        Sets the command.
        Parameters:
        useCase - the useCase
        Returns:
        the context builder
      • setSource

        public ContextBuilder setSource​(String source)
        Sets the source.
        Parameters:
        source - the source
        Returns:
        the context builder
      • setOutputArticles

        public ContextBuilder setOutputArticles​(String outputArticles)
        Sets the output articles.
        Parameters:
        outputArticles - the output articles
        Returns:
        the context builder
      • setOutputTerms

        public ContextBuilder setOutputTerms​(String outputTerms)
        Sets the output terms.
        Parameters:
        outputTerms - the output terms
        Returns:
        the context builder
      • setQuery

        public ContextBuilder setQuery​(String query)
        Sets the query.
        Parameters:
        query - the query
        Returns:
        the context builder
      • setCountArticles

        public ContextBuilder setCountArticles​(int countArticles)
        Sets the count articles.
        Parameters:
        countArticles - the count articles
        Returns:
        the context builder
      • setCountTerms

        public ContextBuilder setCountTerms​(int countTerms)
        Sets the count terms.
        Parameters:
        countTerms - the count terms
        Returns:
        the context builder
      • setFromDate

        public ContextBuilder setFromDate​(Date fromDate)
        Sets the from date.
        Parameters:
        fromDate - the from date
        Returns:
        the context builder
      • setToDate

        public ContextBuilder setToDate​(Date toDate)
        Sets the to date.
        Parameters:
        toDate - the to date
        Returns:
        the context builder
      • setApiKey

        public ContextBuilder setApiKey​(String apiKey)
        Sets the api key.
        Parameters:
        apiKey - the shared data
        Returns:
        the context builder
      • setLemma

        public ContextBuilder setLemma​(boolean lemma)
        Sets the lemma option.
        Parameters:
        lemma - the lemma option
        Returns:
        the context builder