import java.util.Arrays;
import java.util.Vector;


public class LogicalFile {
	//TODO Should we add a type to distinguish REGULAR, INPUT, and MERGE files?
	private String name;
	private long size;
	private Vector<String>locations;

	public String getName() {
		return name;
	}

	public void setName(String logicalFileName) {
		this.name = logicalFileName;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long logicalFileSize) {
		this.size = logicalFileSize;
	}

	public void addLocation (String seName) {
		locations.add(seName);
	}

	public String getSEName() {
		//TODO return the first SE for now. Might be interesting to implement 
		// some load balancing strategy
		return locations.get(0);
	}

	public Vector<String> getLocations() {
		return locations;
	}

	public void selectLocation(){
		//TODO return the first SE for now. Might be interesting to implement 
		// some load balancing strategy
		String selectedLocation = locations.get(0);
		locations.clear();
		locations.add(selectedLocation);
	}

	public String toString(){
		return  "File '" + name + "' of size " + size + 
				" stored on " + locations.toString();
	}

	@Override
	public boolean equals(Object obj) {
		LogicalFile file= (LogicalFile) obj;
		return name.equals(file.getName());
	}

	public LogicalFile(String logicalFileName, long logicalFileSize, 
			String SEName) {
		super();
		this.setName(logicalFileName);
		this.setSize(logicalFileSize);
		this.locations = new Vector<String>();
		this.locations.add(SEName);
	}

	public LogicalFile(String logicalFileName, long logicalFileSize, 
			String[] seNames) {
		super();
		this.setName(logicalFileName);
		this.setSize(logicalFileSize);
		this.locations = new Vector<String>();
		this.locations.addAll(Arrays.asList(seNames));
	}
}

@@ -44,16 +44,94 @@
 ector;%0A%0A
+import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader.Array;%0A%0A
 %0Apublic 
@@ -1141,17 +1141,17 @@
 eturn  %22
-F
+f
 ile '%22 +
@@ -1184,13 +1184,8 @@
 e + 
-%0A%09%09%09%09
 %22 st
@@ -1196,16 +1196,21 @@
  on %22 + 
+%0A%09%09%09%09
 location
@@ -1436,15 +1436,18 @@
 ring
- SE
+%5B%5D se
 Name
+s
 ) %7B%0A
@@ -1588,15 +1588,34 @@
 .add
-(SE
+All(Arrays.asList(se
 Name
+s)
 );%0A%09
@@ -1697,186 +1697,81 @@
 ring
-%5B%5D
  seName
-s
 ) %7B%0A%09%09
-super();%0A%09%09this.setName(logicalFileName);%0A%09%09this.setSize(logicalFileSize);%0A%09%09this.locations = new Vector%3CString%3E();%0A%09%09this.locations.addAll(Arrays.asList(
+this(logicalFileName, logicalFileSize, new String%5B%5D %7B
 seName
-s)
+%7D
 );%0A%09

simplify specialized constructor