Class Derived
- java.lang.Object
-
- com.yahoo.searchdefinition.derived.Derived
-
- All Implemented Interfaces:
Exportable
- Direct Known Subclasses:
AttributeFields
,ImportedFields
,IndexInfo
,IndexingScript
,IndexSchema
,Juniperrc
,RankProfileList
,Summaries
,SummaryClass
,SummaryMap
,VsmFields
,VsmSummary
public abstract class Derived extends Object implements Exportable
Superclass of all derived configurations- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description Derived()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
derive(ImmutableSDField field, Schema schema)
Derives the content of this configuration.protected void
derive(SDDocumentType document, Schema schema)
Derives the content of this configuration.protected void
derive(Index index, Schema schema)
Derives the content of this configuration.protected void
derive(Schema schema)
Derives the content of this configuration.void
export(String toDirectory)
Exports this derived configuration to its .cfg file in toDirectoryprotected abstract String
getDerivedName()
String
getFileName()
The (short) name of the exported fileprotected String
getIndex(int number, boolean labels)
Returns the value of getName if true, the given number as a string otherwiseString
getName()
protected void
setName(String name)
-
-
-
Method Detail
-
getName
public String getName()
-
setName
protected final void setName(String name)
-
derive
protected void derive(Schema schema)
Derives the content of this configuration. This default calls derive(Document) for each document and derive(SDField) for each search definition level field AND sets the name of this to the name of the input search definition
-
derive
protected void derive(SDDocumentType document, Schema schema)
Derives the content of this configuration. This default calls derive(SDField) for each document field
-
derive
protected void derive(ImmutableSDField field, Schema schema)
Derives the content of this configuration. This default does nothing.
-
derive
protected void derive(Index index, Schema schema)
Derives the content of this configuration. This default does nothing.
-
getDerivedName
protected abstract String getDerivedName()
-
getIndex
protected String getIndex(int number, boolean labels)
Returns the value of getName if true, the given number as a string otherwise
-
export
public final void export(String toDirectory) throws IOException
Exports this derived configuration to its .cfg file in toDirectory- Specified by:
export
in interfaceExportable
- Parameters:
toDirectory
- the directory to export to, or null- Throws:
IOException
- if exporting fails, some files may still be created
-
getFileName
public String getFileName()
Description copied from interface:Exportable
The (short) name of the exported file- Specified by:
getFileName
in interfaceExportable
- Returns:
- a String with the (short) name of the exported file
-
-