Class PluginInfo.Builder
java.lang.Object
org.hansken.plugin.extraction.api.PluginInfo.Builder
- Enclosing class:
- PluginInfo
A builder for
plugin information
.
Note: all methods throw a NullPointerException
when null
is passed to them.
-
Method Summary
Modifier and TypeMethodDescriptionSet theauthor
.build()
Create theplugin information
from the properties set on thisbuilder
.deferredIterations
(int deferredIterations) Set the number of extraction iterations needed for this deferred plugin.description
(String description) Set thedescription
.hqlMatcher
(String hqlMatcher) Set the hqlMatcher query in string format.Set the unique id of this plugin, consisting of domain, category and name.Set the unique id of this plugin, consisting of domain, category and name.Set the name of the license of this plugin.maturityLevel
(MaturityLevel maturityLevel) Set thematurity level
.Deprecated.pluginVersion
(String version) Set theplugin version
.resources
(PluginResources resources) Set the resources of this plugin (optional).transformer
(List<TransformerLabel> transformers) webpageUrl
(String webpageUrl) Set the url to a webpage that belongs to this plugin.
-
Method Details
-
name
Deprecated.Useid(PluginId)
instead.Set the name of thisplugin
.- Parameters:
name
- the name- Returns:
this
- Throws:
IllegalArgumentException
- if the name is empty
-
pluginVersion
Set theplugin version
.- Parameters:
version
- the plugin version- Returns:
this
- Throws:
IllegalArgumentException
- if the version is empty
-
description
Set thedescription
.- Parameters:
description
- the description- Returns:
this
- Throws:
IllegalArgumentException
- if the description is empty
-
author
Set theauthor
.- Parameters:
author
- the author- Returns:
this
-
maturityLevel
Set thematurity level
.- Parameters:
maturityLevel
- the maturity level- Returns:
this
-
hqlMatcher
Set the hqlMatcher query in string format.- Parameters:
hqlMatcher
- the matcher- Returns:
this
-
webpageUrl
Set the url to a webpage that belongs to this plugin. This can also be a link to a webpage of the git repository of the remote plugin.- Parameters:
webpageUrl
- url to webpage- Returns:
this
-
deferredIterations
Set the number of extraction iterations needed for this deferred plugin. Only relevant for deferred plugins. If this method is not called upon, default number of iterations will be set to 1.- Parameters:
deferredIterations
- number of iterations needed for this plugin. Should be between 1 and 20- Returns:
this
-
id
Set the unique id of this plugin, consisting of domain, category and name.example: "nfi.nl/extract/ocr/detection/plugin".
in this example nfi.nl is the domain, extract is the category, and ocr/detection/plugin is the name.- Parameters:
domain
- the domain of the organisation, for example "nfi.nl"category
- the action group of the plugin, for example `extract`, `carve`, `classify` (read the SDK documentation for more details).name
- the name of the plugin, or in the classic sense, a description detailing the action(s) of the plugin. Note that the name can contain (forward) slashes.- Returns:
this
-
id
Set the unique id of this plugin, consisting of domain, category and name.- Parameters:
id
- the unique id of this plugin, consisting of domain, category and name.- Returns:
this
-
license
Set the name of the license of this plugin.- Parameters:
license
- name of the license of the plugin- Returns:
this
-
resources
Set the resources of this plugin (optional).- Parameters:
resources
- the resources of this plugin- Returns:
this
-
transformer
-
build
Create theplugin information
from the properties set on thisbuilder
.- Returns:
- the created plugin information
-
id(PluginId)
instead.