1 2 24 package org.enhydra.tool.archive; 25 26 public class WebApplication extends Module { 28 private String root = null; 29 30 public WebApplication(String filepath) { 31 super(filepath); 32 setContextRoot(getName().substring(0, getName().indexOf('.'))); 33 } 34 35 public String getContextRoot() { 36 return root; 37 } 38 39 public void setContextRoot(String r) { 40 root = r; 41 } 42 43 public boolean equals(Object obj) { 44 boolean equal = false; 45 46 if (obj instanceof WebApplication) { 47 WebApplication webApp = (WebApplication) obj; 48 49 equal = super.equals(webApp); 50 if (equal) { 51 if (!webApp.getContextRoot().equals(getContextRoot())) { 52 equal = false; 53 } 54 } 55 } 56 return equal; 57 } 58 59 } 60 | Popular Tags |