Sha256: f4d641fc391c8a45c8df8682a4e2c39b9c4b295c1b825c79a8dee62b65361d7c

Contents?: true

Size: 967 Bytes

Versions: 4

Compression:

Stored size: 967 Bytes

Contents

module Pione
  module RuleHandler
    # RootHandler is a special handler for RootRule.
    class RootHandler < FlowHandler
      def self.message_name
        "Root"
      end

      # @api private
      def execute
        # import initial input tuples from input domain
        @inputs.flatten.each do |input|
          copy_data_into_domain(input, @domain)
        end
        # execute the rule
        result = super
        # export outputs to output domain
        @outputs.flatten.each do |output|
          copy_data_into_domain(output, '/output')
        end
        # substantiate symbolic links
        # substantiate_date

        return result
      end

      # Substantiate symbolic links to files.
      def substantiate_date
        @outputs.flatten.compact.each do |output|
          if output.location.cached? and output.link?
            FileCache.get(output.location).turn(output.location)
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pione-0.2.2 lib/pione/rule-handler/root-handler.rb
pione-0.2.1 lib/pione/rule-handler/root-handler.rb
pione-0.2.0 lib/pione/rule-handler/root-handler.rb
pione-0.1.4 lib/pione/rule-handler/root-handler.rb