/* * Created on 29 nov. 2004 * */ package fr.lifl.stc.stan.signature; import java.io.PrintStream; import java.io.Serializable; /** * @author ryl * */ public abstract class PartialSignature implements Serializable, Cloneable { static final long serialVersionUID = 0; protected PartialSignatureData sign; private String id; public void display(PrintStream out) { out.println(getClassId() + " : "); getComponent().display(out); } public String toString() { return getClassId() + " : " + getComponent(); } public PartialSignature (String i,PartialSignatureData s){ id = i; sign = s; } public String getClassId (){ return id; } public PartialSignatureData getComponent() { return sign; } public abstract boolean compatibleWith(PartialSignature ps); public abstract void makeAccept(PartialSignature ps); public Object clone() { try { PartialSignature ps = (PartialSignature)super.clone(); ps.id = id; ps.sign = (PartialSignatureData)sign.clone(); return ps; } catch (CloneNotSupportedException e) { System.err.println("PartialSignature.clone(): " + e); System.exit(1); // this should never happen } return null; // dead code } public String toHTMLString() { return ""; } }