Package com.yahoo.document.annotation
Class AnnotationReferenceDataType
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.document.DataType
com.yahoo.document.annotation.AnnotationReferenceDataType
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<DataType>
A data type describing a field value having a reference to an annotation of a given type.
- Author:
- Einar M R Rosenvinge
- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates an AnnotationReferenceDataType.Creates an AnnotationReferenceDataType with a generated id.AnnotationReferenceDataType
(AnnotationType aType, int id) Creates an AnnotationReferenceDataType with a given id. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new, empty FieldValue of this typeReturns the annotation type of this AnnotationReferenceDataType.boolean
isValueCompatible
(FieldValue value) protected void
Sets the annotation type that this AnnotationReferenceDataType points to.Methods inherited from class com.yahoo.document.DataType
buildFieldPath, clone, compareTo, createByReflection, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isMultivalue, isRegistered, lastPredefinedDataTypeId, register, register, setId, setName, toString, visitMembers
Methods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, onDeserialize, onGetClassId, onSerialize, putUtf8, registerClass, serialize, serializeOptional, serializeWithId
Methods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Constructor Details
-
AnnotationReferenceDataType
Creates an AnnotationReferenceDataType with a generated id.- Parameters:
aType
- the annotation type that AnnotationRefs shall refer to
-
AnnotationReferenceDataType
Creates an AnnotationReferenceDataType with a given id.- Parameters:
aType
- the annotation type that AnnotationRefs shall refer toid
- the id to use
-
AnnotationReferenceDataType
protected AnnotationReferenceDataType()Creates an AnnotationReferenceDataType. WARNING! Do not use!
-
-
Method Details
-
createFieldValue
Description copied from class:DataType
Creates a new, empty FieldValue of this type- Specified by:
createFieldValue
in classDataType
-
getValueClass
- Specified by:
getValueClass
in classDataType
-
isValueCompatible
- Specified by:
isValueCompatible
in classDataType
-
getAnnotationType
Returns the annotation type of this AnnotationReferenceDataType.- Returns:
- the annotation type of this AnnotationReferenceDataType.
-
setAnnotationType
Sets the annotation type that this AnnotationReferenceDataType points to. WARNING! Do not use.- Parameters:
type
- the annotation type of this AnnotationReferenceDataType.
-