/*******************************************************************************
* Copyright (c) 2007-2008 Cambridge Semantics Incorporated.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* File: $Source$
* Created by: Generated Source from org.openanzo.rdf.utils.properties.jet
* Created on: Generated Source from org.openanzo.rdf.utils.properties.jet
* Revision: $Id$
*
* Contributors:
* Cambridge Semantics Incorporated - initial API and implementation
*******************************************************************************/
package org.openanzo.indexer.lucene;
import java.util.Dictionary;
/**
* Configuration properties for the Lucene index
* @author Generated Source from org.openanzo.rdf.utils.properties.jet
*/
public class LuceneDictionary{
/**
* Key for property "org.openanzo.indexer.lucene.indexLocation"
* Location of the Lucene index on disk
* <li><b>Server:</b>When indexing is enabled on the server, this property points to the location of the Lucene index on disk.</li>
* <li><b>Client:</b>The client uses its own Lucene index, so this property is not used.</li>
* <li><b>Embedded:</b>See server</li>
*
*/
public static final String KEY_LUCENE_INDEX_LOCATION = "org.openanzo.indexer.lucene.indexLocation";
/**
* Key for property "org.openanzo.indexer.lucene.field"
* Default field in index that is queried
* <li><b>Server:</b>This is the default field in the index that is queried.</li>
* <li><b>Client:</b>The client uses its own Lucene index, so this property is not used.</li>
* <li><b>Embedded:</b>See server</li>
*
*/
public static final String KEY_LUCENE_QUERY_FIELD = "org.openanzo.indexer.lucene.field";
/**
* Key for property "org.openanzo.indexer.lucene.text"
* Default query text
* <li><b>Server:</b>This is the default query text to use.</li>
* <li><b>Client:</b>The client uses its own Lucene index, so this property is not used.</li>
* <li><b>Embedded:</b>See server</li>
*
*/
public static final String KEY_LUCENE_QUERY_TEXT = "org.openanzo.indexer.lucene.text";
/**
* Key for property "org.openanzo.indexer.lucene.removeLockFile"
* Force a removal of a previous lock file on startup.
* <li><b>Server:</b>When indexing is enabled on the server and this property is true, the index will remove any previous Lucene lock files on disk.</li>
* <li><b>Client:</b>The client uses its own Lucene index, so this property is not used.</li>
* <li><b>Embedded:</b>See server</li>
*
*/
public static final String KEY_LUCENE_REMOVE_LOCK_FILE = "org.openanzo.indexer.lucene.removeLockFile";
/**
* Key for property "org.openanzo.indexer.lucene.indexerHome"
* Absolute directory location of the Lucene index on disk.
* <li><b>Server:</b>When indexing is enabled on the server, this property will be used to determine the Lucene directory on disk.</li>
* <li><b>Client:</b>The client uses its own Lucene index, so this property is not used.</li>
* <li><b>Embedded:</b>See server</li>
*
*/
public static final String INDEXER_HOME = "org.openanzo.indexer.lucene.indexerHome";
/**
* Get {@link #KEY_LUCENE_INDEX_LOCATION} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_LUCENE_INDEX_LOCATION} if not present
*/
@SuppressWarnings("unchecked")
static public String getIndexLocation(Dictionary properties) {
Object _prop = properties.get(KEY_LUCENE_INDEX_LOCATION);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_LUCENE_INDEX_LOCATION} property to indexLocation in properties
*
* @param properties
* containing configuration data
* @param indexLocation
* value for indexLocation
*/
@SuppressWarnings("unchecked")
static public void setIndexLocation(Dictionary properties, String indexLocation) {
if(indexLocation==null){
properties.remove(KEY_LUCENE_INDEX_LOCATION);
}else{
properties.put(KEY_LUCENE_INDEX_LOCATION, indexLocation);
}
}
/**
* Get {@link #KEY_LUCENE_QUERY_FIELD} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_LUCENE_QUERY_FIELD} if not present
*/
@SuppressWarnings("unchecked")
static public String getField(Dictionary properties) {
Object _prop = properties.get(KEY_LUCENE_QUERY_FIELD);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_LUCENE_QUERY_FIELD} property to field in properties
*
* @param properties
* containing configuration data
* @param field
* value for field
*/
@SuppressWarnings("unchecked")
static public void setField(Dictionary properties, String field) {
if(field==null){
properties.remove(KEY_LUCENE_QUERY_FIELD);
}else{
properties.put(KEY_LUCENE_QUERY_FIELD, field);
}
}
/**
* Get {@link #KEY_LUCENE_QUERY_TEXT} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_LUCENE_QUERY_TEXT} if not present
*/
@SuppressWarnings("unchecked")
static public String getText(Dictionary properties) {
Object _prop = properties.get(KEY_LUCENE_QUERY_TEXT);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #KEY_LUCENE_QUERY_TEXT} property to text in properties
*
* @param properties
* containing configuration data
* @param text
* value for text
*/
@SuppressWarnings("unchecked")
static public void setText(Dictionary properties, String text) {
if(text==null){
properties.remove(KEY_LUCENE_QUERY_TEXT);
}else{
properties.put(KEY_LUCENE_QUERY_TEXT, text);
}
}
/**
* Get {@link #KEY_LUCENE_REMOVE_LOCK_FILE} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #KEY_LUCENE_REMOVE_LOCK_FILE},or "true" if not present
*/
@SuppressWarnings("unchecked")
static public Boolean getRemoveLockFile(Dictionary properties) {
Object _prop=properties.get(KEY_LUCENE_REMOVE_LOCK_FILE);
if(_prop==null){
_prop=Boolean.valueOf(true);
}
return (_prop!=null)?Boolean.valueOf(_prop.toString()):null;
}
/**
* Set {@link #KEY_LUCENE_REMOVE_LOCK_FILE} property to removeLockFile in properties
*
* @param properties
* containing configuration data
* @param removeLockFile
* value for removeLockFile
*/
@SuppressWarnings("unchecked")
static public void setRemoveLockFile(Dictionary properties, Boolean removeLockFile) {
if(removeLockFile==null){
properties.remove(KEY_LUCENE_REMOVE_LOCK_FILE);
}else{
properties.put(KEY_LUCENE_REMOVE_LOCK_FILE, removeLockFile.toString());
}
}
/**
* Get {@link #INDEXER_HOME} property from properties
*
* @param properties
* containing configuration data
*
* @return value of {@link #INDEXER_HOME} if not present
*/
@SuppressWarnings("unchecked")
static public String getIndexerHome(Dictionary properties) {
Object _prop = properties.get(INDEXER_HOME);
return (_prop!=null)?_prop.toString():null;
}
/**
* Set {@link #INDEXER_HOME} property to indexerHome in properties
*
* @param properties
* containing configuration data
* @param indexerHome
* value for indexerHome
*/
@SuppressWarnings("unchecked")
static public void setIndexerHome(Dictionary properties, String indexerHome) {
if(indexerHome==null){
properties.remove(INDEXER_HOME);
}else{
properties.put(INDEXER_HOME, indexerHome);
}
}
}