Package com.yahoo.docproc
Class AbstractConcreteDocumentFactory
- java.lang.Object
-
- com.yahoo.component.AbstractComponent
-
- com.yahoo.docproc.AbstractConcreteDocumentFactory
-
- All Implemented Interfaces:
com.yahoo.component.Component
,java.lang.Comparable<com.yahoo.component.Component>
public abstract class AbstractConcreteDocumentFactory extends com.yahoo.component.AbstractComponent
Subtyped by factory classes for concrete document types. The factory classes are auto-generated by vespa-documentgen-plugin. This superclass is used to manage the factories in OSGI.- Author:
- vegardh
-
-
Constructor Summary
Constructors Constructor Description AbstractConcreteDocumentFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.Map<java.lang.String,java.lang.Class<? extends com.yahoo.document.annotation.Annotation>>
annotationTypes()
abstract java.util.Map<java.lang.String,java.lang.Class<? extends com.yahoo.document.Document>>
documentTypes()
abstract com.yahoo.document.Document
getDocumentCopy(java.lang.String type, com.yahoo.document.datatypes.StructuredFieldValue src, com.yahoo.document.DocumentId id)
Used by the docproc framework to get an instance of a concrete document type without resorting to reflection in a bundlecom.yahoo.document.datatypes.FieldValue
optionallyUpgrade(com.yahoo.document.Field field, com.yahoo.document.datatypes.FieldValue fv)
If the FieldValue is a StructuredFieldValue it will upgrade to the concrete typeabstract java.util.Map<java.lang.String,java.lang.Class<? extends com.yahoo.document.datatypes.Struct>>
structTypes()
-
-
-
Method Detail
-
documentTypes
public abstract java.util.Map<java.lang.String,java.lang.Class<? extends com.yahoo.document.Document>> documentTypes()
-
structTypes
public abstract java.util.Map<java.lang.String,java.lang.Class<? extends com.yahoo.document.datatypes.Struct>> structTypes()
-
annotationTypes
public abstract java.util.Map<java.lang.String,java.lang.Class<? extends com.yahoo.document.annotation.Annotation>> annotationTypes()
-
getDocumentCopy
public abstract com.yahoo.document.Document getDocumentCopy(java.lang.String type, com.yahoo.document.datatypes.StructuredFieldValue src, com.yahoo.document.DocumentId id)
Used by the docproc framework to get an instance of a concrete document type without resorting to reflection in a bundle- Returns:
- a concrete document instance
-
optionallyUpgrade
public com.yahoo.document.datatypes.FieldValue optionallyUpgrade(com.yahoo.document.Field field, com.yahoo.document.datatypes.FieldValue fv)
If the FieldValue is a StructuredFieldValue it will upgrade to the concrete type- Parameters:
field
- to upgradefv
- value to upgrade- Returns:
- fv or upgraded fv
-
-