📄 validationerror.java
字号:
/*
* DO NOT EDIT!
*
* This file was generated by the Breeze XML Studio code generator.
*
* Project: CBS
* Class Name: ValidationError
* Date: Mon Oct 28 15:40:42 BST 2002
* Breeze Version: 3.0.0 build 345
*
* IMPORTANT: Please see your Breeze license for more information on
* where and how this generated code may be used.
*
*/
package com.ddj.wsstruts.valueobject;
import com.tbf.xml.*;
import com.tbf.util.*;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Vector;
/**
* ValidationError class.
*
*/
public class ValidationError
implements com.tbf.xml.XmlObject,
java.io.Serializable {
/**
* Constant for "error" node name.
*/
public static final String $ERROR = "error";
/**
* Constant for "ValidationError" node name.
*/
public static final String $VALIDATION_ERROR = "ValidationError";
/**
* Declarations for the XML related fields.
*/
protected String _error = null;
/**
* Holds the parent object of this object.
*/
XmlObject _parent_ = null;
/**
* Default no args constructor.
*/
public ValidationError () {
}
/**
* Creates and populates an instance from the provided parse tree.
*
* @param xml the parse tree
*/
public ValidationError (XmlElement xml) {
unmarshal(xml);
}
/**
* Creates and populates an instance from the provided parse tree.
*
* @param xml the parse tree
* @param parent the containibg XmlObject
*/
public ValidationError (XmlElement xml, XmlObject parent) {
_parent_ = parent;
unmarshal(xml);
}
/**
* Get the error property.
*
*
*/
public String getError () {
return (_error);
}
/**
* Set the error property.
*
*
*/
public void setError (String newValue) {
_error = newValue;
}
/**
* Checks for whether Error is set or not.
*
* @return true if Error is set, false if not
*/
public boolean hasError () {
return (_error != null);
}
/**
* Discards Error's value.
*/
public void deleteError () {
_error = null;
}
/**
* Gets the XML tag name for this object.
*/
public String getXmlTagName () {
return ($VALIDATION_ERROR);
}
/**
* Gets the XML tag name for this class.
*/
public static String getClassXmlTagName () {
return ($VALIDATION_ERROR);
}
/**
* Checks this object to see if it will produce valid XML.
*/
public boolean isValid () {
return (true);
}
/**
* Checks the XML to see whether it matches the
* XML contents of this class.
*/
public static boolean matches (XmlElement xml, XmlObject parent) {
if (xml == null) {
return (false);
}
return (xml.matches($VALIDATION_ERROR, _nsm_, parent));
}
/**
* This method unmarshals an XML document instance
* into an instance of this class.
*/
public static ValidationError unmarshal (
InputStream in) throws Exception {
ValidationError obj = new ValidationError();
ObjectFactory.unmarshal(obj, in);
return (obj);
}
/**
* Populates this object with the values from the
* parsed XML.
* @deprecated will be removed in a future release.
* Use {@link #unmarshal(XmlElement)}.
*/
public void fromXml (XmlElement xml) {
unmarshal(xml);
}
/**
* Populates this object with the values from the
* parsed XML.
*
* @since 2.5
*/
public void unmarshal (XmlElement xml) {
if (xml == null) {
return;
}
if (!xml.matches($VALIDATION_ERROR, this)) {
return;
}
Vector doc_namespaces = xml.getDeclaredNamespaces();
if (doc_namespaces != null) {
_doc_declared_namespaces_ = (Vector)doc_namespaces.clone();
}
/*
* Get the contained XmlElement, this is what we process
*/
xml = xml.getChildAt(0);
if (xml == null) {
return;
}
if (xml.matches($ERROR, this)) {
setError(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
}
/**
* Unmarshal any attributes.
*
* @param xml the XmlElement holding the parsed XML
* @since 2.5
*/
protected void unmarshalAttributes (XmlElement xml) {
}
/**
* Writes this instance to a stream.
*
* @param stream the OutputStream to write the XML object to
* @deprecated This method will be removed in a future release.
* Use {@link #marshal(XmlOutputStream)} or {@link #marshal(OutputStream)}.
*/
public void toXml (OutputStream stream) {
marshal(stream);
}
/**
* Writes this instance to a stream.
*
* @param stream the OutputStream to write the XML object to
* @param embed_files set to true to embed files in the XML
* @deprecated This method will be removed in a future release.
* Use {@link #marshal(XmlOutputStream)} or {@link #marshal(OutputStream)}.
*/
public void toXml (OutputStream stream, boolean embed_files) {
XmlOutputStream out = new FormattedOutputStream(stream);
out.setEmbedFiles(embed_files);
marshal(out);
}
/**
* Writes this instance to a stream.
*
* @param stream the OutputStream to write the XML object to
* @param embed_files set to true to embed files in the XML
* @deprecated This method will be removed in a future release.
* Use {@link #marshal(XmlOutputStream)} or {@link #marshal(OutputStream)}.
*/
public void toXml (
OutputStream stream, String indent, boolean embed_files) {
FormattedOutputStream out = new FormattedOutputStream(stream);
out.setIndentString(indent);
out.setEmbedFiles(embed_files);
marshal(out);
}
/**
* Writes this instance to a stream. If the OutputStream is not an
* instance of XmlOutputStream then a FormattedOutputStream
* will be created which wraps the OutputStream.
*
* @param stream the OutputStream to write the XML object to
* @see #marshal(XmlOutputStream)
* @since 2.5
*/
public void marshal (OutputStream stream) {
XmlOutputStream out = new FormattedOutputStream(stream);
marshal(out);
}
/**
* Writes this instance to an XmlOutputStream.
*
* @param out the XmlOutputStream to write the XML object to
* @see #marshal(OutputStream)
* @since 2.5
*/
public void marshal (XmlOutputStream out) {
out.writeStartTag(getXmlTagName(), false);
out.incrementIndent();
out.write($ERROR,
_error);
out.decrementIndent();
out.writeEndTag(getXmlTagName());
}
/**
* Get the XmlAttributeList for marshalling.
*
* @param attrs the currently populated XmlAttributeList.
* @return a populated XmlAttributeList
* @since 2.5
*/
protected XmlAttributeList marshalAttributes (XmlAttributeList attrs) {
return (attrs);
}
/**
* Get this object's parent object.
*/
public XmlObject get$Parent () {
return (_parent_);
}
/**
* Set this object's parent object.
*/
public void set$Parent (XmlObject parent) {
_parent_ = parent;
}
/**
* The default <code>XmlNamespaceManager</code> for this class.
* @since 2.5
*/
protected static XmlNamespaceManager _nsm_ = null;
/**
* Get the <code>XmlNamespaceManager</code> for this class.
* This will be null if no namespaces on this class or if
* namespace support is disabled during code generation.
*
* @since 2.5
*/
public XmlNamespaceManager get$NamespaceManager () {
return (_nsm_);
}
/**
* Storage for namespaces declared in the input document.
* @since 2.5
*/
protected Vector _doc_declared_namespaces_ = null;
/**
* Get the Vector holding the namespaces declared in the element
* that this instance was unmarshalled from.
*
* @since 2.5
*/
public Vector get$DocumentNamespaces () {
return (_doc_declared_namespaces_);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -