| Method from net.sourceforge.harness.xml.jaxb.TestCase Detail: |
public void deletePropertyList() {
_PropertyList = null;
invalidate();
}
|
public void emptyPropertyList() {
_PropertyList = PredicatedLists.createInvalidating(this,
pred_PropertyList, new ArrayList());
}
|
public boolean equals(Object ob) {
if (this == ob) {
return true;
}
if (!(ob instanceof TestCase)) {
return false;
}
TestCase tob = ((TestCase) ob);
if (_Description != null) {
if (tob._Description == null) {
return false;
}
if (!_Description.equals(tob._Description)) {
return false;
}
} else {
if (tob._Description != null) {
return false;
}
}
if (_Execution != null) {
if (tob._Execution == null) {
return false;
}
if (!_Execution.equals(tob._Execution)) {
return false;
}
} else {
if (tob._Execution != null) {
return false;
}
}
if (_PropertyList != null) {
if (tob._PropertyList == null) {
return false;
}
if (!_PropertyList.equals(tob._PropertyList)) {
return false;
}
} else {
if (tob._PropertyList != null) {
return false;
}
}
if (_Messages != null) {
if (tob._Messages == null) {
return false;
}
if (!_Messages.equals(tob._Messages)) {
return false;
}
} else {
if (tob._Messages != null) {
return false;
}
}
if (_Name != null) {
if (tob._Name == null) {
return false;
}
if (!_Name.equals(tob._Name)) {
return false;
}
} else {
if (tob._Name != null) {
return false;
}
}
if (_ClassName != null) {
if (tob._ClassName == null) {
return false;
}
if (!_ClassName.equals(tob._ClassName)) {
return false;
}
} else {
if (tob._ClassName != null) {
return false;
}
}
if (_Result != null) {
if (tob._Result == null) {
return false;
}
if (!_Result.equals(tob._Result)) {
return false;
}
} else {
if (tob._Result != null) {
return false;
}
}
return true;
}
|
public String getClassName() {
return _ClassName;
}
|
public Description getDescription() {
return _Description;
}
|
public Execution getExecution() {
return _Execution;
}
|
public Messages getMessages() {
return _Messages;
}
|
public String getName() {
return _Name;
}
|
public List getPropertyList() {
return _PropertyList;
}
|
public ResultEnum getResult() {
return _Result;
}
|
public int hashCode() {
int h = 0;
h = ((127 * h) +
((_Description != null) ? _Description.hashCode() : 0));
h = ((127 * h) + ((_Execution != null) ? _Execution.hashCode() : 0));
h = ((127 * h) +
((_PropertyList != null) ? _PropertyList.hashCode() : 0));
h = ((127 * h) + ((_Messages != null) ? _Messages.hashCode() : 0));
h = ((127 * h) + ((_Name != null) ? _Name.hashCode() : 0));
h = ((127 * h) + ((_ClassName != null) ? _ClassName.hashCode() : 0));
h = ((127 * h) + ((_Result != null) ? _Result.hashCode() : 0));
return h;
}
|
public void marshal(Marshaller m) throws IOException {
XMLWriter w = m.writer();
w.start("testCase");
w.attribute("name", _Name.toString());
w.attribute("className", _ClassName.toString());
if (_Result != null) {
w.attribute("result", _Result.toString());
}
if (_Description != null) {
m.marshal(_Description);
}
if (_Execution != null) {
m.marshal(_Execution);
}
if (_PropertyList.size() > 0) {
for (Iterator i = _PropertyList.iterator(); i.hasNext();) {
m.marshal(((MarshallableObject) i.next()));
}
}
if (_Messages != null) {
m.marshal(_Messages);
}
w.end("testCase");
}
|
public static Dispatcher newDispatcher() {
return Author.newDispatcher();
}
|
public void setClassName(String _ClassName) {
this._ClassName = _ClassName;
if (_ClassName == null) {
invalidate();
}
}
|
public void setDescription(Description _Description) {
this._Description = _Description;
if (_Description == null) {
invalidate();
}
}
|
public void setExecution(Execution _Execution) {
this._Execution = _Execution;
if (_Execution == null) {
invalidate();
}
}
|
public void setMessages(Messages _Messages) {
this._Messages = _Messages;
if (_Messages == null) {
invalidate();
}
}
|
public void setName(String _Name) {
this._Name = _Name;
if (_Name == null) {
invalidate();
}
}
|
public void setResult(ResultEnum _Result) {
this._Result = _Result;
if (_Result == null) {
invalidate();
}
}
|
public String toString() {
StringBuffer sb = new StringBuffer("< < testCase");
if (_Description != null) {
sb.append(" description=");
sb.append(_Description.toString());
}
if (_Execution != null) {
sb.append(" execution=");
sb.append(_Execution.toString());
}
if (_PropertyList != null) {
sb.append(" property=");
sb.append(_PropertyList.toString());
}
if (_Messages != null) {
sb.append(" messages=");
sb.append(_Messages.toString());
}
if (_Name != null) {
sb.append(" name=");
sb.append(_Name.toString());
}
if (_ClassName != null) {
sb.append(" className=");
sb.append(_ClassName.toString());
}
if (_Result != null) {
sb.append(" result=");
sb.append(_Result.toString());
}
sb.append(" > >");
return sb.toString();
}
|
public void unmarshal(Unmarshaller u) throws UnmarshalException {
XMLScanner xs = u.scanner();
Validator v = u.validator();
xs.takeStart("testCase");
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("className")) {
if (_ClassName != null) {
throw new DuplicateAttributeException(an);
}
_ClassName = xs.takeAttributeValue();
continue;
}
if (an.equals("result")) {
if (_Result != null) {
throw new DuplicateAttributeException(an);
}
try {
_Result = ResultEnum.parse(xs.takeAttributeValue());
} catch (Exception x) {
throw new ConversionException(an, x);
}
continue;
}
throw new InvalidAttributeException(an);
}
if (xs.atStart("description")) {
_Description = ((Description) u.unmarshal());
}
if (xs.atStart("execution")) {
_Execution = ((Execution) u.unmarshal());
}
{
List l = PredicatedLists.create(this, pred_PropertyList,
new ArrayList());
while (xs.atStart("property")) {
l.add(((Property) u.unmarshal()));
}
_PropertyList = PredicatedLists.createInvalidating(this,
pred_PropertyList, l);
}
if (xs.atStart("messages")) {
_Messages = ((Messages) u.unmarshal());
}
xs.takeEnd("testCase");
}
|
public static TestCase unmarshal(InputStream in) throws UnmarshalException {
return unmarshal(XMLScanner.open(in));
}
|
public static TestCase unmarshal(XMLScanner xs) throws UnmarshalException {
return unmarshal(xs, newDispatcher());
}
|
public static TestCase unmarshal(XMLScanner xs,
Dispatcher d) throws UnmarshalException {
return ((TestCase) d.unmarshal(xs, (TestCase.class)));
}
|
public void validate(Validator v) throws StructureValidationException {
if (_Description != null) {
v.validate(_Description);
}
if (_Execution != null) {
v.validate(_Execution);
}
for (Iterator i = _PropertyList.iterator(); i.hasNext();) {
v.validate(((ValidatableObject) i.next()));
}
v.validate(_Messages);
}
JAXB 1.0 EA bug fix for handling optional elements |
public void validateThis() throws LocalValidationException {
if (_Name == null) {
throw new MissingAttributeException("name");
}
if (_ClassName == null) {
throw new MissingAttributeException("className");
}
}
|