Package com.yahoo.docproc
Class AbstractConcreteDocumentFactory
java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.docproc.AbstractConcreteDocumentFactory
- All Implemented Interfaces:
com.yahoo.component.Component
,com.yahoo.component.Deconstructable
,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
-
Field Summary
Fields inherited from class com.yahoo.component.AbstractComponent
isDeconstructable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract com.yahoo.document.Document
getDocumentCopy
(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 typeMethods inherited from class com.yahoo.component.AbstractComponent
clone, compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
-
Constructor Details
-
AbstractConcreteDocumentFactory
public AbstractConcreteDocumentFactory()
-
-
Method Details
-
documentTypes
-
structTypes
-
annotationTypes
-
getDocumentCopy
public abstract com.yahoo.document.Document getDocumentCopy(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
-