Class XMLIndexerFieldsConfig

java.lang.Object
org.dlese.dpc.index.writer.xml.XMLIndexerFieldsConfig

public class XMLIndexerFieldsConfig extends Object
Holds a configuration for XML fields indexed by XMLIndexer and used in PerFieldAnalyzer.
Author:
John Weatherley
See Also:
  • Constructor Details

    • XMLIndexerFieldsConfig

      public XMLIndexerFieldsConfig(URL configIndexUrl) throws Exception
      Parameters:
      configIndexUrl - URL to the config index file.
      Throws:
      Exception - If error
  • Method Details

    • getFieldAnalyzers

      public Map getFieldAnalyzers()
      Gets a Map of field/analyzer pairs where keys are field or schema names and values are the corresponding Analyzer class names as Strings for the custom fields that are defined in this configuration.
      Returns:
      Map of field/analyzer pairs
    • getFormatConfig

      public org.dom4j.Document getFormatConfig(String xmlFormatOrSchema)
      Gets the configuration Document for a given xmlFormat or schema. Example xmlFormat keys are 'oai_dc', 'library_dc'. An example schema is 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd'.
      Parameters:
      xmlFormatOrSchema - An xmlFormat key or schema location for the format
      Returns:
      A configuration Document or null if not available
    • formatIsConfigured

      public boolean formatIsConfigured(String xmlFormatOrSchema)
      Determine if the given xmlFormat or schema has a configuration. Example xmlFormat keys are 'oai_dc', 'library_dc'. An example schema is 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd'.
      Parameters:
      xmlFormatOrSchema - An xmlFormat key or schema location for the format
      Returns:
      True if the xmlFormat or schema has a configuration