| Method from net.sourceforge.harness.xml.jaxb.User Detail: |
public boolean equals(Object ob) {
if (this == ob) {
return true;
}
if (!(ob instanceof User)) {
return false;
}
User tob = ((User) ob);
if (_Name != null) {
if (tob._Name == null) {
return false;
}
if (!_Name.equals(tob._Name)) {
return false;
}
} else {
if (tob._Name != null) {
return false;
}
}
if (_Home != null) {
if (tob._Home == null) {
return false;
}
if (!_Home.equals(tob._Home)) {
return false;
}
} else {
if (tob._Home != null) {
return false;
}
}
if (_Dir != null) {
if (tob._Dir == null) {
return false;
}
if (!_Dir.equals(tob._Dir)) {
return false;
}
} else {
if (tob._Dir != null) {
return false;
}
}
return true;
}
|
public String getDir() {
return _Dir;
}
|
public String getHome() {
return _Home;
}
|
public String getName() {
return _Name;
}
|
public int hashCode() {
int h = 0;
h = ((127 * h) + ((_Name != null) ? _Name.hashCode() : 0));
h = ((127 * h) + ((_Home != null) ? _Home.hashCode() : 0));
h = ((127 * h) + ((_Dir != null) ? _Dir.hashCode() : 0));
return h;
}
|
public void marshal(Marshaller m) throws IOException {
XMLWriter w = m.writer();
w.start("user");
w.attribute("name", _Name.toString());
w.attribute("home", _Home.toString());
w.attribute("dir", _Dir.toString());
w.end("user");
}
|
public static Dispatcher newDispatcher() {
return Author.newDispatcher();
}
|
public void setDir(String _Dir) {
this._Dir = _Dir;
if (_Dir == null) {
invalidate();
}
}
|
public void setHome(String _Home) {
this._Home = _Home;
if (_Home == null) {
invalidate();
}
}
|
public void setName(String _Name) {
this._Name = _Name;
if (_Name == null) {
invalidate();
}
}
|
public String toString() {
StringBuffer sb = new StringBuffer("< < user");
if (_Name != null) {
sb.append(" name=");
sb.append(_Name.toString());
}
if (_Home != null) {
sb.append(" home=");
sb.append(_Home.toString());
}
if (_Dir != null) {
sb.append(" dir=");
sb.append(_Dir.toString());
}
sb.append(" > >");
return sb.toString();
}
|
public void unmarshal(Unmarshaller u) throws UnmarshalException {
XMLScanner xs = u.scanner();
Validator v = u.validator();
xs.takeStart("user");
while (xs.atAttribute()) {
String an = xs.takeAttributeName();
if (an.equals("name")) {
if (_Name != null) {
throw new DuplicateAttributeException(an);
}
_Name = xs.takeAttributeValue();
continue;
}
if (an.equals("home")) {
if (_Home != null) {
throw new DuplicateAttributeException(an);
}
_Home = xs.takeAttributeValue();
continue;
}
if (an.equals("dir")) {
if (_Dir != null) {
throw new DuplicateAttributeException(an);
}
_Dir = xs.takeAttributeValue();
continue;
}
throw new InvalidAttributeException(an);
}
xs.takeEnd("user");
}
|
public static User unmarshal(InputStream in) throws UnmarshalException {
return unmarshal(XMLScanner.open(in));
}
|
public static User unmarshal(XMLScanner xs) throws UnmarshalException {
return unmarshal(xs, newDispatcher());
}
|
public static User unmarshal(XMLScanner xs,
Dispatcher d) throws UnmarshalException {
return ((User) d.unmarshal(xs, (User.class)));
}
|
public void validate(Validator v) throws StructureValidationException {
}
|
public void validateThis() throws LocalValidationException {
if (_Name == null) {
throw new MissingAttributeException("name");
}
if (_Home == null) {
throw new MissingAttributeException("home");
}
if (_Dir == null) {
throw new MissingAttributeException("dir");
}
}
|