SMILA (incubation) API documentation

org.eclipse.smila.lucene.internal
Class MappingsLoader

java.lang.Object
  extended by org.eclipse.smila.lucene.internal.MappingsLoader

public final class MappingsLoader
extends java.lang.Object

The Class MappingsLoader.

Author:
stuc07

Field Summary
static java.lang.String ATTACHMENTS
          Constant to access the attachments map.
static java.lang.String ATTRIBUTES
          Constant to access the attributes map.
static java.lang.String BUNDLE_ID
          The Constant BUNDLE_ID.
static java.lang.String XSD_FILE
          The Constant XSD_FILE.
 
Method Summary
static java.lang.Object loadMappings(java.lang.String fileName)
          Load mappings.
static java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Integer>>> loadMappingsMap(java.lang.String fileName)
          Loads the mappings in an easy to use HashMap format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUNDLE_ID

public static final java.lang.String BUNDLE_ID
The Constant BUNDLE_ID.

See Also:
Constant Field Values

XSD_FILE

public static final java.lang.String XSD_FILE
The Constant XSD_FILE.

See Also:
Constant Field Values

ATTRIBUTES

public static final java.lang.String ATTRIBUTES
Constant to access the attributes map.

See Also:
Constant Field Values

ATTACHMENTS

public static final java.lang.String ATTACHMENTS
Constant to access the attachments map.

See Also:
Constant Field Values
Method Detail

loadMappings

public static java.lang.Object loadMappings(java.lang.String fileName)
Load mappings.

Parameters:
fileName - the name of the mappings file
Returns:
the object

loadMappingsMap

public static java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Integer>>> loadMappingsMap(java.lang.String fileName)
Loads the mappings in an easy to use HashMap format. The base HasMap contains the index name as key. As values it contains another HashMap, that has as key "attribute" and/or "attachment". Again it's value is another HashMap of attribute/attachment names and index filed number.
 |- index1 
 |      |- attributes
 |      |             |- Filename = 1 
 |      |             |- Path = 2
 |      |             |- ... 
 |      |- attachments 
 |                    |- Content = 0
 |                    |- ...
 |                      
 |- index2
 |      |- attributes
 |      |             |-Filename = 11 
 |      |             |- Path = 12
 |      |             |- ...        
 |      |- attachments
 |                    |- Content = 10
 |                    |- ...
 |
 |- ...
 

Parameters:
fileName - the name of the mappings file
Returns:
a HashMap

SMILA (incubation) API documentation