gov.nasa.pds.search.core.registry
Enum SolrSchemaField

java.lang.Object
  extended by java.lang.Enum<SolrSchemaField>
      extended by gov.nasa.pds.search.core.registry.SolrSchemaField
All Implemented Interfaces:
Serializable, Comparable<SolrSchemaField>

public enum SolrSchemaField
extends Enum<SolrSchemaField>

Enum to map the data types in the Search Core configurations to the Solr Schema, and provide the suffix to be appended.

Author:
jpadams

Enum Constant Summary
DATE
          Suffix affiliated with the DataType.DATE data type
FLOAT
          Suffix affiliated with the DataType FLOAT data type
INTEGER
          Suffix affiliated with the DataType.INTEGER data type
REQUIRED
          Suffix affiliated with the DataType REQUIRED data type
STRING
          Suffix affiliated with the DataType.STRING data type
 
Method Summary
static SolrSchemaField get(DataType type)
          Return a SolrSchemaField based on given DataType
 String getSuffix()
          Return the string suffix
static String getSuffix(DataType type)
          Return the suffix from a given DataType
 DataType getType()
          Returns the DataType
static SolrSchemaField valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SolrSchemaField[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REQUIRED

public static final SolrSchemaField REQUIRED
Suffix affiliated with the DataType REQUIRED data type


STRING

public static final SolrSchemaField STRING
Suffix affiliated with the DataType.STRING data type


DATE

public static final SolrSchemaField DATE
Suffix affiliated with the DataType.DATE data type


INTEGER

public static final SolrSchemaField INTEGER
Suffix affiliated with the DataType.INTEGER data type


FLOAT

public static final SolrSchemaField FLOAT
Suffix affiliated with the DataType FLOAT data type

Method Detail

values

public static SolrSchemaField[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SolrSchemaField c : SolrSchemaField.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SolrSchemaField valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getSuffix

public static String getSuffix(DataType type)
Return the suffix from a given DataType

Parameters:
type - data type specified in the search core config
Returns:
the suffix to be appended to the Field name for the Search Service schema
See Also:
DataType

get

public static SolrSchemaField get(DataType type)
Return a SolrSchemaField based on given DataType

Parameters:
type -
Returns:

getType

public DataType getType()
Returns the DataType

Returns:
DataType object

getSuffix

public String getSuffix()
Return the string suffix

Returns:
string suffix for the object


Copyright © 2010–2014 Planetary Data System. All rights reserved.