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
,Serializable
,Cloneable
,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, Set<NewDocumentType.Name> documentReferences, Set<String> importedFieldNames)
NewDocumentType(NewDocumentType.Name name, Set<NewDocumentType.Name> documentReferences)
NewDocumentType(NewDocumentType.Name name, Set<NewDocumentType.Name> documentReferences, Set<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(String fieldName)
com.yahoo.document.Document
createFieldValue()
Collection<com.yahoo.document.annotation.AnnotationType>
getAllAnnotations()
Collection<com.yahoo.document.Field>
getAllFields()
DataTypeCollection
getAllTypes()
Collection<com.yahoo.document.annotation.AnnotationType>
getAnnotations()
com.yahoo.document.annotation.AnnotationType
getAnnotationType(int id)
com.yahoo.document.annotation.AnnotationType
getAnnotationType(String name)
com.yahoo.document.DataType
getDataType(int id)
com.yahoo.document.DataType
getDataType(String name)
com.yahoo.document.DataType
getDataTypeRecursive(int id)
com.yahoo.document.DataType
getDataTypeRecursive(String name)
Set<NewDocumentType.Name>
getDocumentReferences()
com.yahoo.document.Field
getField(int id)
com.yahoo.document.Field
getField(String name)
Collection<com.yahoo.document.Field>
getFields()
Set<FieldSet>
getFieldSets()
The field sets defined for this type and itsSchema
NewDocumentType.Name
getFullName()
com.yahoo.document.DataType
getHeader()
Set<String>
getImportedFieldNames()
Collection<NewDocumentType>
getInherited()
NewDocumentType
getInherited(NewDocumentType.Name inherited)
Collection<com.yahoo.document.DataType>
getTypes()
Class<com.yahoo.document.Document>
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, Set<NewDocumentType.Name> documentReferences, Set<String> importedFieldNames)
-
NewDocumentType
public NewDocumentType(NewDocumentType.Name name, Set<NewDocumentType.Name> documentReferences)
-
NewDocumentType
public NewDocumentType(NewDocumentType.Name name, com.yahoo.document.StructDataType header, FieldSets fs, Set<NewDocumentType.Name> documentReferences, Set<String> importedFieldNames)
-
-
Method Detail
-
getFullName
public NewDocumentType.Name getFullName()
-
getHeader
public com.yahoo.document.DataType getHeader()
-
getInherited
public 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 Class<com.yahoo.document.Document> 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(String name)
- Specified by:
getField
in classcom.yahoo.document.StructuredDataType
-
containsField
public boolean containsField(String fieldName)
-
getField
public com.yahoo.document.Field getField(int id)
- Specified by:
getField
in classcom.yahoo.document.StructuredDataType
-
getAllFields
public Collection<com.yahoo.document.Field> getAllFields()
-
getFields
public 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 Collection<com.yahoo.document.DataType> getTypes()
- Specified by:
getTypes
in interfaceDataTypeCollection
-
getAllTypes
public DataTypeCollection getAllTypes()
-
getAnnotations
public Collection<com.yahoo.document.annotation.AnnotationType> getAnnotations()
-
getAllAnnotations
public Collection<com.yahoo.document.annotation.AnnotationType> getAllAnnotations()
-
getDataType
public com.yahoo.document.DataType getDataType(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(String name)
-
getDataTypeRecursive
public com.yahoo.document.DataType getDataTypeRecursive(int id)
-
getAnnotationType
public com.yahoo.document.annotation.AnnotationType getAnnotationType(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 Set<FieldSet> getFieldSets()
The field sets defined for this type and itsSchema
-
getDocumentReferences
public Set<NewDocumentType.Name> getDocumentReferences()
-
-