@Deprecated public RuleSetFactory()
@Deprecated public RuleSetFactory(ClassLoader classLoader, RulePriority minimumPriority, boolean warnDeprecated, boolean enableCompatibility)
@Deprecated public RuleSetFactory(ResourceLoader resourceLoader, RulePriority minimumPriority, boolean warnDeprecated, boolean enableCompatibility)
public RuleSetFactory(RuleSetFactory factory, boolean warnDeprecated)
Constructor copying all configuration from another factory.
factory
- The factory whose configuration to copy.
warnDeprecated
- Whether deprecation warnings are to be produced by this factory.
public Iterator<RuleSet> getRegisteredRuleSets() throws RuleSetNotFoundException
Returns an Iterator of RuleSet objects loaded from descriptions from the "categories.properties" resource for each Language with Rule support.
RuleSetNotFoundException
- if the ruleset file could not be found
public RuleSets createRuleSets(String referenceString) throws RuleSetNotFoundException
referenceString
- A comma separated list of RuleSet reference IDs.
RuleSetNotFoundException
- if unable to find a resource.
public RuleSets createRuleSets(List<RuleSetReferenceId> ruleSetReferenceIds) throws RuleSetNotFoundException
Create a RuleSets from a list of RuleSetReferenceIds. The currently configured ResourceLoader is used.
ruleSetReferenceIds
- The List of RuleSetReferenceId of the RuleSets to create.
RuleSetNotFoundException
- if unable to find a resource.
public RuleSet createRuleSet(String referenceString) throws RuleSetNotFoundException
referenceString
- A comma separated list of RuleSet reference IDs.
RuleSetNotFoundException
- if unable to find a resource.
public RuleSet createRuleSet(RuleSetReferenceId ruleSetReferenceId) throws RuleSetNotFoundException
Create a RuleSet from a RuleSetReferenceId. Priority filtering is ignored when loading a single Rule. The currently configured ResourceLoader is used.
ruleSetReferenceId
- The RuleSetReferenceId of the RuleSet to create.
RuleSetNotFoundException
- if unable to find a resource.
public RuleSet createRuleSetCopy(RuleSet original)
Note: The rule instances are shared between the original and the new ruleset (copy-by-reference). This might lead to concurrency issues, if the original ruleset and the new ruleset are used in different threads.
original
- the original rule set to copy from
public RuleSet createNewRuleSet(String name, String description, String fileName, Collection<String> excludePatterns, Collection<String> includePatterns, Collection<Rule> rules)
Note: The rule instances are shared between the collection and the new ruleset (copy-by-reference). This might lead to concurrency issues, if the rules of the collection are also referenced by other rulesets and used in different threads.
name
- the name of the ruleset
description
- the description
fileName
- the filename
excludePatterns
- list of exclude patterns, if any is not a valid regular expression, it will be ignored
includePatterns
- list of include patterns, if any is not a valid regular expression, it will be ignored
rules
- the collection with the rules to add to the new ruleset
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4