Clover coverage report - Maven Clover report
Coverage timestamp: Tue Sep 16 2008 01:16:37 EEST
file stats: LOC: 97   Methods: 2
NCLOC: 34   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
WSMLItem.java 0% 0% 0% 0%
coverage
 1    /*
 2    wsmo4j - a WSMO API and Reference Implementation
 3   
 4    Copyright (c) 2004-2005, OntoText Lab. / SIRMA
 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 com.ontotext.wsmo4j.serializer.wsml;
 20   
 21    /**
 22    * <p>Title: WSMO4J</p>
 23    * <p>Description: WSMO API and a Reference Implementation</p>
 24    * <p>Copyright: Copyright (c) 2004-2005</p>
 25    * <p>Company: OntoText Lab. / SIRMA </p>
 26    * @author not attributable
 27    * @version 1.0
 28    *
 29    */
 30    import org.wsmo.common.Entity;
 31    import java.lang.ref.WeakReference;
 32    import java.lang.reflect.*;
 33   
 34   
 35    public class WSMLItem extends WeakReference implements Item2Visit {
 36  0 public WSMLItem(Entity o) { super(o); }
 37   
 38  0 public void apply(Visitor visitor) {
 39  0 Class[] oC = super.get().getClass().getInterfaces();
 40  0 try {
 41  0 for (int i = 0; i < oC.length; i++) {
 42  0 Method m = null;
 43  0 try {
 44  0 m = visitor.getClass().getMethod("visit", new Class[]{oC[i]});
 45    }
 46    catch (NoSuchMethodException nse) {
 47  0 continue;
 48    }
 49  0 if (m != null) {
 50  0 m.invoke(visitor, new Object[]{get()});
 51    }
 52  0 break;
 53    }
 54    }
 55    catch (InvocationTargetException e) {
 56  0 Throwable t = e.getCause();
 57  0 if (t != null)
 58  0 throw new RuntimeException(t.getMessage(), t);
 59  0 throw new RuntimeException(e);
 60    }
 61    catch (Exception e) {
 62  0 throw new RuntimeException("in apply", e);
 63    }
 64   
 65    }
 66    }
 67   
 68    /*
 69    * $Log$
 70    * Revision 1.3 2006/03/24 15:31:19 vassil_momtchev
 71    * message friendly handling of invocation exceptions added
 72    *
 73    * Revision 1.2 2005/11/28 14:51:37 vassil_momtchev
 74    * moved from com.ontotext.wsmo4j.parser
 75    *
 76    * Revision 1.1.2.1 2005/11/28 13:59:35 vassil_momtchev
 77    * package refactored from com.ontotext.wsmo4j.parser to com.ontotext.wsmo4j.serializer.wsml
 78    *
 79    * Revision 1.1 2005/06/27 08:32:00 alex_simov
 80    * refactoring: *.io.parser -> *.parser
 81    *
 82    * Revision 1.4 2005/06/22 14:49:27 alex_simov
 83    * Copyright header added/updated
 84    *
 85    * Revision 1.3 2005/06/02 14:19:19 alex_simov
 86    * v0.4.0
 87    *
 88    * Revision 1.2 2005/06/02 12:33:09 damian
 89    * fixes
 90    *
 91    * Revision 1.1 2005/05/26 09:36:03 damian
 92    * io package
 93    *
 94    * Revision 1.2 2005/01/12 15:20:18 alex_simov
 95    * checkstyle formatting
 96    *
 97    */