Coverage Report - org.deri.wsmo4j.choreography.rule.PipedRulesRI
 
Classes in this File Line Coverage Branch Coverage Complexity
PipedRulesRI
0%
0/17
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.choreography.rule;
 20  
 
 21  
 import java.util.*;
 22  
 
 23  
 import org.deri.wsmo4j.io.serializer.wsml.*;
 24  
 import org.wsmo.common.*;
 25  
 import org.wsmo.service.choreography.rule.*;
 26  
 import org.wsmo.service.rule.*;
 27  
 
 28  
 /**
 29  
  * Interface or class description
 30  
  *
 31  
  * @author James Scicluna
 32  
  * @author Thomas Haselwanter
 33  
  *
 34  
  * Created on 02-Feb-2006
 35  
  * Committed by $Author: vassil_momtchev $
 36  
  *
 37  
  * $Source$,
 38  
  * @version $Revision: 1844 $ $Date: 2006-10-24 17:11:48 +0300 (Tue, 24 Oct 2006) $
 39  
  */
 40  
 
 41  
 public class PipedRulesRI implements ChoreographyPipedRules {
 42  
 
 43  
     /**
 44  
      * @uml.property   name="rules"
 45  
      * @uml.associationEnd   multiplicity="(0 -1)" elementType="org.wsmo.service.rule.ChoreographyRule"
 46  
      */
 47  
     private Set <ChoreographyRule> rules;
 48  
     
 49  
     /**
 50  
      * 
 51  
      */
 52  
     public PipedRulesRI() {
 53  0
         super();
 54  0
         this.rules = new HashSet<ChoreographyRule>();
 55  
         // TODO Auto-generated constructor stub
 56  0
     }
 57  
     
 58  
     public PipedRulesRI(Set <ChoreographyRule> rules){
 59  0
         super();
 60  0
         this.rules = rules;
 61  0
     }
 62  
 
 63  
     /* (non-Javadoc)
 64  
      * @see org.wsmo.service.choreography.rule.PipedRules#addPipedRule(org.wsmo.service.choreography.rule.Rule)
 65  
      */
 66  
     public void addPipedRule(ChoreographyRule rule) {
 67  0
         this.rules.add(rule);
 68  0
     }
 69  
 
 70  
     /* (non-Javadoc)
 71  
      * @see org.wsmo.service.choreography.rule.PipedRules#removePipedRule(org.wsmo.service.choreography.rule.Rule)
 72  
      */
 73  
     public void removePipedRule(ChoreographyRule rule) {
 74  0
         this.rules.remove(rule);
 75  0
     }
 76  
 
 77  
     /* (non-Javadoc)
 78  
      * @see org.wsmo.service.choreography.rule.PipedRules#listPipedRules()
 79  
      */
 80  
     public Set<ChoreographyRule> listPipedRules() {
 81  0
         return this.rules;
 82  
     }
 83  
 
 84  
     /* (non-Javadoc)
 85  
      * @see org.wsmo.service.choreography.rule.Rule#accept(org.wsmo.service.choreography.rule.Visitor)
 86  
      */
 87  
     public void accept(Visitor visitor) {
 88  0
         visitor.visitChoreographyPipedRules(this);
 89  0
     }
 90  
     
 91  
     /* (non-Javadoc)
 92  
      * @see org.wsmo.service.choreography.rule.Rule#toString(org.wsmo.common.TopEntity)
 93  
      */
 94  
     public String toString(TopEntity te) {
 95  0
         VisitorSerializeWSMLTransitionRules visitor = new VisitorSerializeWSMLTransitionRules(te);
 96  0
         visitor.visitChoreographyPipedRules(this);
 97  0
         return visitor.getSerializedObject();
 98  
     }
 99  
     
 100  
     @Override
 101  
     public String toString() {
 102  0
         return toString(null);
 103  
     }
 104  
 }