001/* An actor for the Match DDP pattern.
002 * 
003 * Copyright (c) 2011-2012 The Regents of the University of California.
004 * All rights reserved.
005 *
006 * '$Author: crawl $'
007 * '$Date: 2012-04-13 17:45:44 +0000 (Fri, 13 Apr 2012) $' 
008 * '$Revision: 29710 $'
009 * 
010 * Permission is hereby granted, without written agreement and without
011 * license or royalty fees, to use, copy, modify, and distribute this
012 * software and its documentation for any purpose, provided that the above
013 * copyright notice and the following two paragraphs appear in all copies
014 * of this software.
015 *
016 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
017 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
018 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
019 * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
020 * SUCH DAMAGE.
021 *
022 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
023 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
025 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
026 * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
027 * ENHANCEMENTS, OR MODIFICATIONS.
028 *
029 */
030package org.kepler.ddp.actor.pattern;
031
032import ptolemy.kernel.CompositeEntity;
033import ptolemy.kernel.util.IllegalActionException;
034import ptolemy.kernel.util.NameDuplicationException;
035import ptolemy.kernel.util.Workspace;
036
037/** An actor for the Match DDP pattern. This actor reads two
038 *  input data sets of key-value pairs. The sub-workflow in 
039 *  this actor needs to be completed by reading data 
040 *  from the output ports of the MatchInput actor and sending key-
041 *  value pairs (an array of <key, value> records) to the 
042 *  MatchOutput actor. For each key that is
043 *  present in both input data sets, the sub-workflow is executed
044 *  once with the key and both associated values. If the same key appears more 
045 *  than once in either input data set, the sub-workflow is executed
046 *  for each occurrence.
047 * 
048 *  @author Daniel Crawl
049 *  @version $Id: Match.java 29710 2012-04-13 17:45:44Z crawl $
050 */
051public class Match extends DualInputPatternActor {
052
053    /** Construct a new Match in a workspace. */
054    public Match(Workspace workspace) {
055        super(workspace);
056    }
057
058    /** Construct a new Match in a container with a given name. */
059    public Match(CompositeEntity container, String name)
060            throws IllegalActionException, NameDuplicationException {
061        super(container, name);
062    }
063
064}