FileDocCategorySizeDatePackage
Url.javaAPI DocExample6399Sun Jul 07 09:43:06 BST 2002javajaxb.generated.config

Url

public class Url extends javax.xml.bind.MarshallableObject implements Element

Fields Summary
private String
_Context
private String
_ServletPrefix
private String
_ServletName
Constructors Summary
Methods Summary
public booleanequals(java.lang.Object ob)

        if (this == ob) {
            return true;
        }
        if (!(ob instanceof Url)) {
            return false;
        }
        Url tob = ((Url) ob);
        if (_Context!= null) {
            if (tob._Context == null) {
                return false;
            }
            if (!_Context.equals(tob._Context)) {
                return false;
            }
        } else {
            if (tob._Context!= null) {
                return false;
            }
        }
        if (_ServletPrefix!= null) {
            if (tob._ServletPrefix == null) {
                return false;
            }
            if (!_ServletPrefix.equals(tob._ServletPrefix)) {
                return false;
            }
        } else {
            if (tob._ServletPrefix!= null) {
                return false;
            }
        }
        if (_ServletName!= null) {
            if (tob._ServletName == null) {
                return false;
            }
            if (!_ServletName.equals(tob._ServletName)) {
                return false;
            }
        } else {
            if (tob._ServletName!= null) {
                return false;
            }
        }
        return true;
    
public java.lang.StringgetContext()

        return _Context;
    
public java.lang.StringgetServletName()

        return _ServletName;
    
public java.lang.StringgetServletPrefix()

        return _ServletPrefix;
    
public inthashCode()

        int h = 0;
        h = ((127 *h)+((_Context!= null)?_Context.hashCode(): 0));
        h = ((127 *h)+((_ServletPrefix!= null)?_ServletPrefix.hashCode(): 0));
        h = ((127 *h)+((_ServletName!= null)?_ServletName.hashCode(): 0));
        return h;
    
public voidmarshal(javax.xml.bind.Marshaller m)

        XMLWriter w = m.writer();
        w.start("url");
        w.attribute("context", _Context.toString());
        w.attribute("servletPrefix", _ServletPrefix.toString());
        w.attribute("servletName", _ServletName.toString());
        w.end("url");
    
public static javax.xml.bind.DispatchernewDispatcher()

        return Connection.newDispatcher();
    
public voidsetContext(java.lang.String _Context)

        this._Context = _Context;
        if (_Context == null) {
            invalidate();
        }
    
public voidsetServletName(java.lang.String _ServletName)

        this._ServletName = _ServletName;
        if (_ServletName == null) {
            invalidate();
        }
    
public voidsetServletPrefix(java.lang.String _ServletPrefix)

        this._ServletPrefix = _ServletPrefix;
        if (_ServletPrefix == null) {
            invalidate();
        }
    
public java.lang.StringtoString()

        StringBuffer sb = new StringBuffer("<<url");
        if (_Context!= null) {
            sb.append(" context=");
            sb.append(_Context.toString());
        }
        if (_ServletPrefix!= null) {
            sb.append(" servletPrefix=");
            sb.append(_ServletPrefix.toString());
        }
        if (_ServletName!= null) {
            sb.append(" servletName=");
            sb.append(_ServletName.toString());
        }
        sb.append(">>");
        return sb.toString();
    
public voidunmarshal(javax.xml.bind.Unmarshaller u)

        XMLScanner xs = u.scanner();
        Validator v = u.validator();
        xs.takeStart("url");
        while (xs.atAttribute()) {
            String an = xs.takeAttributeName();
            if (an.equals("context")) {
                if (_Context!= null) {
                    throw new DuplicateAttributeException(an);
                }
                _Context = xs.takeAttributeValue();
                continue;
            }
            if (an.equals("servletPrefix")) {
                if (_ServletPrefix!= null) {
                    throw new DuplicateAttributeException(an);
                }
                _ServletPrefix = xs.takeAttributeValue();
                continue;
            }
            if (an.equals("servletName")) {
                if (_ServletName!= null) {
                    throw new DuplicateAttributeException(an);
                }
                _ServletName = xs.takeAttributeValue();
                continue;
            }
            throw new InvalidAttributeException(an);
        }
        xs.takeEnd("url");
    
public static javajaxb.generated.config.Urlunmarshal(java.io.InputStream in)

        return unmarshal(XMLScanner.open(in));
    
public static javajaxb.generated.config.Urlunmarshal(javax.xml.marshal.XMLScanner xs)

        return unmarshal(xs, newDispatcher());
    
public static javajaxb.generated.config.Urlunmarshal(javax.xml.marshal.XMLScanner xs, javax.xml.bind.Dispatcher d)

        return ((Url) d.unmarshal(xs, (Url.class)));
    
public voidvalidate(javax.xml.bind.Validator v)

    
public voidvalidateThis()

        if (_Context == null) {
            throw new MissingAttributeException("context");
        }
        if (_ServletPrefix == null) {
            throw new MissingAttributeException("servletPrefix");
        }
        if (_ServletName == null) {
            throw new MissingAttributeException("servletName");
        }