DLESE Tools
v1.6.0

org.dlese.dpc.index.writer.xml
Class XMLIndexerFieldsConfig

java.lang.Object
  extended by 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:
XMLIndexer

Constructor Summary
XMLIndexerFieldsConfig(URL configIndexUrl)
           
 
Method Summary
 boolean formatIsConfigured(String xmlFormatOrSchema)
          Determine if the given xmlFormat or schema has a configuration.
 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.
 Document getFormatConfig(String xmlFormatOrSchema)
          Gets the configuration Document for a given xmlFormat or schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLIndexerFieldsConfig

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

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 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

DLESE Tools
v1.6.0