FileDocCategorySizeDatePackage
Actor.javaAPI DocExample5513Sun Jul 07 09:31:54 BST 2002javajaxb.generated.movies

Actor

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

Fields Summary
private String
_Headliner
private boolean
isDefaulted_Headliner
private static final String
DEFAULT_HEADLINER
private String
_Content
Constructors Summary
Methods Summary
public booleandefaultedHeadliner()


       
        return (_Headliner!= null);
    
public booleanequals(java.lang.Object ob)

        if (this == ob) {
            return true;
        }
        if (!(ob instanceof Actor)) {
            return false;
        }
        Actor tob = ((Actor) ob);
        if (_Headliner!= null) {
            if (tob._Headliner == null) {
                return false;
            }
            if (!_Headliner.equals(tob._Headliner)) {
                return false;
            }
        } else {
            if (tob._Headliner!= null) {
                return false;
            }
        }
        if (_Content!= null) {
            if (tob._Content == null) {
                return false;
            }
            if (!_Content.equals(tob._Content)) {
                return false;
            }
        } else {
            if (tob._Content!= null) {
                return false;
            }
        }
        return true;
    
public java.lang.StringgetContent()

        return _Content;
    
public java.lang.StringgetHeadliner()

        if (_Headliner == null) {
            return DEFAULT_HEADLINER;
        }
        return _Headliner;
    
public inthashCode()

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

        XMLWriter w = m.writer();
        w.start("actor");
        if (_Headliner!= null) {
            w.attribute("headliner", _Headliner.toString());
        }
        if (_Content!= null) {
            w.chars(_Content.toString());
        }
        w.end("actor");
    
public static javax.xml.bind.DispatchernewDispatcher()

        Dispatcher d = new Dispatcher();
        d.register("actor", (Actor.class));
        d.register("cast", (Cast.class));
        d.register("movie", (Movie.class));
        d.register("movies", (Movies.class));
        d.freezeElementNameMap();
        return d;
    
public voidsetContent(java.lang.String _Content)

        this._Content = _Content;
        if (_Content == null) {
            invalidate();
        }
    
public voidsetHeadliner(java.lang.String _Headliner)

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

        StringBuffer sb = new StringBuffer("<<actor");
        sb.append(" headliner=");
        sb.append(getHeadliner().toString());
        if (_Content!= null) {
            sb.append(" content=");
            sb.append(_Content.toString());
        }
        sb.append(">>");
        return sb.toString();
    
public static javajaxb.generated.movies.Actorunmarshal(java.io.InputStream in)

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

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

        return ((Actor) d.unmarshal(xs, (Actor.class)));
    
public voidunmarshal(javax.xml.bind.Unmarshaller u)

        XMLScanner xs = u.scanner();
        Validator v = u.validator();
        xs.takeStart("actor");
        while (xs.atAttribute()) {
            String an = xs.takeAttributeName();
            if (an.equals("headliner")) {
                if (_Headliner!= null) {
                    throw new DuplicateAttributeException(an);
                }
                _Headliner = xs.takeAttributeValue();
                continue;
            }
            throw new InvalidAttributeException(an);
        }
        {
            String s;
            if (xs.atChars(XMLScanner.WS_COLLAPSE)) {
                s = xs.takeChars(XMLScanner.WS_COLLAPSE);
            } else {
                s = "";
            }
            try {
                _Content = String.valueOf(s);
            } catch (Exception x) {
                throw new ConversionException("content", x);
            }
        }
        xs.takeEnd("actor");
    
public voidvalidate(javax.xml.bind.Validator v)

    
public voidvalidateThis()