Class EditorialCostForMapping


  • public class EditorialCostForMapping
    extends java.lang.Object
    • Constructor Detail

      • EditorialCostForMapping

        public EditorialCostForMapping()
    • Method Detail

      • baseEditorialCostForMapping

        public static int baseEditorialCostForMapping​(Mapping mapping,
                                                      SchemaGraph sourceGraph,
                                                      SchemaGraph targetGraph,
                                                      java.util.List<EditOperation> editOperationsResult)
        Gets the "editorial cost for mapping" for the base mapping.

        Use this is as base cost when invoking editorialCostForMapping(int, Mapping, SchemaGraph, SchemaGraph) as it heavily speeds up performance.

        Parameters:
        mapping - the mapping
        sourceGraph - the source graph
        targetGraph - the target graph
        editOperationsResult - the list of edit operations
        Returns:
        the editorial cost
      • editorialCostForMapping

        public static int editorialCostForMapping​(int baseCost,
                                                  Mapping mapping,
                                                  SchemaGraph sourceGraph,
                                                  SchemaGraph targetGraph)
        Calculates the "editorial cost for mapping" for the non-fixed targets in a Mapping.

        The baseCost argument should be the cost for the fixed mapping from baseEditorialCostForMapping(Mapping, SchemaGraph, SchemaGraph).

        The sum of the non-fixed costs and the fixed costs is total editorial cost for mapping.

        Parameters:
        baseCost - the starting base cost
        mapping - the mapping
        sourceGraph - the source graph
        targetGraph - the target graph
        Returns:
        the editorial cost