Coverage Report - org.deri.wsmo4j.io.serializer.wsml.SerializerImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
SerializerImpl
0%
0/9
0%
0/2
0
 
 1  
 package org.deri.wsmo4j.io.serializer.wsml;
 2  
 
 3  
 import java.io.*;
 4  
 import java.util.*;
 5  
 
 6  
 import org.wsmo.common.*;
 7  
 import org.wsmo.service.choreography.*;
 8  
 import org.wsmo.service.choreography.io.*;
 9  
 
 10  
 import com.ontotext.wsmo4j.common.*;
 11  
 import com.ontotext.wsmo4j.serializer.wsml.*;
 12  
 
 13  
 public class SerializerImpl extends WSMLSerializerImpl implements Serializer {
 14  
 
 15  
     public SerializerImpl(Map <String, Object> map) {
 16  0
         super(map);
 17  0
     }
 18  
 
 19  
     public void serialize(final TopEntity[] topItem, final Writer writer) throws IOException {
 20  0
         if (topItem.length > 0) {
 21  0
             new ChoreographySerializerWSML(writer, topItem[0]).process(topItem);
 22  
         }
 23  0
     }
 24  
     
 25  
     public String serialize(Choreography chor) {
 26  0
         StringWriter writer = new StringWriter();    
 27  
         //TODO: Remove dependence between serializer and wsmo4j impl
 28  0
         ChoreographySerializerWSML chorSer = 
 29  
             new ChoreographySerializerWSML(writer, new TopEntityImpl(new UnnumberedAnonymousIDImpl()));
 30  0
         chorSer.helpChoreography(chor);
 31  0
         return writer.toString();
 32  
     }
 33  
 }
 34  
 
 35  
 /*
 36  
  * $Log$
 37  
  * Revision 1.4  2007/04/02 13:05:18  morcen
 38  
  * Generics support added to wsmo-ext
 39  
  *
 40  
  * Revision 1.3  2006/02/01 15:28:40  vassil_momtchev
 41  
  * serialize(Choreography chor) bug fixed
 42  
  *
 43  
  * Revision 1.2  2006/02/01 14:44:15  vassil_momtchev
 44  
  * implements org.wsmo.service.choreography.io.Serializer interface
 45  
  *
 46  
  * Revision 1.1  2005/11/29 13:59:21  vassil_momtchev
 47  
  * serialization implementation to support choreography api
 48  
  *
 49  
 */