use of com.yahoo.document.DocumentType in project vespa by vespa-engine.
the class JsonWriterTestCase method registerReferenceDocumentType.
private void registerReferenceDocumentType() {
DocumentType docTypeWithRef = new DocumentType("testrefs");
ReferenceDataType type = ReferenceDataType.createWithInferredId(types.getDocumentType("smoke"));
docTypeWithRef.addField(new Field("ref_field", type));
types.registerDocumentType(docTypeWithRef);
}
use of com.yahoo.document.DocumentType in project vespa by vespa-engine.
the class JsonWriterTestCase method registerMirrorsDocumentType.
private void registerMirrorsDocumentType() {
DocumentType x = new DocumentType("mirrors");
StructDataType woo = new StructDataType("woo");
woo.addField(new Field("sandra", DataType.STRING));
woo.addField(new Field("cloud", DataType.STRING));
x.addField(new Field("skuggsjaa", woo));
types.registerDocumentType(x);
}
use of com.yahoo.document.DocumentType in project vespa by vespa-engine.
the class JsonWriterTestCase method registerMapToStringToArrayDocumentType.
private void registerMapToStringToArrayDocumentType() {
DocumentType x = new DocumentType("testMapStringToArrayOfInt");
DataType value = new ArrayDataType(DataType.INT);
DataType d = new MapDataType(DataType.STRING, value);
x.addField(new Field("actualMapStringToArrayOfInt", d));
types.registerDocumentType(x);
}
use of com.yahoo.document.DocumentType in project vespa by vespa-engine.
the class JsonWriterTestCase method registerMultiPositionDocumentType.
private void registerMultiPositionDocumentType() {
DocumentType x = new DocumentType("testmultipos");
DataType d = new ArrayDataType(PositionDataType.INSTANCE);
x.addField(new Field("multipos", d));
types.registerDocumentType(x);
}
use of com.yahoo.document.DocumentType in project vespa by vespa-engine.
the class JsonWriterTestCase method registerSinglePositionDocumentType.
private void registerSinglePositionDocumentType() {
DocumentType x = new DocumentType("testsinglepos");
DataType d = PositionDataType.INSTANCE;
x.addField(new Field("singlepos", d));
types.registerDocumentType(x);
}
Aggregations