public class Index2Model extends Object
Constructor and Description |
---|
Index2Model() |
Modifier and Type | Method and Description |
---|---|
void |
addKeyPath(String keyName,
Object[] path)
Add a key and a path to that key in the tag-value hierachy.
|
Object[] |
getKeyPath(String keyName) |
Set |
getKeys() |
String |
getPrimaryKeyName()
Retrieve the tag currently used as primary key.
|
void |
removeKeyPath(String keyName)
Remove a key.
|
void |
setPrimaryKeyName(String primaryKeyName)
Set the tag to use as a primary key in the index.
|
public Index2Model()
public void setPrimaryKeyName(String primaryKeyName)
Set the tag to use as a primary key in the index.
Whenever a value for the primary key tag is seen, this is passed to the indexer as the primary key for indexing.
Primary keys must be unique between entries, and each entry must provide exactly one primary key value.
primaryKeyName
- the tag to use as primary keypublic String getPrimaryKeyName()
public void addKeyPath(String keyName, Object[] path)
Add a key and a path to that key in the tag-value hierachy.
Secondary keys are potentialy non-unique properties of the entries being indexed. Multiple records can use the same secondary key values, and a single record can have multiple values for a secondary key. However, the primary key must be unique.
keyName
- the name of the secondary key to addpath
- the names of each tag to follow to reach the value of the keypublic void removeKeyPath(String keyName)
keyName
- the name of the key to removepublic Object[] getKeyPath(String keyName)
Copyright © 2014 BioJava. All rights reserved.