mrglavas    2005/04/17 16:34:56

  Modified:    java/src/org/apache/wml/dom WMLBrElementImpl.java
                        WMLCardElementImpl.java
                        WMLDOMImplementationImpl.java WMLDoElementImpl.java
                        WMLDocumentImpl.java
  Log:
  Adding serialVersionUID to serializable classes, in the process also fixed 
formatting.
  
  Revision  Changes    Path
  1.4       +33 -32    
xml-xerces/java/src/org/apache/wml/dom/WMLBrElementImpl.java
  
  Index: WMLBrElementImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/wml/dom/WMLBrElementImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WMLBrElementImpl.java     5 Oct 2004 03:38:47 -0000       1.3
  +++ WMLBrElementImpl.java     17 Apr 2005 23:34:55 -0000      1.4
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 1999,2000,2004 The Apache Software Foundation.
  + * Copyright 1999,2000,2004,2005 The Apache Software Foundation.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -22,35 +22,36 @@
    * @version $Id$
    * @author <a href="mailto:[EMAIL PROTECTED]">David Li</a>
    */
  -
   public class WMLBrElementImpl extends WMLElementImpl implements WMLBrElement 
{
  -
  -  public WMLBrElementImpl (WMLDocumentImpl owner, String tagName) {
  -    super( owner, tagName);
  -  }
  -
  -  public void setClassName(String newValue) {
  -    setAttribute("class", newValue);
  -  }
  -
  -  public String getClassName() {
  -    return getAttribute("class");
  -  }
  -
  -  public void setXmlLang(String newValue) {
  -    setAttribute("xml:lang", newValue);
  -  }
  -
  -  public String getXmlLang() {
  -    return getAttribute("xml:lang");
  -  }
  -
  -  public void setId(String newValue) {
  -    setAttribute("id", newValue);
  -  }
  -
  -  public String getId() {
  -    return getAttribute("id");
  -  }
  -
  +    
  +    private static final long serialVersionUID = 3257562906295283762L;
  +    
  +    public WMLBrElementImpl (WMLDocumentImpl owner, String tagName) {
  +        super( owner, tagName);
  +    }
  +    
  +    public void setClassName(String newValue) {
  +        setAttribute("class", newValue);
  +    }
  +    
  +    public String getClassName() {
  +        return getAttribute("class");
  +    }
  +    
  +    public void setXmlLang(String newValue) {
  +        setAttribute("xml:lang", newValue);
  +    }
  +    
  +    public String getXmlLang() {
  +        return getAttribute("xml:lang");
  +    }
  +    
  +    public void setId(String newValue) {
  +        setAttribute("id", newValue);
  +    }
  +    
  +    public String getId() {
  +        return getAttribute("id");
  +    }
  +    
   }
  
  
  
  1.4       +43 -42    
xml-xerces/java/src/org/apache/wml/dom/WMLCardElementImpl.java
  
  Index: WMLCardElementImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/wml/dom/WMLCardElementImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WMLCardElementImpl.java   5 Oct 2004 03:38:47 -0000       1.3
  +++ WMLCardElementImpl.java   17 Apr 2005 23:34:55 -0000      1.4
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 1999,2000,2004 The Apache Software Foundation.
  + * Copyright 1999,2000,2004,2005 The Apache Software Foundation.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -22,83 +22,84 @@
    * @version $Id$
    * @author <a href="mailto:[EMAIL PROTECTED]">David Li</a>
    */
  -
   public class WMLCardElementImpl extends WMLElementImpl implements 
WMLCardElement {
  -
  +    
  +    private static final long serialVersionUID = 3257005466683781686L;
  +    
       public WMLCardElementImpl (WMLDocumentImpl owner, String tagName) {
  -     super( owner, tagName);
  +        super( owner, tagName);
       }
  -
  +    
       public void setOnTimer(String newValue) {
  -     setAttribute("ontimer", newValue);
  +        setAttribute("ontimer", newValue);
       }
  -
  +    
       public String getOnTimer() {
  -     return getAttribute("ontimer");
  +        return getAttribute("ontimer");
       }
  -
  +    
       public void setOrdered(boolean newValue) {
  -     setAttribute("ordered", newValue);
  +        setAttribute("ordered", newValue);
       }
  -
  +    
       public boolean getOrdered() {
  -     return getAttribute("ordered", true);
  +        return getAttribute("ordered", true);
       }
  -
  +    
       public void setOnEnterBackward(String newValue) {
  -     setAttribute("onenterbackward", newValue);
  +        setAttribute("onenterbackward", newValue);
       }
  -
  +    
       public String getOnEnterBackward() {
  -     return getAttribute("onenterbackward");
  +        return getAttribute("onenterbackward");
       }
  -
  +    
       public void setClassName(String newValue) {
  -     setAttribute("class", newValue);
  +        setAttribute("class", newValue);
       }
  -
  +    
       public String getClassName() {
  -     return getAttribute("class");
  +        return getAttribute("class");
       }
  -
  +    
       public void setXmlLang(String newValue) {
  -     setAttribute("xml:lang", newValue);
  +        setAttribute("xml:lang", newValue);
       }
  -
  +    
       public String getXmlLang() {
  -     return getAttribute("xml:lang");
  +        return getAttribute("xml:lang");
       }
  -
  +    
       public void setTitle(String newValue) {
  -     setAttribute("title", newValue);
  +        setAttribute("title", newValue);
       }
  -
  +    
       public String getTitle() {
  -     return getAttribute("title");
  +        return getAttribute("title");
       }
  -
  +    
       public void setNewContext(boolean newValue) {
  -     setAttribute("newcontext", newValue);
  +        setAttribute("newcontext", newValue);
       }
  -
  +    
       public boolean getNewContext() {
  -     return getAttribute("newcontext", false);
  +        return getAttribute("newcontext", false);
       }
  -
  +    
       public void setId(String newValue) {
  -     setAttribute("id", newValue);
  +        setAttribute("id", newValue);
       }
  -
  +    
       public String getId() {
  -     return getAttribute("id");
  +        return getAttribute("id");
       }
  -
  +    
       public void setOnEnterForward(String newValue) {
  -     setAttribute("onenterforward", newValue);
  +        setAttribute("onenterforward", newValue);
       }
  -
  +    
       public String getOnEnterForward() {
  -     return getAttribute("onenterforward");
  +        return getAttribute("onenterforward");
       }
  -
  +    
   }
  
  
  
  1.4       +8 -9      
xml-xerces/java/src/org/apache/wml/dom/WMLDOMImplementationImpl.java
  
  Index: WMLDOMImplementationImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/wml/dom/WMLDOMImplementationImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WMLDOMImplementationImpl.java     5 Oct 2004 03:38:47 -0000       1.3
  +++ WMLDOMImplementationImpl.java     17 Apr 2005 23:34:55 -0000      1.4
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 1999,2000,2004 The Apache Software Foundation.
  + * Copyright 1999,2000,2004,2005 The Apache Software Foundation.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -24,22 +24,21 @@
    * @version $Id$
    * @author <a href="mailto:[EMAIL PROTECTED]">David Li</a>
    */
  -
   public class WMLDOMImplementationImpl extends DOMImplementationImpl 
implements WMLDOMImplementation {
  -
  -    static DOMImplementationImpl singleton = new WMLDOMImplementationImpl();
  -
  +    
  +    static final DOMImplementationImpl singleton = new 
WMLDOMImplementationImpl();
  +    
       /** NON-DOM: Obtain and return the single shared object */
       public static DOMImplementation getDOMImplementation() {
           return singleton;
       }  
  -
  +    
       /**
        * @see org.w3c.dom.DOMImplementation
        */
       public Document createDocument(String namespaceURI, 
  -                                String qualifiedName, 
  -                                DocumentType doctype) throws DOMException {
  +            String qualifiedName, 
  +            DocumentType doctype) throws DOMException {
           DocumentImpl doc = new WMLDocumentImpl(doctype);
           //((DocumentTypeImpl)doctype).ownerDocument = doc;
           Element e = doc.createElementNS( namespaceURI, qualifiedName);
  
  
  
  1.4       +65 -64    
xml-xerces/java/src/org/apache/wml/dom/WMLDoElementImpl.java
  
  Index: WMLDoElementImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/wml/dom/WMLDoElementImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WMLDoElementImpl.java     5 Oct 2004 03:38:47 -0000       1.3
  +++ WMLDoElementImpl.java     17 Apr 2005 23:34:55 -0000      1.4
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 1999,2000,2004 The Apache Software Foundation.
  + * Copyright 1999,2000,2004,2005 The Apache Software Foundation.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -22,67 +22,68 @@
    * @version $Id$
    * @author <a href="mailto:[EMAIL PROTECTED]">David Li</a>
    */
  -
   public class WMLDoElementImpl extends WMLElementImpl implements WMLDoElement 
{
  -
  -  public WMLDoElementImpl (WMLDocumentImpl owner, String tagName) {
  -    super( owner, tagName);
  -  }
  -
  -  public void setOptional(String newValue) {
  -    setAttribute("optional", newValue);
  -  }
  -
  -  public String getOptional() {
  -    return getAttribute("optional");
  -  }
  -
  -  public void setClassName(String newValue) {
  -    setAttribute("class", newValue);
  -  }
  -
  -  public String getClassName() {
  -    return getAttribute("class");
  -  }
  -
  -  public void setXmlLang(String newValue) {
  -    setAttribute("xml:lang", newValue);
  -  }
  -
  -  public String getXmlLang() {
  -    return getAttribute("xml:lang");
  -  }
  -
  -  public void setId(String newValue) {
  -    setAttribute("id", newValue);
  -  }
  -
  -  public String getId() {
  -    return getAttribute("id");
  -  }
  -
  -  public void setLabel(String newValue) {
  -    setAttribute("label", newValue);
  -  }
  -
  -  public String getLabel() {
  -    return getAttribute("label");
  -  }
  -
  -  public void setType(String newValue) {
  -    setAttribute("type", newValue);
  -  }
  -
  -  public String getType() {
  -    return getAttribute("type");
  -  }
  -
  -  public void setName(String newValue) {
  -    setAttribute("name", newValue);
  -  }
  -
  -  public String getName() {
  -    return getAttribute("name");
  -  }
  -
  +    
  +    private static final long serialVersionUID = 3978707298497737012L;
  +    
  +    public WMLDoElementImpl (WMLDocumentImpl owner, String tagName) {
  +        super( owner, tagName);
  +    }
  +    
  +    public void setOptional(String newValue) {
  +        setAttribute("optional", newValue);
  +    }
  +    
  +    public String getOptional() {
  +        return getAttribute("optional");
  +    }
  +    
  +    public void setClassName(String newValue) {
  +        setAttribute("class", newValue);
  +    }
  +    
  +    public String getClassName() {
  +        return getAttribute("class");
  +    }
  +    
  +    public void setXmlLang(String newValue) {
  +        setAttribute("xml:lang", newValue);
  +    }
  +    
  +    public String getXmlLang() {
  +        return getAttribute("xml:lang");
  +    }
  +    
  +    public void setId(String newValue) {
  +        setAttribute("id", newValue);
  +    }
  +    
  +    public String getId() {
  +        return getAttribute("id");
  +    }
  +    
  +    public void setLabel(String newValue) {
  +        setAttribute("label", newValue);
  +    }
  +    
  +    public String getLabel() {
  +        return getAttribute("label");
  +    }
  +    
  +    public void setType(String newValue) {
  +        setAttribute("type", newValue);
  +    }
  +    
  +    public String getType() {
  +        return getAttribute("type");
  +    }
  +    
  +    public void setName(String newValue) {
  +        setAttribute("name", newValue);
  +    }
  +    
  +    public String getName() {
  +        return getAttribute("name");
  +    }
  +    
   }
  
  
  
  1.6       +48 -48    
xml-xerces/java/src/org/apache/wml/dom/WMLDocumentImpl.java
  
  Index: WMLDocumentImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/wml/dom/WMLDocumentImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WMLDocumentImpl.java      5 Oct 2004 03:38:47 -0000       1.5
  +++ WMLDocumentImpl.java      17 Apr 2005 23:34:55 -0000      1.6
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 1999,2000,2004 The Apache Software Foundation.
  + * Copyright 1999,2000,2004,2005 The Apache Software Foundation.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -29,18 +29,19 @@
    * @version $Id$
    * @author <a href="mailto:[EMAIL PROTECTED]">David Li</a>
    */
  -
   public class WMLDocumentImpl extends DocumentImpl implements WMLDocument {
  -
  +    
  +    private static final long serialVersionUID = 3257844364091929145L;
  +    
       private static Hashtable        _elementTypesWML;
       private static final Class[]    _elemClassSigWML =
  -     new Class[] { WMLDocumentImpl.class, String.class };
  -
  +        new Class[] { WMLDocumentImpl.class, String.class };
  +    
       public Element createElement( String tagName ) throws DOMException
       {
           Class        elemClass;
           Constructor    cnst;
  -
  +        
           elemClass = (Class) _elementTypesWML.get( tagName );
           if ( elemClass != null ) {
               try      {
  @@ -48,60 +49,59 @@
                   return (Element) cnst.newInstance( new Object[] { this, 
tagName } );
               } catch ( Exception except ) {
                   Throwable thrw;
  -
  +                
                   if ( except instanceof 
java.lang.reflect.InvocationTargetException )
                       thrw = ( (java.lang.reflect.InvocationTargetException) 
except ).getTargetException();
                   else
                       thrw = except;
  -
  +                
                   System.out.println( "Exception " + thrw.getClass().getName() 
);
                   System.out.println( thrw.getMessage() );
  -
  +                
                   throw new IllegalStateException( "Tag '" + tagName + "' 
associated with an Element class that failed to construct." );
               }
           }
           return new WMLElementImpl( this, tagName );
       }
  -
  +    
       static {
  -     _elementTypesWML = new Hashtable();
  -     _elementTypesWML.put("b", WMLBElementImpl.class);
  -     _elementTypesWML.put("noop", WMLNoopElementImpl.class);
  -     _elementTypesWML.put("a", WMLAElementImpl.class);
  -     _elementTypesWML.put("setvar", WMLSetvarElementImpl.class);
  -     _elementTypesWML.put("access", WMLAccessElementImpl.class);
  -     _elementTypesWML.put("strong", WMLStrongElementImpl.class);
  -     _elementTypesWML.put("postfield", WMLPostfieldElementImpl.class);
  -     _elementTypesWML.put("do", WMLDoElementImpl.class);
  -     _elementTypesWML.put("wml", WMLWmlElementImpl.class);
  -     _elementTypesWML.put("tr", WMLTrElementImpl.class);
  -     _elementTypesWML.put("go", WMLGoElementImpl.class);
  -     _elementTypesWML.put("big", WMLBigElementImpl.class);
  -     _elementTypesWML.put("anchor", WMLAnchorElementImpl.class);
  -     _elementTypesWML.put("timer", WMLTimerElementImpl.class);
  -     _elementTypesWML.put("small", WMLSmallElementImpl.class);
  -     _elementTypesWML.put("optgroup", WMLOptgroupElementImpl.class);
  -     _elementTypesWML.put("head", WMLHeadElementImpl.class);
  -     _elementTypesWML.put("td", WMLTdElementImpl.class);
  -     _elementTypesWML.put("fieldset", WMLFieldsetElementImpl.class);
  -     _elementTypesWML.put("img", WMLImgElementImpl.class);
  -     _elementTypesWML.put("refresh", WMLRefreshElementImpl.class);
  -     _elementTypesWML.put("onevent", WMLOneventElementImpl.class);
  -     _elementTypesWML.put("input", WMLInputElementImpl.class);
  -     _elementTypesWML.put("prev", WMLPrevElementImpl.class);
  -     _elementTypesWML.put("table", WMLTableElementImpl.class);
  -     _elementTypesWML.put("meta", WMLMetaElementImpl.class);
  -     _elementTypesWML.put("template", WMLTemplateElementImpl.class);
  -     _elementTypesWML.put("br", WMLBrElementImpl.class);
  -     _elementTypesWML.put("option", WMLOptionElementImpl.class);
  -     _elementTypesWML.put("u", WMLUElementImpl.class);
  -     _elementTypesWML.put("p", WMLPElementImpl.class);
  -     _elementTypesWML.put("select", WMLSelectElementImpl.class);
  -     _elementTypesWML.put("em", WMLEmElementImpl.class);
  -     _elementTypesWML.put("i", WMLIElementImpl.class);
  -     _elementTypesWML.put("card", WMLCardElementImpl.class);       
  +        _elementTypesWML = new Hashtable();
  +        _elementTypesWML.put("b", WMLBElementImpl.class);
  +        _elementTypesWML.put("noop", WMLNoopElementImpl.class);
  +        _elementTypesWML.put("a", WMLAElementImpl.class);
  +        _elementTypesWML.put("setvar", WMLSetvarElementImpl.class);
  +        _elementTypesWML.put("access", WMLAccessElementImpl.class);
  +        _elementTypesWML.put("strong", WMLStrongElementImpl.class);
  +        _elementTypesWML.put("postfield", WMLPostfieldElementImpl.class);
  +        _elementTypesWML.put("do", WMLDoElementImpl.class);
  +        _elementTypesWML.put("wml", WMLWmlElementImpl.class);
  +        _elementTypesWML.put("tr", WMLTrElementImpl.class);
  +        _elementTypesWML.put("go", WMLGoElementImpl.class);
  +        _elementTypesWML.put("big", WMLBigElementImpl.class);
  +        _elementTypesWML.put("anchor", WMLAnchorElementImpl.class);
  +        _elementTypesWML.put("timer", WMLTimerElementImpl.class);
  +        _elementTypesWML.put("small", WMLSmallElementImpl.class);
  +        _elementTypesWML.put("optgroup", WMLOptgroupElementImpl.class);
  +        _elementTypesWML.put("head", WMLHeadElementImpl.class);
  +        _elementTypesWML.put("td", WMLTdElementImpl.class);
  +        _elementTypesWML.put("fieldset", WMLFieldsetElementImpl.class);
  +        _elementTypesWML.put("img", WMLImgElementImpl.class);
  +        _elementTypesWML.put("refresh", WMLRefreshElementImpl.class);
  +        _elementTypesWML.put("onevent", WMLOneventElementImpl.class);
  +        _elementTypesWML.put("input", WMLInputElementImpl.class);
  +        _elementTypesWML.put("prev", WMLPrevElementImpl.class);
  +        _elementTypesWML.put("table", WMLTableElementImpl.class);
  +        _elementTypesWML.put("meta", WMLMetaElementImpl.class);
  +        _elementTypesWML.put("template", WMLTemplateElementImpl.class);
  +        _elementTypesWML.put("br", WMLBrElementImpl.class);
  +        _elementTypesWML.put("option", WMLOptionElementImpl.class);
  +        _elementTypesWML.put("u", WMLUElementImpl.class);
  +        _elementTypesWML.put("p", WMLPElementImpl.class);
  +        _elementTypesWML.put("select", WMLSelectElementImpl.class);
  +        _elementTypesWML.put("em", WMLEmElementImpl.class);
  +        _elementTypesWML.put("i", WMLIElementImpl.class);
  +        _elementTypesWML.put("card", WMLCardElementImpl.class);       
       }
  -
       
       /* DOM level 2 */
       public WMLDocumentImpl(DocumentType doctype) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to