Class 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
    • Field Summary

      • Fields inherited from class com.yahoo.component.AbstractComponent

        isDeconstructable
    • 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 bundle
      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
      abstract java.util.Map<java.lang.String,​java.lang.Class<? extends com.yahoo.document.datatypes.Struct>> structTypes()  
      • Methods inherited from class com.yahoo.component.AbstractComponent

        clone, compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractConcreteDocumentFactory

        public AbstractConcreteDocumentFactory()
    • 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 upgrade
        fv - value to upgrade
        Returns:
        fv or upgraded fv