public class TextMetaDataCollectionExtractingProcessor extends Object implements ItemProcessor
ItemProcessor that extracts a list of text values from descriptor
XPath-selected nodes and sets them as the
properties of the item. For extracting single values from a node use TextMetaDataExtractingProcessor.| Modifier and Type | Field and Description |
|---|---|
protected String[] |
metaDataNodesXPathQueries
Array of XPath queries for the nodes whose values should be extracted.
|
| Constructor and Description |
|---|
TextMetaDataCollectionExtractingProcessor(String... metaDataNodesXPathQueries)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Returns true if the specified
TextMetaDataCollectionExtractingProcessor's and this instance's
metaDataNodesXPathQueries are equal. |
int |
hashCode()
Returns the hash code for this instance, which is basically hash code of the list of XPath queries.
|
Item |
process(Context context,
CachingOptions cachingOptions,
Item item)
For every XPath query provided in
metaDataNodesXPathQueries, a list of nodes is selected and for each
one of these nodes its text value is extracted and added to a list that is later put in the item's properties. |
String |
toString() |
protected String[] metaDataNodesXPathQueries
public TextMetaDataCollectionExtractingProcessor(String... metaDataNodesXPathQueries)
metaDataNodesXPathQueries to the provided argument.public Item process(Context context, CachingOptions cachingOptions, Item item) throws ItemProcessingException
metaDataNodesXPathQueries, a list of nodes is selected and for each
one of these nodes its text value is extracted and added to a list that is later put in the item's properties.process in interface ItemProcessorcontext - the current contextcachingOptions - caching options in case you need access to itemsitem - the item to processItemProcessingException - if an error occurred while processing the itempublic boolean equals(Object o)
TextMetaDataCollectionExtractingProcessor's and this instance's
metaDataNodesXPathQueries are equal.public int hashCode()
ItemProcessor, this method is defined because any processor which is passed in the method call of
a ContentStoreService can be used as part of a key for caching.Copyright © 2018 CrafterCMS. All rights reserved.