Package com.yahoo.document
Class BaseStructDataType
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.document.DataType
-
- com.yahoo.document.StructuredDataType
-
- com.yahoo.document.BaseStructDataType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<DataType>
- Direct Known Subclasses:
StructDataType
public abstract class BaseStructDataType extends StructuredDataType
Date: Apr 15, 2008- Author:
- humbe
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected com.yahoo.compress.Compressor
compressor
protected java.util.Map<java.lang.Integer,Field>
fieldIds
protected java.util.Map<java.lang.String,Field>
fields
-
Fields inherited from class com.yahoo.document.StructuredDataType
classId
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addField(Field field)
protected void
assign(BaseStructDataType type)
void
clearFields()
BaseStructDataType
clone()
CompressionConfig
getCompressionConfig()
Returns a view of the configuration of the compressor used to compress this typecom.yahoo.compress.Compressor
getCompressor()
Returns the compressor to use to compress data of this typeField
getField(int id)
Gets the field with the specified id.Field
getField(java.lang.String fieldName)
Gets the field matching a given name.int
getFieldCount()
java.util.Collection<Field>
getFields()
boolean
hasField(Field field)
boolean
hasField(java.lang.String name)
Field
removeField(java.lang.String fieldName)
void
setCompressionConfig(CompressionConfig config)
Set the config to the compressor used to compress data of this type-
Methods inherited from class com.yahoo.document.StructuredDataType
buildFieldPath, createByReflection, createFieldValue, createId, equals, getDataTypeName, hashCode, register
-
Methods inherited from class com.yahoo.document.DataType
compareTo, createFieldValue, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getValueClass, getWeightedSet, getWeightedSet, isAssignableFrom, isMultivalue, isRegistered, isValueCompatible, lastPredefinedDataTypeId, register, setId, setName, toString, visitMembers
-
-
-
-
Method Detail
-
assign
protected void assign(BaseStructDataType type)
-
clone
public BaseStructDataType clone()
-
addField
public void addField(Field field)
-
removeField
public Field removeField(java.lang.String fieldName)
-
clearFields
public void clearFields()
-
getField
public Field getField(java.lang.String fieldName)
Description copied from class:StructuredDataType
Gets the field matching a given name.- Specified by:
getField
in classStructuredDataType
- Parameters:
fieldName
- The name of a field.- Returns:
- Returns the matching field, or null if not found.
-
getField
public Field getField(int id)
Description copied from class:StructuredDataType
Gets the field with the specified id.- Specified by:
getField
in classStructuredDataType
- Parameters:
id
- the id of the field to return.- Returns:
- the matching field, or null if not found.
-
hasField
public boolean hasField(Field field)
-
hasField
public boolean hasField(java.lang.String name)
-
getFields
public java.util.Collection<Field> getFields()
- Specified by:
getFields
in classStructuredDataType
-
getFieldCount
public int getFieldCount()
-
getCompressor
public com.yahoo.compress.Compressor getCompressor()
Returns the compressor to use to compress data of this type
-
getCompressionConfig
public CompressionConfig getCompressionConfig()
Returns a view of the configuration of the compressor used to compress this type
-
setCompressionConfig
public void setCompressionConfig(CompressionConfig config)
Set the config to the compressor used to compress data of this type
-
-