public class FieldDescription extends Object implements Comparable<FieldDescription>
Modifier and Type | Field and Description |
---|---|
private List<String> |
aliases |
private boolean |
mandatory
If true, this value must be provided either in the query profile or in the search request
|
private com.yahoo.processing.request.CompoundName |
name |
private boolean |
overridable
If true, assignments to this value from outside will be ignored
|
private FieldType |
type |
Constructor and Description |
---|
FieldDescription(com.yahoo.processing.request.CompoundName name,
FieldType type,
List<String> aliases,
boolean mandatory,
boolean overridable)
Creates a field description
|
FieldDescription(com.yahoo.processing.request.CompoundName name,
FieldType type,
String aliases,
boolean mandatory,
boolean overridable)
Creates a field description from a list where the aliases are represented as a comma-separated string
|
FieldDescription(String name,
FieldType type) |
FieldDescription(String name,
FieldType type,
boolean mandatory) |
FieldDescription(String name,
FieldType type,
boolean mandatory,
boolean overridable) |
FieldDescription(String name,
FieldType type,
String aliases) |
FieldDescription(String name,
FieldType type,
String aliases,
boolean mandatory,
boolean overridable) |
FieldDescription(String name,
String type) |
FieldDescription(String name,
String type,
String aliases) |
FieldDescription(String name,
String typeString,
String aliases,
boolean mandatory,
boolean overridable)
Creates a field description
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FieldDescription other) |
List<String> |
getAliases()
Returns a unmodifiable list of the aliases of this.
|
com.yahoo.processing.request.CompoundName |
getCompoundName()
Returns the full name of this as a compound name
|
String |
getName()
Returns the full name of this as a string
|
FieldType |
getType() |
boolean |
isMandatory()
Returns whether this field must be provided in the query profile or the search definition.
|
boolean |
isOverridable()
Returns false if overrides to values for this field from the outside should be ignored.
|
private static List<String> |
toList(String string) |
String |
toString() |
FieldDescription |
withName(com.yahoo.processing.request.CompoundName name)
Returns a copy of this with the name set to the argument name
|
FieldDescription |
withType(FieldType type)
Returns a copy of this with the type set to the argument type
|
private final com.yahoo.processing.request.CompoundName name
private final FieldType type
private final boolean mandatory
private final boolean overridable
public FieldDescription(String name, String typeString, String aliases, boolean mandatory, boolean overridable)
name
- the name of the fieldtypeString
- the type of the field represented as a string - see FieldType
aliases
- a space-separated list of alias names of this field name. Aliases are not following dotted
(meaning they are global, not that they cannot contain dots) and are case insensitive. Null is permissible
if there are no aliasesmandatory
- whether it is mandatory to provide a value for this field. default: falseoverridable
- whether this can be overridden when first set in a profile. Default: truepublic FieldDescription(String name, FieldType type, boolean mandatory, boolean overridable)
public FieldDescription(String name, FieldType type, String aliases, boolean mandatory, boolean overridable)
public FieldDescription(com.yahoo.processing.request.CompoundName name, FieldType type, String aliases, boolean mandatory, boolean overridable)
public FieldDescription(com.yahoo.processing.request.CompoundName name, FieldType type, List<String> aliases, boolean mandatory, boolean overridable)
name
- the name of the fieldtype
- the type of the field represented as a string - see FieldType
aliases
- a list of aliases, never null. Aliases are not following dotted
(meaning they are global, not that they cannot contain dots) and are case insensitive.mandatory
- whether it is mandatory to provide a value for this field. default: falseoverridable
- whether this can be overridden when first set in a profile. Default: truepublic String getName()
public com.yahoo.processing.request.CompoundName getCompoundName()
public FieldType getType()
public List<String> getAliases()
public boolean isMandatory()
public boolean isOverridable()
public int compareTo(FieldDescription other)
compareTo
in interface Comparable<FieldDescription>
public FieldDescription withName(com.yahoo.processing.request.CompoundName name)
public FieldDescription withType(FieldType type)
Copyright © 2018. All rights reserved.