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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Map<String,Class<? extends com.yahoo.document.annotation.Annotation>>
     
    abstract Map<String,Class<? extends com.yahoo.document.Document>>
     
    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
    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 Map<String,Class<? extends com.yahoo.document.datatypes.Struct>>
     

    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 Details

    • AbstractConcreteDocumentFactory

      public AbstractConcreteDocumentFactory()
  • Method Details

    • documentTypes

      public abstract Map<String,Class<? extends com.yahoo.document.Document>> documentTypes()
    • structTypes

      public abstract Map<String,Class<? extends com.yahoo.document.datatypes.Struct>> structTypes()
    • annotationTypes

      public abstract Map<String,Class<? extends com.yahoo.document.annotation.Annotation>> 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 upgrade
      fv - value to upgrade
      Returns:
      fv or upgraded fv