Author: bimargulies
Date: Wed Oct 13 21:24:18 2010
New Revision: 1022296

URL: http://svn.apache.org/viewvc?rev=1022296&view=rev
Log:
Add javadoc to emphasize what's going on with element and attribute names, and 
remove a dud item from the XmlElement.

Modified:
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamed.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamedWithForm.java

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java?rev=1022296&r1=1022295&r2=1022296&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java
 Wed Oct 13 21:24:18 2010
@@ -56,7 +56,6 @@ public class XmlSchemaElement extends Xm
     private String fixedValue;
 
     private XmlSchemaDerivationMethod finalDerivation;
-    private XmlSchemaDerivationMethod finalDerivationResolved;
 
     private boolean abstractElement;
     private boolean nillable;
@@ -198,6 +197,9 @@ public class XmlSchemaElement extends Xm
     }
 
 
+    /**
+     * {...@inheritdoc}
+     */
     public QName getQName() {
         return namedDelegate.getQName();
     }
@@ -252,29 +254,19 @@ public class XmlSchemaElement extends Xm
     }
 
     /**
-     * @param abstractElement The abstractElement to set.
+     * Set the 'abstract' attribute of this element.
+     * @param abstractElement
      */
     public void setAbstractElement(boolean abstractElement) {
         this.abstractElement = abstractElement;
     }
 
-    /** * @return Returns the abstractElement.
-     */
-    public boolean isAbstractElement() {
-        return abstractElement;
-    }
 
     /**
-     * @param finalDerivationResolved The finalDerivationResolved to set.
+     *  @return true if this element is abstract.
      */
-    public void setFinalDerivationResolved(XmlSchemaDerivationMethod 
finalDerivationResolved) {
-        this.finalDerivationResolved = finalDerivationResolved;
-    }
-
-    /** * @return Returns the finalDerivationResolved.
-     */
-    public XmlSchemaDerivationMethod getFinalDerivationResolved() {
-        return finalDerivationResolved;
+    public boolean isAbstractElement() {
+        return abstractElement;
     }
 
     public boolean isRef() {

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamed.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamed.java?rev=1022296&r1=1022295&r2=1022296&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamed.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamed.java
 Wed Oct 13 21:24:18 2010
@@ -32,26 +32,43 @@ public interface XmlSchemaNamed extends 
 
     /**
      * Retrieve the name.
-     * @return
+     * @return the local name of this object within its schema.
      */
     String getName();
 
+    /**
+     * @return true if this object has no name.
+     */
     boolean isAnonymous();
 
     /**
-     * Set the name. Set to null to render the object anonymous.
-     * @param name
+     * Set the name. Set to null to render the object anonymous, or to prepare 
to
+     * change it to refer to some other object.
+     * @param name the name.
      */
     void setName(String name);
 
     /**
      * Retrieve the parent schema.
-     * @return
+     * @return the containing schema.
      */
     XmlSchema getParent();
 
+    /**
+     * Get the QName for this object. This is always the formal name that 
identifies this
+     * item in the schema. If the item has a form (an element or attribute), 
and the form
+     * is 'unqualified', this is <strong>not</strong> the appropriate QName in 
an instance
+     * document. For those items, the getWiredName method returns the 
appropriate
+     * QName for an instance document.
+     * @see XmlSchemaNamedWithForm#getWireName()
+     * @return The qualified name of this object.
+     */
     QName getQName();
 
+    /**
+     * @return true if this item is a top-level item of the schema; false if 
this item
+     * is nested inside of some other schema object.
+     */
     boolean isTopLevel();
 
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamedWithForm.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamedWithForm.java?rev=1022296&r1=1022295&r2=1022296&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamedWithForm.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XmlSchemaNamedWithForm.java
 Wed Oct 13 21:24:18 2010
@@ -26,7 +26,7 @@ import org.apache.ws.commons.schema.XmlS
 /**
  * Attributes and elements have names that are influenced by their form.
  * Essentially, the 'form' has three possible values: qualified,
- * unqualified, and 'inherit from parent' (= unspecified). 
+ * unqualified, and 'inherit from parent' (= unspecified).
  */
 public interface XmlSchemaNamedWithForm extends XmlSchemaNamed {
     /**
@@ -35,14 +35,14 @@ public interface XmlSchemaNamedWithForm 
      * @return
      */
     XmlSchemaForm getForm();
-    
+
     /**
      * Set the schema form.
      * @param form Schema form. Pass in XmlSchemaForm.NONE to inherit
      * from the parent schema.
      */
     void setForm(XmlSchemaForm form);
-    
+
     /**
      * True if this item has a specified form, false if it inherits from
      * the parent schema.
@@ -51,9 +51,9 @@ public interface XmlSchemaNamedWithForm 
     boolean isFormSpecified();
 
     /**
-     * The name of this item as it is sent 'over the wire'. If the form 
-     * is unqualified, this has "" for a namespaceURI. Otherwise, it is the
-     * same as getName().
+     * The name of this item as it is sent 'over the wire' or stored
+     * in an XML file. If the form is unqualified, this has "" for a 
namespaceURI.
+     * Otherwise, it is the same as getQName().
      * @return
      */
     QName getWireName();


Reply via email to