org.apache.uima.fit.factory

## Class SofaMappingFactory

- java.lang.Object
- - org.apache.uima.fit.factory.SofaMappingFactory

-     public final class SofaMappingFactory
      extends Object

  Convenience methods to handle SofA mappings.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.apache.uima.analysis_engine.metadata.SofaMapping` | `createSofaMapping(Class<? extends org.apache.uima.analysis_component.AnalysisComponent> componentClass, String componentSofaName, String aggregateSofaName)` Create a sofa mapping using the component class rather than the component name.
    `static org.apache.uima.analysis_engine.metadata.SofaMapping` | `createSofaMapping(String componentKey, String componentSofaName, String aggregateSofaName)` This method creates a sofa mapping which is useful for mapping view names in individual components used in aggregate analysis engines to the view names used by the aggregate.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createSofaMapping

          public static org.apache.uima.analysis_engine.metadata.SofaMapping createSofaMapping(String componentKey,
                                                                                               String componentSofaName,
                                                                                               String aggregateSofaName)

      This method creates a sofa mapping which is useful for mapping view names in individual components used in aggregate analysis engines to the view names used by the aggregate.

      WARNING: in version 0.9.12 the ordering of the parameters was changed! The order used to be aggregateSofaName, componentKey, componentSofaName. This was changed because it seemed an unnatural ordering.

      Parameters:
        `componentKey` - the key/name used by the aggregate analysis engine for the component whose view is being mapped.
        `componentSofaName` - the sofa name used by the the component
        `aggregateSofaName` - the view name that the component name is mapped to and used by the aggregate analysis engine
      Returns:
        a sofa mapping with the componentSofaName mapped to the aggregateSofaName

    - #### createSofaMapping

          public static org.apache.uima.analysis_engine.metadata.SofaMapping createSofaMapping(Class<? extends org.apache.uima.analysis_component.AnalysisComponent> componentClass,
                                                                                               String componentSofaName,
                                                                                               String aggregateSofaName)

      Create a sofa mapping using the component class rather than the component name. Actually, the name of the class is used as the component name.
      Parameters:
        `componentClass` - the component clas
        `componentSofaName` - the sofa name used by the the component
        `aggregateSofaName` - the view name that the component name is mapped to and used by the aggregate analysis engine
      Returns:
        a sofa mapping with the componentSofaName mapped to the aggregateSofaName

Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.