Package com.yahoo.documentmodel
Class NewDocumentType
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.document.DataType
-
- com.yahoo.document.StructuredDataType
-
- com.yahoo.documentmodel.NewDocumentType
-
- All Implemented Interfaces:
DataTypeCollection
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<com.yahoo.document.DataType>
public final class NewDocumentType extends com.yahoo.document.StructuredDataType implements DataTypeCollection
- Author:
- baldersheim
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NewDocumentType.Name
-
Constructor Summary
Constructors Constructor Description NewDocumentType(NewDocumentType.Name name)
NewDocumentType(NewDocumentType.Name name, com.yahoo.document.StructDataType header, FieldSets fs, java.util.Set<NewDocumentType.Name> documentReferences, java.util.Set<java.lang.String> importedFieldNames)
NewDocumentType(NewDocumentType.Name name, java.util.Set<NewDocumentType.Name> documentReferences)
NewDocumentType(NewDocumentType.Name name, java.util.Set<NewDocumentType.Name> documentReferences, java.util.Set<java.lang.String> importedFieldNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NewDocumentType
add(com.yahoo.document.annotation.AnnotationType type)
NewDocumentType
add(com.yahoo.document.DataType type)
com.yahoo.document.StructDataType
allHeader()
Data type of the header fields of this and all inherited document typesboolean
containsField(java.lang.String fieldName)
com.yahoo.document.Document
createFieldValue()
java.util.Collection<com.yahoo.document.annotation.AnnotationType>
getAllAnnotations()
java.util.Collection<com.yahoo.document.Field>
getAllFields()
DataTypeCollection
getAllTypes()
java.util.Collection<com.yahoo.document.annotation.AnnotationType>
getAnnotations()
com.yahoo.document.annotation.AnnotationType
getAnnotationType(int id)
com.yahoo.document.annotation.AnnotationType
getAnnotationType(java.lang.String name)
com.yahoo.document.DataType
getDataType(int id)
com.yahoo.document.DataType
getDataType(java.lang.String name)
com.yahoo.document.DataType
getDataTypeRecursive(int id)
com.yahoo.document.DataType
getDataTypeRecursive(java.lang.String name)
java.util.Set<NewDocumentType.Name>
getDocumentReferences()
com.yahoo.document.Field
getField(int id)
com.yahoo.document.Field
getField(java.lang.String name)
java.util.Collection<com.yahoo.document.Field>
getFields()
java.util.Set<FieldSet>
getFieldSets()
The field sets defined for this type and itsSearch
NewDocumentType.Name
getFullName()
com.yahoo.document.DataType
getHeader()
java.util.Set<java.lang.String>
getImportedFieldNames()
java.util.Collection<NewDocumentType>
getInherited()
NewDocumentType
getInherited(NewDocumentType.Name inherited)
java.util.Collection<com.yahoo.document.DataType>
getTypes()
java.lang.Class
getValueClass()
void
inherit(NewDocumentType inherited)
boolean
inherits(NewDocumentType superType)
boolean
isValueCompatible(com.yahoo.document.datatypes.FieldValue value)
NewDocumentType
removeInherited(NewDocumentType.Name inherited)
NewDocumentType
replace(com.yahoo.document.DataType type)
-
Methods inherited from class com.yahoo.document.StructuredDataType
buildFieldPath, createByReflection, createId, equals, getDataTypeName, hashCode, register
-
Methods inherited from class com.yahoo.document.DataType
clone, compareTo, createFieldValue, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getWeightedSet, getWeightedSet, isAssignableFrom, isMultivalue, isRegistered, lastPredefinedDataTypeId, register, setId, setName, toString, visitMembers
-
-
-
-
Constructor Detail
-
NewDocumentType
public NewDocumentType(NewDocumentType.Name name)
-
NewDocumentType
public NewDocumentType(NewDocumentType.Name name, java.util.Set<NewDocumentType.Name> documentReferences, java.util.Set<java.lang.String> importedFieldNames)
-
NewDocumentType
public NewDocumentType(NewDocumentType.Name name, java.util.Set<NewDocumentType.Name> documentReferences)
-
NewDocumentType
public NewDocumentType(NewDocumentType.Name name, com.yahoo.document.StructDataType header, FieldSets fs, java.util.Set<NewDocumentType.Name> documentReferences, java.util.Set<java.lang.String> importedFieldNames)
-
-
Method Detail
-
getFullName
public NewDocumentType.Name getFullName()
-
getHeader
public com.yahoo.document.DataType getHeader()
-
getInherited
public java.util.Collection<NewDocumentType> getInherited()
-
getInherited
public NewDocumentType getInherited(NewDocumentType.Name inherited)
-
removeInherited
public NewDocumentType removeInherited(NewDocumentType.Name inherited)
-
allHeader
public com.yahoo.document.StructDataType allHeader()
Data type of the header fields of this and all inherited document types- Returns:
- merged
StructDataType
-
getValueClass
public java.lang.Class getValueClass()
- Specified by:
getValueClass
in classcom.yahoo.document.DataType
-
isValueCompatible
public boolean isValueCompatible(com.yahoo.document.datatypes.FieldValue value)
- Specified by:
isValueCompatible
in classcom.yahoo.document.DataType
-
inherit
public void inherit(NewDocumentType inherited)
-
inherits
public boolean inherits(NewDocumentType superType)
-
getField
public com.yahoo.document.Field getField(java.lang.String name)
- Specified by:
getField
in classcom.yahoo.document.StructuredDataType
-
containsField
public boolean containsField(java.lang.String fieldName)
-
getField
public com.yahoo.document.Field getField(int id)
- Specified by:
getField
in classcom.yahoo.document.StructuredDataType
-
getAllFields
public java.util.Collection<com.yahoo.document.Field> getAllFields()
-
getFields
public java.util.Collection<com.yahoo.document.Field> getFields()
- Specified by:
getFields
in classcom.yahoo.document.StructuredDataType
-
createFieldValue
public com.yahoo.document.Document createFieldValue()
- Specified by:
createFieldValue
in classcom.yahoo.document.StructuredDataType
-
getTypes
public java.util.Collection<com.yahoo.document.DataType> getTypes()
- Specified by:
getTypes
in interfaceDataTypeCollection
-
getAllTypes
public DataTypeCollection getAllTypes()
-
getAnnotations
public java.util.Collection<com.yahoo.document.annotation.AnnotationType> getAnnotations()
-
getAllAnnotations
public java.util.Collection<com.yahoo.document.annotation.AnnotationType> getAllAnnotations()
-
getDataType
public com.yahoo.document.DataType getDataType(java.lang.String name)
- Specified by:
getDataType
in interfaceDataTypeCollection
-
getDataType
public com.yahoo.document.DataType getDataType(int id)
- Specified by:
getDataType
in interfaceDataTypeCollection
-
getDataTypeRecursive
public com.yahoo.document.DataType getDataTypeRecursive(java.lang.String name)
-
getDataTypeRecursive
public com.yahoo.document.DataType getDataTypeRecursive(int id)
-
getAnnotationType
public com.yahoo.document.annotation.AnnotationType getAnnotationType(java.lang.String name)
-
getAnnotationType
public com.yahoo.document.annotation.AnnotationType getAnnotationType(int id)
-
add
public NewDocumentType add(com.yahoo.document.annotation.AnnotationType type)
-
add
public NewDocumentType add(com.yahoo.document.DataType type)
-
replace
public NewDocumentType replace(com.yahoo.document.DataType type)
-
getFieldSets
public java.util.Set<FieldSet> getFieldSets()
The field sets defined for this type and itsSearch
-
getDocumentReferences
public java.util.Set<NewDocumentType.Name> getDocumentReferences()
-
getImportedFieldNames
public java.util.Set<java.lang.String> getImportedFieldNames()
-
-