Coverage Report - org.deri.wsmo4j.orchestration.rule.RulesRI
 
Classes in this File Line Coverage Branch Coverage Complexity
RulesRI
0%
0/12
N/A
0
 
 1  
 /*
 2  
  wsmo4j extension - a Choreography API and Reference Implementation
 3  
 
 4  
  Copyright (c) 2005, University of Innsbruck, Austria
 5  
 
 6  
  This library is free software; you can redistribute it and/or modify it under
 7  
  the terms of the GNU Lesser General Public License as published by the Free
 8  
  Software Foundation; either version 2.1 of the License, or (at your option)
 9  
  any later version.
 10  
  This library is distributed in the hope that it will be useful, but WITHOUT
 11  
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 12  
  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 13  
  details.
 14  
  You should have received a copy of the GNU Lesser General Public License along
 15  
  with this library; if not, write to the Free Software Foundation, Inc.,
 16  
  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 17  
  */
 18  
 
 19  
 package org.deri.wsmo4j.orchestration.rule;
 20  
 
 21  
 import java.util.*;
 22  
 
 23  
 import org.wsmo.common.*;
 24  
 import org.wsmo.service.orchestration.rule.*;
 25  
 import org.wsmo.service.rule.*;
 26  
 
 27  
 import com.ontotext.wsmo4j.common.*;
 28  
 
 29  
 /**
 30  
  * Interface or class description
 31  
  * 
 32  
  * @author James Scicluna
 33  
  * @author Thomas Haselwanter
 34  
  * 
 35  
  * Created on 06-Dec-2005 Committed by $Author: vassil_momtchev $
 36  
  * 
 37  
  * $Source:
 38  
  * /cvsroot/wsmo4j/ext/orchestration/src/ri/org/deri/wsmo4j/orchestration/rule/RulesRI.java,v $,
 39  
  * @version $Revision: 1851 $ $Date: 2006-10-24 18:01:07 +0300 (Tue, 24 Oct 2006) $
 40  
  */
 41  
 
 42  
 public class RulesRI extends EntityImpl implements OrchestrationRules, Iterable {
 43  
     /**
 44  
      * @uml.property   name="rules"
 45  
      * @uml.associationEnd   multiplicity="(0 -1)" elementType="org.wsmo.service.rule.OrchestrationRule"
 46  
      */
 47  0
     Set<Rule> rules = new HashSet<Rule>();
 48  
 
 49  
     /**
 50  
      * Initializes the Rules container of orchestration Descriptions with the
 51  
      * given Identifier
 52  
      * 
 53  
      * @param id
 54  
      *            Identifier of the transition rules
 55  
      */
 56  
     public RulesRI(Identifier id) {
 57  0
         super(id);
 58  0
     }
 59  
 
 60  
     /**
 61  
      * Initializes the Rules container of orchestration Descriptions with the
 62  
      * given Identifier and rules
 63  
      * 
 64  
      * @param id
 65  
      *            Identifier of the Rules Container
 66  
      * @param rules
 67  
      *            A set of rules to be put in the container
 68  
      */
 69  
     public RulesRI(Identifier id, Set<Rule> rules) {
 70  0
         this(id);
 71  0
         this.rules = rules;
 72  0
     }
 73  
 
 74  
     /*
 75  
      * (non-Javadoc)
 76  
      * 
 77  
      * @see org.wsmo.service.orchestration.rule.Rules#listRules()
 78  
      */
 79  
     public Set<Rule> listRules() {
 80  0
         return Collections.unmodifiableSet(this.rules);
 81  
     }
 82  
 
 83  
     /*
 84  
      * (non-Javadoc)
 85  
      * 
 86  
      * @see org.wsmo.service.orchestration.rule.Rules#removeRule(org.wsmo.service.orchestration.rule.Rule)
 87  
      */
 88  
     public void removeRule(Rule rule) {
 89  0
         this.rules.remove(rule);
 90  0
     }
 91  
 
 92  
     /*
 93  
      * (non-Javadoc)
 94  
      * 
 95  
      * @see org.wsmo.service.orchestration.rule.Rules#addRule(org.wsmo.service.orchestration.rule.Rule)
 96  
      */
 97  
     public void addRule(Rule rule) {
 98  0
         this.rules.add(rule);
 99  0
     }
 100  
 
 101  
     public Iterator<Rule> iterator() {
 102  0
         return this.rules.iterator();
 103  
     }
 104  
 }