Coverage Report - org.galagosearch.tupleflow.execution.ConnectionEndPoint
 
Classes in this File Line Coverage Branch Coverage Complexity
ConnectionEndPoint
48%
10/21
N/A
0
 
 1  
 /*
 2  
  * ConnectionEndPoint
 3  
  * 
 4  
  * 19 October 2007 -- tds
 5  
  *
 6  
  * BSD License (http://galagosearch.org/license)
 7  
  */
 8  
 package org.galagosearch.tupleflow.execution;
 9  
 
 10  
 import java.io.Serializable;
 11  
 
 12  
 /**
 13  
  * @author trevor
 14  
  */
 15  0
 public class ConnectionEndPoint extends Locatable implements Cloneable, Serializable {
 16  
     private String stageName;
 17  
     private String pointName;
 18  
     private ConnectionPointType type;
 19  
     private ConnectionAssignmentType assignment;
 20  
 
 21  
     public ConnectionEndPoint(FileLocation location, String stageName, String pointName, ConnectionAssignmentType assignment, ConnectionPointType type) {
 22  4
         super(location);
 23  4
         this.stageName = stageName;
 24  4
         this.pointName = pointName;
 25  4
         this.type = type;
 26  4
         this.assignment = assignment;
 27  4
     }
 28  
 
 29  
     public ConnectionEndPoint(FileLocation location, String stageName, String pointName, ConnectionPointType type) {
 30  2
         this(location, stageName, pointName, ConnectionAssignmentType.Combined, type);
 31  2
     }
 32  
 
 33  
     public String getStageName() {
 34  6
         return stageName;
 35  
     }
 36  
 
 37  
     public void setStageName(String stageName) {
 38  0
         this.stageName = stageName;
 39  0
     }
 40  
 
 41  
     public String getPointName() {
 42  2
         return pointName;
 43  
     }
 44  
 
 45  
     public void setPointName(String pointName) {
 46  0
         this.pointName = pointName;
 47  0
     }
 48  
 
 49  
     public ConnectionAssignmentType getAssignment() {
 50  0
         return assignment;
 51  
     }
 52  
 
 53  
     public ConnectionPointType getType() {
 54  0
         return type;
 55  
     }
 56  
 
 57  
     @Override
 58  
     public String toString() {
 59  0
         return String.format("%s:%s %s %s", stageName, pointName, assignment, type.toString());
 60  
     }
 61  
 
 62  
     @Override
 63  
     public ConnectionEndPoint clone() {
 64  
         try {
 65  0
             return (ConnectionEndPoint) super.clone();
 66  0
         } catch (CloneNotSupportedException e) {
 67  0
             throw new RuntimeException("Expected superclass to handle cloning", e);
 68  
         }
 69  
     }
 70  
 }