I\'m hoping to have a flexible way of marshalling objects. A verbose version for single objects and a less-verbose version for multiple object versions.
For example, co
Here comes another idea. Could be a bad idea but somewhat easy.
class Department {
@XmlElement(required = true)
public Link getSelf() {
return self;
}
@XmlElement(required = false) // default
public Link getParent() {
if (verbose) {
return parent;
}
return null;
}
@XmlElement(required = false) // default
public String getSpecialty() {
if (verbose) {
return specialty;
}
return null;
}
@XmlTransient
private boolean verbose;
}