public class DefaultElementParser extends Object implements ElementParser
ElementParser. For text only fields it adds the field with the provided field
name. For elements with children is uses the ElementParserService to parse the children.| Modifier and Type | Field and Description |
|---|---|
protected FieldValueConverter |
fieldValueConverter |
| Constructor and Description |
|---|
DefaultElementParser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
parse(org.dom4j.Element element,
String fieldName,
String parentFieldName,
org.apache.solr.common.SolrInputDocument solrDoc,
ElementParserService parserService)
Parses the given element, generating one or more Solr fields and adding them to the given document.
|
void |
setFieldValueConverter(FieldValueConverter fieldValueConverter) |
protected FieldValueConverter fieldValueConverter
public void setFieldValueConverter(FieldValueConverter fieldValueConverter)
public boolean parse(org.dom4j.Element element,
String fieldName,
String parentFieldName,
org.apache.solr.common.SolrInputDocument solrDoc,
ElementParserService parserService)
ElementParserparse in interface ElementParserelement - the element to parsefieldName - the field name that should be used for the main Solr field (by default will be the
path of the element in the tree plus the element name)parentFieldName - the field name of the parent elementsolrDoc - the Solr document to add the generated fieldsparserService - the parser service used normally to parse sub elementsCopyright © 2018 CrafterCMS. All rights reserved.