public class LuceneIndexFileRule
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FILEPATTERN_WILDCARD
Wildcard for file name patterns
|
static int |
FILESIZELIMIT_INDEX_ALL
File size limit representing that all files are indexed
|
static int |
FILESIZELIMIT_INDEX_NONE
File size limit representing that no files are indexed
|
Constructor and Description |
---|
LuceneIndexFileRule() |
Modifier and Type | Method and Description |
---|---|
static void |
addDefaultRule(org.dom4j.Element lucene)
adds the default rule to the lucene.itemrules element
|
boolean |
equals(java.lang.Object obj) |
float |
getBoost()
returns the boost value of this rule
|
static LuceneIndexFileRule |
getDefaultRule()
Returns the default rule for newly created databases
|
java.lang.String |
getFilePattern()
Returns the file pattern
|
java.lang.String |
getFilePatternClearWildcard()
Returns the file pattern name without eventually trailing text after the wildcard
|
int |
getFileSizeLimit()
Returns the size limit of bytes for indexing files via this rule.
|
static java.util.List |
getRules(org.dom4j.Element lucene)
get rules from configfile element lucene
|
static java.util.List<LuceneIndexFileRule> |
getRules(java.util.List<de.innovationgate.wga.config.LuceneIndexFileRule> rules)
get rules from configbean list
|
boolean |
hasWildcard()
Determines if the rule file pattern has a wildcard
|
boolean |
isDefaultRule()
Determines if this rule is a default rule that will apply to all files not taken by other rules
|
boolean |
isIncludedInAllContent()
Returns if the index information of this file should be used for unspecific searches where no item to search is defined.
|
static void |
saveRules(org.dom4j.Element lucene,
java.util.List rules)
Saves rules to lucene configuration in wga.xml
|
void |
setBoost(float boost)
sets the boost value for this rule
|
void |
setFilePattern(java.lang.String filePattern)
Sets the file pattern.
|
void |
setFileSizeLimit(int fileSizeLimit)
Sets the size limit of bytes for indexing files via this rule.
|
void |
setIncludedInAllContent(boolean includedInAllContent)
Sets if the index information of this file should be used for unspecific searches where no item to search if defined.
|
public static final java.lang.String FILEPATTERN_WILDCARD
public static final int FILESIZELIMIT_INDEX_NONE
public static final int FILESIZELIMIT_INDEX_ALL
public static java.util.List getRules(org.dom4j.Element lucene)
lucene
- configfile elementpublic static java.util.List<LuceneIndexFileRule> getRules(java.util.List<de.innovationgate.wga.config.LuceneIndexFileRule> rules)
public static void saveRules(org.dom4j.Element lucene, java.util.List rules)
lucene
- The lucene configuration elementrules
- List of LuceneIndexFileRule
objects to be savedpublic static LuceneIndexFileRule getDefaultRule()
public static void addDefaultRule(org.dom4j.Element lucene)
lucene
- luceneElementpublic boolean hasWildcard()
public boolean isDefaultRule()
public java.lang.String getFilePatternClearWildcard()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getFilePattern()
public void setFilePattern(java.lang.String filePattern)
FILEPATTERN_WILDCARD
.filePattern
- public int getFileSizeLimit()
FILESIZELIMIT_INDEX_ALL
and FILESIZELIMIT_INDEX_NONE
for this setting.public void setFileSizeLimit(int fileSizeLimit)
FILESIZELIMIT_INDEX_ALL
and FILESIZELIMIT_INDEX_NONE
for this setting.fileSizeLimit
- public boolean isIncludedInAllContent()
public void setIncludedInAllContent(boolean includedInAllContent)
includedInAllContent
- public float getBoost()
public void setBoost(float boost)
boost
- java.lang.IllegalArgumentException
- if boost is <=0