Class FieldDescription
java.lang.Object
com.yahoo.search.query.profile.types.FieldDescription
- All Implemented Interfaces:
Comparable<FieldDescription>
A field description of a query profile type. Immutable.
Field descriptions can be sorted by name.
- Author:
- bratseth
-
Constructor Summary
ConstructorDescriptionFieldDescription
(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 stringFieldDescription
(com.yahoo.processing.request.CompoundName name, FieldType type, List<String> aliases, boolean mandatory, boolean overridable) Creates a field descriptionFieldDescription
(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 -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(FieldDescription other) Returns a unmodifiable list of the aliases of this.com.yahoo.processing.request.CompoundName
Returns the full name of this as a compound namegetName()
Returns the full name of this as a stringgetType()
boolean
Returns whether this field must be provided in the query profile or the search definition.boolean
Returns false if overrides to values for this field from the outside should be ignored.toString()
withName
(com.yahoo.processing.request.CompoundName name) Returns a copy of this with the name set to the argument nameReturns a copy of this with the type set to the argument type
-
Constructor Details
-
FieldDescription
-
FieldDescription
-
FieldDescription
-
FieldDescription
-
FieldDescription
-
FieldDescription
public FieldDescription(String name, String typeString, String aliases, boolean mandatory, boolean overridable) Creates a field description- Parameters:
name
- the name of the fieldtypeString
- the type of the field represented as a string - seeFieldType
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: true
-
FieldDescription
-
FieldDescription
-
FieldDescription
public 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
public FieldDescription(com.yahoo.processing.request.CompoundName name, FieldType type, List<String> aliases, boolean mandatory, boolean overridable) Creates a field description- Parameters:
name
- the name of the field, empty means it describes the value held by the query profile itselftype
- the type of the field represented as a string - seeFieldType
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: true
-
-
Method Details
-
getName
Returns the full name of this as a string -
getCompoundName
public com.yahoo.processing.request.CompoundName getCompoundName()Returns the full name of this as a compound name -
getType
-
getAliases
Returns a unmodifiable list of the aliases of this. An empty list (never null) if there are none. -
isMandatory
public boolean isMandatory()Returns whether this field must be provided in the query profile or the search definition. Default: false -
isOverridable
public boolean isOverridable()Returns false if overrides to values for this field from the outside should be ignored. Default: true -
compareTo
- Specified by:
compareTo
in interfaceComparable<FieldDescription>
-
withName
Returns a copy of this with the name set to the argument name -
withType
Returns a copy of this with the type set to the argument type -
toString
-