Class MetaDataProcessorResolver

    • Field Detail

      • processorElementXPathQuery

        protected String processorElementXPathQuery
        The XPath query for the processor element that defines the processor to use.
      • elementValueToProcessorMappings

        protected Map<String,​ItemProcessor> elementValueToProcessorMappings
        Mappings of processor element values to processor names.
    • Constructor Detail

      • MetaDataProcessorResolver

        public MetaDataProcessorResolver()
    • Method Detail

      • setProcessorElementXPathQuery

        public void setProcessorElementXPathQuery​(String processorElementXPathQuery)
        Sets the XPath query for the processor element that defines the processor to use.
      • setElementValueToProcessorMappings

        public void setElementValueToProcessorMappings​(Map<String,​ItemProcessor> elementValueToProcessorMappings)
        Sets the mappings of processor element values to processor names.
      • getProcessor

        public ItemProcessor getProcessor​(Item item)
                                   throws XmlException
        Looks for the processor element (by querying it with the processorElementXPathQuery) in the item's descriptor. If the element is found, the element value is mapped to a processor and that processor is returned.
        Specified by:
        getProcessor in interface ItemProcessorResolver
        Throws:
        XmlException - if the element value doesn't refer to an existing processor