diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-15 23:09:44 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-15 23:09:44 +0200 |
commit | 72231250ed81e10d66bfe70701e64fa5fe50f712 (patch) | |
tree | 2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java |
Publish
Diffstat (limited to 'config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java b/config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java new file mode 100644 index 00000000000..bf8ec8d3da7 --- /dev/null +++ b/config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java @@ -0,0 +1,39 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.documentmodel; + +import com.yahoo.document.DataType; +import com.yahoo.document.DataTypeName; +import com.yahoo.document.PositionDataType; + +/** + * This class represents the builtin 'doument' document type that all other documenttypes inherits. + * Remember that changes here must be compatible. Changes to types of fields can not be done here. + * This must also match the mirroring class in c++. + * + * @author <a href="mailto:balder@yahoo-inc.com">Henning Baldersheim</a> + */ +public class VespaDocumentType { + + public static NewDocumentType INSTANCE = newInstance(); + + public static DataTypeName NAME = new DataTypeName("document"); + + private static NewDocumentType newInstance() { + NewDocumentType vespa = new NewDocumentType(new NewDocumentType.Name(8, "document")); + vespa.add(DataType.BYTE); + vespa.add(DataType.INT); + vespa.add(DataType.LONG); + vespa.add(DataType.STRING); + vespa.add(DataType.RAW); + vespa.add(DataType.TAG); + vespa.add(DataType.FLOAT); + vespa.add(DataType.DOUBLE); + vespa.add(DataType.DOCUMENT); + vespa.add(PositionDataType.INSTANCE); + vespa.add(DataType.URI); + vespa.add(DataType.PREDICATE); + vespa.add(DataType.TENSOR); + return vespa; + } + +} |