StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(getCluster().getConfigFinder().open(filename))));
StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(ConfigFinder.getInstance().open(filename))));
   protected Vector parseRelationshipFile(String clusterId, String relationship) {			Vector relationshipsVector = new Vector(5,10);	    String filename = clusterId + "-relationships.ini";		try {			StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(getCluster().getConfigFinder().open(filename))));			st.eolIsSignificant(true);	        st.commentChar('#');			int count = 1;			st.nextToken();			while (st.ttype != StreamTokenizer.TT_EOF) {				String[] relationshipsArray = {"", "", "", "", ""};				Vector tokenVector = new Vector(5);				// read the next full line of input				while (st.ttype != StreamTokenizer.TT_EOL) {					tokenVector.addElement(st.sval);					st.nextToken();				}				//System.out.println("OrgTPRTDataPlugin:"+ " obtained line: " + tokenVector);				// now process the line				if (tokenVector.size() == 0) {					st.nextToken();					count++;					continue;				}				// element 0 is always Superior or Subordinate				relationshipsArray[0] = (String)tokenVector.elementAt(0);				// find out what type of relationship this is				Class r_class = GLMRelationship.class;				Field f = r_class.getField(relationshipsArray[0].toUpperCase());				if ((GLMRelationship.SUPPORTING).equals(f.get(null))) {					if (tokenVector.size() == 5) {						// element 1 is clientClusterName						relationshipsArray[1] = (String)tokenVector.elementAt(1);						// element 2 is roles						relationshipsArray[2] = (String)tokenVector.elementAt(2);						// element 3 is startDate						relationshipsArray[3] = (String)tokenVector.elementAt(3);						// element 4 is endDate						relationshipsArray[4] = (String)tokenVector.elementAt(4);					}					else {						System.out.println("Line " + count + ": incomplete or extra information, using default start and end times for all relations");						return null;					}				}				else				if ((GLMRelationship.SUPERIOR).equals(f.get(null))) {					if (tokenVector.size() == 4) {						// element 1 is subordinateClusterName						relationshipsArray[1] = (String)tokenVector.elementAt(1);						// element 2 is startDate						relationshipsArray[3] = (String)tokenVector.elementAt(2);						// element 3 is endDate						relationshipsArray[4] = (String)tokenVector.elementAt(3);					}					else					if (tokenVector.size() == 5) {						// element 1 is subordinateClusterName						relationshipsArray[1] = (String)tokenVector.elementAt(1);						// element 3 is startDate						relationshipsArray[3] = (String)tokenVector.elementAt(3);						// element 4 is endDate						relationshipsArray[4] = (String)tokenVector.elementAt(4);					}					else {						System.out.println("Line " + count + ": extra information, using default start and end times for all relations");						return null;					}				}				else {					System.out.println("Line " + count + ": unrecognized relationship, using default start and end times for all relations");					return null;				}				// we now have all tokens necessary from a single relationship statement				if (relationship.equals(GLMRelationship.SELF))					relationshipsVector.addElement(relationshipsArray);				/*				for (int i = 0; i < relationshipsArray.length; i++)					System.out.println("OrgTPRTDataPlugin:"+ " obtained token: " + "*"+relationshipsArray[i]+"*");				*/				// advance to the next line				st.nextToken();				count++;			}		}		catch (Exception e) {			e.printStackTrace();			return null;		}				return relationshipsVector;   }