Coverage Report - org.argouml.model.mdr.KindsMDRImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
KindsMDRImpl
38%
13/34
N/A
1.094
 
 1  
 /* $Id: KindsMDRImpl.java 17765 2010-01-11 21:20:14Z linus $
 2  
  *****************************************************************************
 3  
  * Copyright (c) 2009 Contributors - see below
 4  
  * All rights reserved. This program and the accompanying materials
 5  
  * are made available under the terms of the Eclipse Public License v1.0
 6  
  * which accompanies this distribution, and is available at
 7  
  * http://www.eclipse.org/legal/epl-v10.html
 8  
  *
 9  
  * Contributors:
 10  
  *    tfmorris
 11  
  *****************************************************************************
 12  
  *
 13  
  * Some portions of this file was previously release using the BSD License:
 14  
  */
 15  
 
 16  
 // Copyright (c) 2005-2007 The Regents of the University of California. All
 17  
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 18  
 // software and its documentation without fee, and without a written
 19  
 // agreement is hereby granted, provided that the above copyright notice
 20  
 // and this paragraph appear in all copies. This software program and
 21  
 // documentation are copyrighted by The Regents of the University of
 22  
 // California. The software program and documentation are supplied "AS
 23  
 // IS", without any accompanying services from The Regents. The Regents
 24  
 // does not warrant that the operation of the program will be
 25  
 // uninterrupted or error-free. The end-user understands that the program
 26  
 // was developed for research purposes and is advised not to rely
 27  
 // exclusively on the program for any reason. IN NO EVENT SHALL THE
 28  
 // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
 29  
 // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
 30  
 // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
 31  
 // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
 32  
 // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
 33  
 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 34  
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
 35  
 // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
 36  
 // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
 37  
 // UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 38  
 
 39  
 package org.argouml.model.mdr;
 40  
 
 41  
 import org.argouml.model.AggregationKind;
 42  
 import org.argouml.model.ChangeableKind;
 43  
 import org.argouml.model.ConcurrencyKind;
 44  
 import org.argouml.model.DirectionKind;
 45  
 import org.argouml.model.NotImplementedException;
 46  
 import org.argouml.model.OrderingKind;
 47  
 import org.argouml.model.PseudostateKind;
 48  
 import org.argouml.model.ScopeKind;
 49  
 import org.argouml.model.VisibilityKind;
 50  
 import org.omg.uml.foundation.datatypes.AggregationKindEnum;
 51  
 import org.omg.uml.foundation.datatypes.CallConcurrencyKindEnum;
 52  
 import org.omg.uml.foundation.datatypes.ChangeableKindEnum;
 53  
 import org.omg.uml.foundation.datatypes.OrderingKindEnum;
 54  
 import org.omg.uml.foundation.datatypes.ParameterDirectionKindEnum;
 55  
 import org.omg.uml.foundation.datatypes.PseudostateKindEnum;
 56  
 import org.omg.uml.foundation.datatypes.ScopeKindEnum;
 57  
 import org.omg.uml.foundation.datatypes.VisibilityKindEnum;
 58  
 
 59  
 /**
 60  
  * Class that contains enums in the Model.
 61  
  */
 62  
 @SuppressWarnings("deprecation")
 63  
 class KindsMDRImpl implements ChangeableKind, AggregationKind,
 64  
         PseudostateKind, ScopeKind, ConcurrencyKind, DirectionKind,
 65  
         OrderingKind, VisibilityKind {
 66  
 
 67  
     private MDRModelImplementation modelImpl;
 68  
 
 69  
     /**
 70  
      * Constructor.
 71  
      *
 72  
      * @param mi The MDRModelImplementation.
 73  
      */
 74  900
     KindsMDRImpl(MDRModelImplementation mi) {
 75  900
         modelImpl = mi;
 76  900
     }
 77  
 
 78  
     /*
 79  
      * @see org.argouml.model.ChangeableKind#getAddOnly()
 80  
      */
 81  
     public Object getAddOnly() {
 82  0
         return ChangeableKindEnum.CK_ADD_ONLY;
 83  
     }
 84  
 
 85  
     /*
 86  
      * @see org.argouml.model.AggregationKind#getAggregate()
 87  
      */
 88  
     public Object getAggregate() {
 89  2240
         return AggregationKindEnum.AK_AGGREGATE;
 90  
     }
 91  
 
 92  
     /*
 93  
      * @see org.argouml.model.PseudostateKind#getChoice()
 94  
      */
 95  
     public Object getChoice() {
 96  39
         return PseudostateKindEnum.PK_CHOICE;
 97  
     }
 98  
 
 99  
     /*
 100  
      * @see org.argouml.model.ChangeableKind#getChangeable()
 101  
      */
 102  
     public Object getChangeable() {
 103  0
         return ChangeableKindEnum.CK_CHANGEABLE;
 104  
     }
 105  
 
 106  
     /*
 107  
      * @see org.argouml.model.ScopeKind#getClassifier()
 108  
      */
 109  
     public Object getClassifier() {
 110  0
         return ScopeKindEnum.SK_CLASSIFIER;
 111  
     }
 112  
 
 113  
     /*
 114  
      * @see org.argouml.model.AggregationKind#getComposite()
 115  
      */
 116  
     public Object getComposite() {
 117  2240
         return AggregationKindEnum.AK_COMPOSITE;
 118  
     }
 119  
 
 120  
     /*
 121  
      * @see org.argouml.model.ConcurrencyKind#getConcurrent()
 122  
      */
 123  
     public Object getConcurrent() {
 124  0
         return CallConcurrencyKindEnum.CCK_CONCURRENT;
 125  
     }
 126  
 
 127  
     /*
 128  
      * @see org.argouml.model.PseudostateKind#getDeepHistory()
 129  
      */
 130  
     public Object getDeepHistory() {
 131  39
         return PseudostateKindEnum.PK_DEEP_HISTORY;
 132  
     }
 133  
 
 134  
     /*
 135  
      * @see org.argouml.model.PseudostateKind#getFork()
 136  
      */
 137  
     public Object getFork() {
 138  58
         return PseudostateKindEnum.PK_FORK;
 139  
     }
 140  
 
 141  
     /*
 142  
      * @see org.argouml.model.ChangeableKind#getFrozen()
 143  
      */
 144  
     public Object getFrozen() {
 145  0
         return ChangeableKindEnum.CK_FROZEN;
 146  
     }
 147  
 
 148  
     /*
 149  
      * @see org.argouml.model.ConcurrencyKind#getGuarded()
 150  
      */
 151  
     public Object getGuarded() {
 152  0
         return CallConcurrencyKindEnum.CCK_GUARDED;
 153  
     }
 154  
 
 155  
     /*
 156  
      * @see org.argouml.model.DirectionKind#getInParameter()
 157  
      */
 158  
     public Object getInParameter() {
 159  0
         return ParameterDirectionKindEnum.PDK_IN;
 160  
     }
 161  
 
 162  
     /*
 163  
      * @see org.argouml.model.PseudostateKind#getInitial()
 164  
      */
 165  
     public Object getInitial() {
 166  58
         return PseudostateKindEnum.PK_INITIAL;
 167  
     }
 168  
 
 169  
     /*
 170  
      * @see org.argouml.model.DirectionKind#getInOutParameter()
 171  
      */
 172  
     public Object getInOutParameter() {
 173  0
         return ParameterDirectionKindEnum.PDK_INOUT;
 174  
     }
 175  
 
 176  
     /*
 177  
      * @see org.argouml.model.ScopeKind#getInstance()
 178  
      */
 179  
     public Object getInstance() {
 180  0
         return ScopeKindEnum.SK_INSTANCE;
 181  
     }
 182  
 
 183  
     /*
 184  
      * @see org.argouml.model.PseudostateKind#getJoin()
 185  
      */
 186  
     public Object getJoin() {
 187  58
         return PseudostateKindEnum.PK_JOIN;
 188  
     }
 189  
 
 190  
     /*
 191  
      * @see org.argouml.model.PseudostateKind#getJunction()
 192  
      */
 193  
     public Object getJunction() {
 194  58
         return PseudostateKindEnum.PK_JUNCTION;
 195  
     }
 196  
 
 197  
     /*
 198  
      * @see org.argouml.model.AggregationKind#getNone()
 199  
      */
 200  
     public Object getNone() {
 201  2240
         return AggregationKindEnum.AK_NONE;
 202  
     }
 203  
 
 204  
     /*
 205  
      * @see org.argouml.model.OrderingKind#getOrdered()
 206  
      */
 207  
     public Object getOrdered() {
 208  0
         return OrderingKindEnum.OK_ORDERED;
 209  
     }
 210  
 
 211  
     /*
 212  
      * @see org.argouml.model.DirectionKind#getOutParameter()
 213  
      */
 214  
     public Object getOutParameter() {
 215  0
         return ParameterDirectionKindEnum.PDK_OUT;
 216  
     }
 217  
 
 218  
     /*
 219  
      * @see org.argouml.model.VisibilityKind#getPackage()
 220  
      */
 221  
     public Object getPackage() {
 222  0
         return VisibilityKindEnum.VK_PACKAGE;
 223  
     }
 224  
 
 225  
     /*
 226  
      * @see org.argouml.model.VisibilityKind#getPrivate()
 227  
      */
 228  
     public Object getPrivate() {
 229  0
         return VisibilityKindEnum.VK_PRIVATE;
 230  
     }
 231  
 
 232  
     /*
 233  
      * @see org.argouml.model.VisibilityKind#getProtected()
 234  
      */
 235  
     public Object getProtected() {
 236  0
         return VisibilityKindEnum.VK_PROTECTED;
 237  
     }
 238  
 
 239  
     /*
 240  
      * @see org.argouml.model.VisibilityKind#getPublic()
 241  
      */
 242  
     public Object getPublic() {
 243  0
         return VisibilityKindEnum.VK_PUBLIC;
 244  
     }
 245  
 
 246  
     /*
 247  
      * @see org.argouml.model.DirectionKind#getReturnParameter()
 248  
      */
 249  
     public Object getReturnParameter() {
 250  0
         return ParameterDirectionKindEnum.PDK_RETURN;
 251  
     }
 252  
 
 253  
     /*
 254  
      * @see org.argouml.model.ConcurrencyKind#getSequential()
 255  
      */
 256  
     public Object getSequential() {
 257  0
         return CallConcurrencyKindEnum.CCK_SEQUENTIAL;
 258  
     }
 259  
 
 260  
     /*
 261  
      * @see org.argouml.model.PseudostateKind#getShallowHistory()
 262  
      */
 263  
     public Object getShallowHistory() {
 264  39
         return PseudostateKindEnum.PK_SHALLOW_HISTORY;
 265  
     }
 266  
 
 267  
     /*
 268  
      * @see org.argouml.model.OrderingKind#getUnordered()
 269  
      */
 270  
     public Object getUnordered() {
 271  0
         return OrderingKindEnum.OK_UNORDERED;
 272  
     }
 273  
 
 274  
     public Object getEntryPoint() {
 275  
         // UML 2.x only
 276  0
         throw new NotImplementedException();
 277  
     }
 278  
 
 279  
     public Object getExitPoint() {
 280  
         // UML 2.x only
 281  0
         throw new NotImplementedException();
 282  
     }
 283  
 
 284  
     public Object getTerminate() {
 285  
         // UML 2.x only
 286  0
         throw new NotImplementedException();
 287  
     }
 288  
 
 289  
 }
 290