===== mvcReader ===== This class reads data from a properly formatted file and returns a //MultiValuedRelation//, which is a matrix (a vector of vectors) with a name, and row and column labels. public class MvcReader extends AbstractReader implements MultiValuedRelationReader { public MvcReader(Reader r) { super(r); } public MultiValuedRelation readMultiValuedRelation() throws BadInputDataException,IOException { - verify the file is properly identified : if(!getStream().readLine().trim().equals("[Multi-Valued Relation]")) throw new IOException("The MVC file does not start with : [Multi-Valued Relation]\n"); - initialize properties - MultiValuedRelation mvRel=null; - String nomRel=getStream().readLine().trim(); - StringTokenizer sk=null; - sk=new StringTokenizer(getStream().readLine().trim(),"|"); ** columns are separated by "|", first data line contains the object names (I guess) ** - Vector lesObjs=new Vector(); - add each identifier from the tokenized stream as an object - while(sk.hasMoreElements() ){ lesObjs.add(new DefaultFormalObject(sk.nextElement().toString() ) ); } - now do the same for the attribute names : * sk=new StringTokenizer(getStream().readLine().trim(),"|"); * Vector lesAtts=new Vector(); * while(sk.hasMoreElements() ){ lesAtts.add(new DefaultFormalAttribute(sk.nextElement().toString() ) ); } - build the MultiValuedRelation with the rest of the data * mvRel=new MultiValuedRelation(lesObjs.size(),lesAtts.size() ); * mvRel.setRelationName(nomRel); * for(int i=0;i