public class ElementParserServiceImpl extends Object implements ElementParserService
ElementParserService. Parses the element using a list of
ElementParsers. If first parser returns false (the element was not handled), it calls the second one and
so on. It also handles elements tagged with the "indexable" attribute. If the attribute is present, and it's
false, the element is not parsed.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_FIELD_NAME_SEPARATOR |
static String |
DEFAULT_INDEXABLE_ATTRIBUTE_NAME |
protected String |
fieldNameSeparator |
protected String |
indexableAttributeName |
protected List<ElementParser> |
parsers |
| Constructor and Description |
|---|
ElementParserServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getIndexableAttributeName() |
void |
parse(org.dom4j.Element element,
String parentFieldName,
org.apache.solr.common.SolrInputDocument solrDoc)
Parses the given element, generating one or more Solr fields and adding them to the given document.
|
void |
setFieldNameSeparator(String fieldNameSeparator) |
void |
setParsers(List<ElementParser> parsers) |
public static final String DEFAULT_FIELD_NAME_SEPARATOR
public static final String DEFAULT_INDEXABLE_ATTRIBUTE_NAME
protected List<ElementParser> parsers
protected String fieldNameSeparator
protected String indexableAttributeName
public void setParsers(List<ElementParser> parsers)
public void setFieldNameSeparator(String fieldNameSeparator)
public String getIndexableAttributeName()
public void parse(org.dom4j.Element element,
String parentFieldName,
org.apache.solr.common.SolrInputDocument solrDoc)
ElementParserServiceparse in interface ElementParserServiceelement - the element to parseparentFieldName - the field name of the parentsolrDoc - the Solr document to add the generated fieldsCopyright © 2018 CrafterCMS. All rights reserved.