Package it.unipd.dei.eis.core.utils
Class ContextBuilder
- java.lang.Object
-
- it.unipd.dei.eis.core.utils.ContextBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private StringapiKeyThe apiKey field contains the API key.private intcountArticlesThe countArticles field contains the number of articles to be retrieved.private intcountTermsThe countTerms field contains the number of terms to be extracted.private DatefromDateThe fromDate field contains the date from which the articles are retrieved.private booleanlemmaThe lemma field contains the lemma option.private StringoutputArticlesThe outputArticles field contains the output articles file name.private StringoutputTermsThe outputTerms field contains the output terms file name.private StringqueryThe query field contains the query to be searched.private StringsourceThe source field contains the source from which the data are retrieved.private DatetoDateThe toDate field contains the limit date to which the articles are retrieved.private UseCasesuseCaseThe useCase field contains the UseCase.
-
Constructor Summary
Constructors Constructor Description ContextBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Contextbuild()Builds the context.ContextBuildersetApiKey(String apiKey)Sets the api key.ContextBuildersetCountArticles(int countArticles)Sets the count articles.ContextBuildersetCountTerms(int countTerms)Sets the count terms.ContextBuildersetFromDate(Date fromDate)Sets the from date.ContextBuildersetLemma(boolean lemma)Sets the lemma option.ContextBuildersetOutputArticles(String outputArticles)Sets the output articles.ContextBuildersetOutputTerms(String outputTerms)Sets the output terms.ContextBuildersetQuery(String query)Sets the query.ContextBuildersetSource(String source)Sets the source.ContextBuildersetToDate(Date toDate)Sets the to date.ContextBuildersetUseCase(UseCases useCase)Sets the command.
-
-
-
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.
-
-
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
-
-